Package org.vast.swe

Class SWEData

All Implemented Interfaces:
Serializable, HasCopy, AbstractSWE, AbstractSWEIdentifiable, BlockComponent, DataArray, DataComponent, IDataConsumer, IDataProvider, ISweInputDataStream, ISweOutputDataStream

public class SWEData extends DataList implements ISweInputDataStream, ISweOutputDataStream

Implementation of SWE input/output data stream storing data in memory, This class also contains methods for parsing/writing the stored data.

Since:
Feb 21, 2007
See Also:
  • Field Details

    • dataSource

      protected transient DataSource dataSource
  • Constructor Details

    • SWEData

      public SWEData()
  • Method Details

    • copy

      public SWEData copy()
      Description copied from interface: DataComponent
      Return a structural copy of this component The copy is done recursively, but only the structure is copied (not the data)
      Specified by:
      copy in interface DataArray
      Specified by:
      copy in interface DataComponent
      Specified by:
      copy in interface HasCopy
      Overrides:
      copy in class DataList
      Returns:
      copy of this component, including sub-components
    • getNextElement

      public DataComponent getNextElement()
      Specified by:
      getNextElement in interface IDataProvider
    • getNextDataBlock

      public DataBlock getNextDataBlock()
      Specified by:
      getNextDataBlock in interface IDataProvider
    • pushNextDataBlock

      public void pushNextDataBlock(DataBlock dataBlock)
      Specified by:
      pushNextDataBlock in interface IDataConsumer
    • getDataSource

      public DataSource getDataSource()
    • setDataSource

      public void setDataSource(DataSource dataSource)
    • getDataParser

      public DataStreamParser getDataParser()
      Retrieves parser created for this SWE structure/encoding pair Allows the use of the parser on a separate input streams w/ same structure
      Returns:
      parser instance
    • getDataWriter

      public DataStreamWriter getDataWriter()
      Retrieves writer created for this structure/encoding pair Allows the use of the writer on separate output streams
      Returns:
      writer instance
    • parseData

      public void parseData() throws IOException
      Parses data from the internally stored data source stream and stores data blocks in a DataList
      Throws:
      IOException
    • parseData

      public void parseData(DataSource dataSource) throws IOException
      Parses data from the given data source stream and stores data blocks in the DataList
      Parameters:
      dataSource -
      Throws:
      IOException
    • writeData

      public void writeData(DataSink dataSink) throws IOException
      Writes data blocks to the data stream specified
      Parameters:
      dataSink -
      Throws:
      IOException
    • clone

      public SWEData clone()
      Description copied from interface: DataComponent
      Get a full recursive copy of this component. Both structure and data are copied
      Specified by:
      clone in interface DataComponent
      Overrides:
      clone in class AbstractDataComponentImpl
      Returns:
      clone of this component, including sub-components
    • setElementType

      public void setElementType(DataComponent elementType)
      Specified by:
      setElementType in interface IDataConsumer
    • getNumElements

      public int getNumElements()
      Specified by:
      getNumElements in interface IDataProvider