Package org.vast.data
Class DataList
- All Implemented Interfaces:
Serializable,HasCopy,AbstractSWE,AbstractSWEIdentifiable,BlockComponent,DataArray,DataComponent
- Direct Known Subclasses:
SWEData
Growable List of identical DataComponents. Each new cluster of data must comply to the DataList component structure. Data clusters are stored using a DataBlockList so that data can be added and removed in real time. 11-2014: Updated to implement new API autogenerated from XML schema
- See Also:
-
Field Summary
FieldsFields inherited from class org.vast.data.AbstractArrayImpl
elementCount, elementType, ELT_COUNT_NAME, encoding, implicitElementCount, valuesFields inherited from class org.vast.data.AbstractDataComponentImpl
dataBlock, definition, encodingInfo, INDENT, MAX_ARRAY_ERRORS, optional, parent, scalarCount, updatableFields inherited from class org.vast.data.AbstractSWEIdentifiableImpl
description, identifier, labelFields inherited from class org.vast.data.AbstractSWEImpl
extensionList, id -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(DataComponentVisitor visitor) final voidprotected voidcheckIndex(int index) Check that the integer index given is in range: 0 to size of array - 1voidClear the datablock used by this component.copy()Return a structural copy of this component The copy is done recursively, but only the structure is copied (not the data)Create a new datablock for holding data of this componentgetComponent(int index) Get the sub-component located at the specified indexgetComponent(String name) Get the sub-component registered with the specified nameintReturns number of sub-components in this componentintgetComponentIndex(String name) Get the index of the sub-component registered with this namebooleanhasNext()voidvoidAssign a new datablock to this component.Returns String representation of this DataContainerprotected voidupdateAtomCount(int childOffsetCount) Update this component's datablock atomCount (for resizable array support).voidUpdates the size of the array (and corresponding data block if set) using the size value set in the size componentvoidupdateSize(int arraySize) Updates the size of the array (and corresponding data block if set) to the given size.protected voidupdateStartIndex(int startIndex) Update datablock start index (for array support) Needed when data is selected by DataArray getComponent(int) and the DataArray is using a parallel or primitive DataBlockvoidvalidateData(List<ValidationException> errorList) Validates datablock against constraints if any.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, setVariableSizeComponentMethods inherited from class org.vast.data.AbstractDataComponentImpl
assignNewDataBlock, clone, copyTo, getData, getDefinition, getEncodingInfo, getName, getOptional, getParent, getUpdatable, hasData, isSetDefinition, isSetOptional, isSetUpdatable, renewDataBlock, setDefinition, setEncodingInfo, setName, setOptional, setParent, setUpdatable, toString, unSetOptional, unSetUpdatableMethods inherited from class org.vast.data.AbstractSWEIdentifiableImpl
copyTo, getDescription, getIdentifier, getLabel, isSetDescription, isSetIdentifier, isSetLabel, setDescription, setIdentifier, setLabelMethods inherited from class org.vast.data.AbstractSWEImpl
addExtension, copyTo, getExtensionList, getId, getNumExtensions, isSetId, setIdMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.opengis.swe.v20.AbstractSWE
addExtension, getExtensionList, getId, getNumExtensions, isSetId, setIdMethods inherited from interface net.opengis.swe.v20.AbstractSWEIdentifiable
getDescription, getIdentifier, getLabel, isSetDescription, isSetIdentifier, isSetLabel, setDescription, setIdentifier, setLabelMethods inherited from interface net.opengis.swe.v20.BlockComponent
getElementCount, getElementCountProperty, getElementType, getElementTypeProperty, getEncoding, getValues, isSetEncoding, isSetValues, setElementType, setEncoding, setValuesMethods inherited from interface net.opengis.swe.v20.DataArray
getArraySizeComponent, isImplicitSize, isVariableSize, setElementCountMethods inherited from interface net.opengis.swe.v20.DataComponent
addComponent, assignNewDataBlock, clone, getData, getDefinition, getName, getOptional, getParent, getUpdatable, hasConstraints, hasData, isSetDefinition, isSetOptional, isSetUpdatable, removeComponent, removeComponent, renewDataBlock, setDefinition, setName, setOptional, setUpdatable, unSetOptional, unSetUpdatable
-
Field Details
-
blockIterator
-
-
Constructor Details
-
DataList
public DataList() -
DataList
-
-
Method Details
-
copy
Description copied from interface:DataComponentReturn a structural copy of this component The copy is done recursively, but only the structure is copied (not the data)- Specified by:
copyin interfaceDataArray- Specified by:
copyin interfaceDataComponent- Specified by:
copyin interfaceHasCopy- Specified by:
copyin classAbstractArrayImpl- Returns:
- copy of this component, including sub-components
-
updateStartIndex
protected void updateStartIndex(int startIndex) Description copied from class:AbstractDataComponentImplUpdate datablock start index (for array support) Needed when data is selected by DataArray getComponent(int) and the DataArray is using a parallel or primitive DataBlock- Specified by:
updateStartIndexin classAbstractDataComponentImpl
-
updateAtomCount
protected void updateAtomCount(int childOffsetCount) Description copied from class:AbstractDataComponentImplUpdate this component's datablock atomCount (for resizable array support). This is called by child components to notify parents that a variable size DataArray has been resized- Specified by:
updateAtomCountin classAbstractDataComponentImpl
-
getComponent
Description copied from interface:DataComponentGet the sub-component located at the specified index- Specified by:
getComponentin interfaceDataComponent- Specified by:
getComponentin classAbstractDataComponentImpl- Parameters:
index- index of component to lookup- Returns:
- child component or null if none exists at the specified index
-
resetIterator
public void resetIterator() -
hasNext
public boolean hasNext() -
nextComponent
-
nextDataBlock
-
setData
Description copied from interface:DataComponentAssign a new datablock to this component. This will recursively assign the right datablocks to sub-components recursively.- Specified by:
setDatain interfaceDataComponent- Specified by:
setDatain classAbstractDataComponentImpl
-
clearData
public void clearData()Description copied from interface:DataComponentClear the datablock used by this component. This will also clear data from all the sub-components recursively.- Specified by:
clearDatain interfaceDataComponent- Specified by:
clearDatain classAbstractDataComponentImpl
-
validateData
Description copied from interface:DataComponentValidates datablock against constraints if any. No exceptions are thrown, rather they are appended to the provided list.- Specified by:
validateDatain interfaceDataComponent- Specified by:
validateDatain classAbstractDataComponentImpl- Parameters:
errorList- list to which validation exceptions will be appended
-
addData
-
createDataBlock
Description copied from interface:DataComponentCreate a new datablock for holding data of this component- Specified by:
createDataBlockin interfaceDataComponent- Specified by:
createDataBlockin classAbstractDataComponentImpl- Returns:
- new datablock object
-
checkIndex
protected void checkIndex(int index) Check that the integer index given is in range: 0 to size of array - 1- Parameters:
index- int- Throws:
IndexOutOfBoundsException
-
getComponentCount
public int getComponentCount()Description copied from interface:DataComponentReturns number of sub-components in this component- Specified by:
getComponentCountin interfaceDataComponent- Specified by:
getComponentCountin classAbstractDataComponentImpl- Returns:
- number of direct sub-components
-
toString
Description copied from class:AbstractDataComponentImplReturns String representation of this DataContainer- Specified by:
toStringin classAbstractDataComponentImpl- Parameters:
indent- int- Returns:
- String
-
getComponentIndex
Description copied from interface:DataComponentGet the index of the sub-component registered with this name- Specified by:
getComponentIndexin interfaceDataComponent- Specified by:
getComponentIndexin classAbstractDataComponentImpl- Parameters:
name- name of component to lookup- Returns:
- index of child component or -1 if none exists with the specified name
-
getComponent
Description copied from interface:DataComponentGet the sub-component registered with the specified name- Specified by:
getComponentin interfaceDataComponent- Specified by:
getComponentin classAbstractDataComponentImpl- Parameters:
name- name of component to lookup- Returns:
- child component or null if none exists with the specified name
-
updateSize
public void updateSize()Description copied from interface:DataArrayUpdates the size of the array (and corresponding data block if set) using the size value set in the size component- Specified by:
updateSizein interfaceDataArray
-
updateSize
public void updateSize(int arraySize) Description copied from interface:DataArrayUpdates the size of the array (and corresponding data block if set) to the given size. If a size component is set, its value is also updated.- Specified by:
updateSizein interfaceDataArray- Parameters:
arraySize- new array size
-
accept
- Specified by:
acceptin interfaceDataComponent
-