public class D4DataCompiler
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected ChecksumMode |
checksummode |
static boolean |
DEBUG |
protected DapDataset |
dmr |
protected D4DSP |
dsp |
protected java.util.Map<DapVariable,java.lang.Long> |
localchecksummap |
protected java.util.Map<DapVariable,java.lang.Long> |
remotechecksummap |
protected java.nio.ByteOrder |
remoteorder |
protected DeChunkedInputStream |
stream |
Constructor and Description |
---|
D4DataCompiler(D4DSP dsp,
ChecksumMode checksummode,
java.nio.ByteOrder remoteorder)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
compile()
The goal here is to process the serialized
databuffer and pull out top-level variable positions
in the serialized databuffer.
|
protected java.lang.Object |
compileAtomicVar(DapVariable var)
Compile fixed-sized atomic types
Storage =
|
protected java.lang.Object |
compileOpaqueVar(DapVariable var)
Read and convert an opaque typed array
|
java.lang.Object |
compileSequence(DapSequence dapseq)
Compile a sequence as a set of records.
|
protected java.lang.Object |
compileSequenceArray(DapVariable var)
Compile a sequence array.
|
protected java.lang.Object |
compileStringVar(DapVariable var)
Read and convert a string typed array
|
protected java.lang.Object |
compileStructure(DapStructure dapstruct)
Compile a structure instance.
|
protected java.lang.Object |
compileStructureArray(DapVariable var)
Compile a structure array.
|
protected java.lang.Object |
compileVar(DapVariable dapvar)
Return a compiled version of the data for this variable.
|
protected int |
computeTypeSize(DapType daptype)
Compute the size in databuffer of the serialized form
|
Array |
createArray(DapVariable var,
java.lang.Object storage) |
protected Array |
createAtomicArray(DapVariable var,
java.lang.Object storage) |
protected Array |
createSequenceArray(DapVariable var,
java.lang.Object storage)
Create an Array object for a DAP4 Sequence.
|
protected Array |
createStructureArray(DapVariable var,
java.lang.Object storage) |
protected long |
extractChecksum() |
java.util.Map<DapVariable,java.lang.Long> |
getChecksumMap(DapConstants.ChecksumSource src) |
protected int |
getCount() |
protected void |
setChecksum(DapConstants.ChecksumSource src,
DapVariable dvar,
java.lang.Long csum) |
protected void |
skip(long count) |
protected long |
walkByteStrings(long[] positions,
java.nio.ByteBuffer databuffer) |
public static boolean DEBUG
protected DapDataset dmr
protected ChecksumMode checksummode
protected java.nio.ByteOrder remoteorder
protected D4DSP dsp
protected DeChunkedInputStream stream
protected java.util.Map<DapVariable,java.lang.Long> localchecksummap
protected java.util.Map<DapVariable,java.lang.Long> remotechecksummap
public D4DataCompiler(D4DSP dsp, ChecksumMode checksummode, java.nio.ByteOrder remoteorder) throws DapException
dsp
- the D4DSPchecksummode
- remoteorder
- DapException
public java.util.Map<DapVariable,java.lang.Long> getChecksumMap(DapConstants.ChecksumSource src)
protected void setChecksum(DapConstants.ChecksumSource src, DapVariable dvar, java.lang.Long csum)
public void compile() throws java.io.IOException
DapException
java.io.IOException
protected java.lang.Object compileVar(DapVariable dapvar) throws java.io.IOException
java.io.IOException
protected java.lang.Object compileAtomicVar(DapVariable var) throws java.io.IOException
var
- DapException
java.io.IOException
protected java.lang.Object compileStringVar(DapVariable var) throws java.io.IOException
var
- DapException
java.io.IOException
protected java.lang.Object compileOpaqueVar(DapVariable var) throws java.io.IOException
var
- DapException
java.io.IOException
protected java.lang.Object compileStructureArray(DapVariable var) throws java.io.IOException
var
- the templateDapException
java.io.IOException
protected java.lang.Object compileStructure(DapStructure dapstruct) throws java.io.IOException
dapstruct
- The templateDapException
java.io.IOException
protected java.lang.Object compileSequenceArray(DapVariable var) throws java.io.IOException
var
- the templateDapException
java.io.IOException
public java.lang.Object compileSequence(DapSequence dapseq) throws java.io.IOException
dapseq
- DapException
java.io.IOException
protected long extractChecksum() throws java.io.IOException
java.io.IOException
protected void skip(long count) throws java.io.IOException
java.io.IOException
protected int getCount() throws java.io.IOException
java.io.IOException
protected int computeTypeSize(DapType daptype)
daptype
- protected long walkByteStrings(long[] positions, java.nio.ByteBuffer databuffer) throws java.io.IOException
java.io.IOException
public Array createArray(DapVariable var, java.lang.Object storage)
protected Array createAtomicArray(DapVariable var, java.lang.Object storage)
protected Array createStructureArray(DapVariable var, java.lang.Object storage)
protected Array createSequenceArray(DapVariable var, java.lang.Object storage)
var
- storage
-