Package dap4.servlet

Class DapSerializer

java.lang.Object
dap4.servlet.DapSerializer

public class DapSerializer extends Object
Given a DSP, serialize possibly constrained data.
  • Field Details

    • stream

      protected OutputStream stream
    • writer

      protected SerialWriter writer
    • cdmwrap

      protected CDMWrap cdmwrap
    • ce

      protected dap4.core.ce.CEConstraint ce
    • order

      protected ByteOrder order
    • checksummode

      protected dap4.core.util.ChecksumMode checksummode
    • checksums

      protected Map<dap4.core.dmr.DapVariable,Long> checksums
  • Constructor Details

    • DapSerializer

      public DapSerializer()
    • DapSerializer

      public DapSerializer(CDMWrap c4, dap4.core.ce.CEConstraint constraint, OutputStream stream, ByteOrder order, dap4.core.util.ChecksumMode mode) throws IOException
      Primary constructor
      Parameters:
      c4 - The DSP to write
      constraint - Any applicable constraint
      stream - Write to this stream
      order - The byte order to use
      Throws:
      IOException
  • Method Details

    • getChecksums

      public Map<dap4.core.dmr.DapVariable,Long> getChecksums()
    • write

      public void write(dap4.core.dmr.DapDataset dmr) throws IOException
      Throws:
      IOException
    • writeVariable

      protected void writeVariable(CDMData data, SerialWriter dst) throws IOException
      Parameters:
      data - - cursor referencing what to write
      dst - - where to write
      Throws:
      IOException
    • writeAtomicVariable

      protected void writeAtomicVariable(CDMData data, SerialWriter dst) throws IOException
      Write out an atomic variable.
      Parameters:
      data -
      dst -
      Throws:
      dap4.core.util.DapException
      IOException
    • writeStructure

      protected void writeStructure(CDMData data, SerialWriter dst) throws IOException
      Write out a scalar or array structure instance
      Parameters:
      data -
      dst - - where to write
      Throws:
      dap4.core.util.DapException
      IOException
    • writeStructure1

      protected void writeStructure1(CDMData instance, SerialWriter dst) throws IOException
      Write out a single structure instance
      Parameters:
      instance -
      dst - - where to write
      Throws:
      dap4.core.util.DapException
      IOException
    • writeSequence

      protected void writeSequence(CDMData data, SerialWriter dst) throws IOException
      Write out a single or array sequence instance
      Parameters:
      data -
      dst - - where to write
      Throws:
      dap4.core.util.DapException
      IOException
    • writeSequence1

      protected void writeSequence1(CDMData instance, SerialWriter dst) throws IOException
      Write out a single Sequence of records (Eventually use any filter in the DapVariable)
      Parameters:
      instance - the sequence instance
      dst - write target
      Throws:
      dap4.core.util.DapException
      IOException
    • writeRecord

      protected void writeRecord(CDMData record, SerialWriter dst) throws IOException
      Write out a single Record instance.
      Parameters:
      record - the record data cursor
      dst - to which to write
      Throws:
      dap4.core.util.DapException
      IOException