Package org.vast.swe
Class SWEData
- All Implemented Interfaces:
Serializable
,HasCopy
,AbstractSWE
,AbstractSWEIdentifiable
,BlockComponent
,DataArray
,DataComponent
,IDataConsumer
,IDataProvider
,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 Summary
FieldsFields inherited from class org.vast.data.DataList
blockIterator
Fields inherited from class org.vast.data.AbstractArrayImpl
elementCount, elementType, ELT_COUNT_NAME, encoding, implicitElementCount, values
Fields inherited from class org.vast.data.AbstractDataComponentImpl
dataBlock, definition, encodingInfo, INDENT, MAX_ARRAY_ERRORS, optional, parent, scalarCount, updatable
Fields inherited from class org.vast.data.AbstractSWEIdentifiableImpl
description, identifier, label
Fields inherited from class org.vast.data.AbstractSWEImpl
extensionList, id
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Get a full recursive copy of this component.copy()
Return a structural copy of this component The copy is done recursively, but only the structure is copied (not the data)Retrieves parser created for this SWE structure/encoding pair Allows the use of the parser on a separate input streams w/ same structureRetrieves writer created for this structure/encoding pair Allows the use of the writer on separate output streamsint
void
Parses data from the internally stored data source stream and stores data blocks in a DataListvoid
parseData
(DataSource dataSource) Parses data from the given data source stream and stores data blocks in the DataListvoid
pushNextDataBlock
(DataBlock dataBlock) void
setDataSource
(DataSource dataSource) void
setElementType
(DataComponent elementType) void
Writes data blocks to the data stream specifiedMethods inherited from class org.vast.data.DataList
accept, addData, checkIndex, clearData, createDataBlock, getComponent, getComponent, getComponentCount, getComponentIndex, hasNext, nextComponent, nextDataBlock, resetIterator, setData, toString, updateAtomCount, updateSize, updateSize, updateStartIndex, validateData
Methods inherited from class org.vast.data.AbstractArrayImpl
addComponent, copyTo, getArraySizeComponent, getElementCount, getElementCountProperty, getElementType, getElementTypeProperty, getEncoding, getValues, hasConstraints, isImplicitSize, isSetEncoding, isSetValues, isVariableSize, removeComponent, removeComponent, setElementCount, setElementType, setEncoding, setValues, setVariableSizeComponent
Methods inherited from class org.vast.data.AbstractDataComponentImpl
assignNewDataBlock, copyTo, getData, getDefinition, getEncodingInfo, getName, getOptional, getParent, getUpdatable, hasData, isSetDefinition, isSetOptional, isSetUpdatable, renewDataBlock, setDefinition, setEncodingInfo, setName, setOptional, setParent, setUpdatable, toString, unSetOptional, unSetUpdatable
Methods inherited from class org.vast.data.AbstractSWEIdentifiableImpl
copyTo, getDescription, getIdentifier, getLabel, isSetDescription, isSetIdentifier, isSetLabel, setDescription, setIdentifier, setLabel
Methods inherited from class org.vast.data.AbstractSWEImpl
addExtension, copyTo, getExtensionList, getId, getNumExtensions, isSetId, setId
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.opengis.swe.v20.AbstractSWE
addExtension, getExtensionList, getId, getNumExtensions, isSetId, setId
Methods inherited from interface net.opengis.swe.v20.AbstractSWEIdentifiable
getDescription, getIdentifier, getLabel, isSetDescription, isSetIdentifier, isSetLabel, setDescription, setIdentifier, setLabel
Methods inherited from interface net.opengis.swe.v20.BlockComponent
getElementCount, getElementCountProperty, getElementType, getElementTypeProperty, getEncoding, getValues, isSetEncoding, isSetValues, setElementType, setEncoding, setValues
Methods inherited from interface net.opengis.swe.v20.DataArray
getArraySizeComponent, isImplicitSize, isVariableSize, setElementCount
Methods inherited from interface net.opengis.swe.v20.DataComponent
addComponent, assignNewDataBlock, getData, getDefinition, getName, getOptional, getParent, getUpdatable, hasConstraints, hasData, isSetDefinition, isSetOptional, isSetUpdatable, removeComponent, removeComponent, renewDataBlock, setDefinition, setName, setOptional, setUpdatable, unSetOptional, unSetUpdatable
Methods inherited from interface org.vast.cdm.common.IDataProvider
getElementType
Methods inherited from interface org.vast.swe.ISweInputDataStream
getEncoding
Methods inherited from interface org.vast.swe.ISweOutputDataStream
setEncoding
-
Field Details
-
dataSource
-
-
Constructor Details
-
SWEData
public SWEData()
-
-
Method Details
-
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) -
getNextElement
- Specified by:
getNextElement
in interfaceIDataProvider
-
getNextDataBlock
- Specified by:
getNextDataBlock
in interfaceIDataProvider
-
pushNextDataBlock
- Specified by:
pushNextDataBlock
in interfaceIDataConsumer
-
getDataSource
-
setDataSource
-
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
Retrieves writer created for this structure/encoding pair Allows the use of the writer on separate output streams- Returns:
- writer instance
-
parseData
Parses data from the internally stored data source stream and stores data blocks in a DataList- Throws:
IOException
-
parseData
Parses data from the given data source stream and stores data blocks in the DataList- Parameters:
dataSource
-- Throws:
IOException
-
writeData
Writes data blocks to the data stream specified- Parameters:
dataSink
-- Throws:
IOException
-
clone
Description copied from interface:DataComponent
Get a full recursive copy of this component. Both structure and data are copied- Specified by:
clone
in interfaceDataComponent
- Overrides:
clone
in classAbstractDataComponentImpl
- Returns:
- clone of this component, including sub-components
-
setElementType
- Specified by:
setElementType
in interfaceIDataConsumer
-
getNumElements
public int getNumElements()- Specified by:
getNumElements
in interfaceIDataProvider
-