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, 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 TypeMethodDescriptionvoid
accept
(DataComponentVisitor visitor) final void
protected void
checkIndex
(int index) Check that the integer index given is in range: 0 to size of array - 1void
Clear 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 nameint
Returns number of sub-components in this componentint
getComponentIndex
(String name) Get the index of the sub-component registered with this nameboolean
hasNext()
void
void
Assign a new datablock to this component.Returns String representation of this DataContainerprotected void
updateAtomCount
(int childOffsetCount) Update this component's datablock atomCount (for resizable array support).void
Updates the size of the array (and corresponding data block if set) using the size value set in the size componentvoid
updateSize
(int arraySize) Updates the size of the array (and corresponding data block if set) to the given size.protected void
updateStartIndex
(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 DataBlockvoid
validateData
(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, setVariableSizeComponent
Methods 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, 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, 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: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 interfaceDataArray
- Specified by:
copy
in interfaceDataComponent
- Specified by:
copy
in interfaceHasCopy
- Specified by:
copy
in classAbstractArrayImpl
- Returns:
- copy of this component, including sub-components
-
updateStartIndex
protected void updateStartIndex(int startIndex) Description copied from class:AbstractDataComponentImpl
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 DataBlock- Specified by:
updateStartIndex
in classAbstractDataComponentImpl
-
updateAtomCount
protected void updateAtomCount(int childOffsetCount) Description copied from class:AbstractDataComponentImpl
Update 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:
updateAtomCount
in classAbstractDataComponentImpl
-
getComponent
Description copied from interface:DataComponent
Get the sub-component located at the specified index- Specified by:
getComponent
in interfaceDataComponent
- Specified by:
getComponent
in 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:DataComponent
Assign a new datablock to this component. This will recursively assign the right datablocks to sub-components recursively.- Specified by:
setData
in interfaceDataComponent
- Specified by:
setData
in classAbstractDataComponentImpl
-
clearData
public void clearData()Description copied from interface:DataComponent
Clear the datablock used by this component. This will also clear data from all the sub-components recursively.- Specified by:
clearData
in interfaceDataComponent
- Specified by:
clearData
in classAbstractDataComponentImpl
-
validateData
Description copied from interface:DataComponent
Validates datablock against constraints if any. No exceptions are thrown, rather they are appended to the provided list.- Specified by:
validateData
in interfaceDataComponent
- Specified by:
validateData
in classAbstractDataComponentImpl
- Parameters:
errorList
- list to which validation exceptions will be appended
-
addData
-
createDataBlock
Description copied from interface:DataComponent
Create a new datablock for holding data of this component- Specified by:
createDataBlock
in interfaceDataComponent
- Specified by:
createDataBlock
in 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:DataComponent
Returns number of sub-components in this component- Specified by:
getComponentCount
in interfaceDataComponent
- Specified by:
getComponentCount
in classAbstractDataComponentImpl
- Returns:
- number of direct sub-components
-
toString
Description copied from class:AbstractDataComponentImpl
Returns String representation of this DataContainer- Specified by:
toString
in classAbstractDataComponentImpl
- Parameters:
indent
- int- Returns:
- String
-
getComponentIndex
Description copied from interface:DataComponent
Get the index of the sub-component registered with this name- Specified by:
getComponentIndex
in interfaceDataComponent
- Specified by:
getComponentIndex
in 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:DataComponent
Get the sub-component registered with the specified name- Specified by:
getComponent
in interfaceDataComponent
- Specified by:
getComponent
in 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:DataArray
Updates the size of the array (and corresponding data block if set) using the size value set in the size component- Specified by:
updateSize
in interfaceDataArray
-
updateSize
public void updateSize(int arraySize) Description copied from interface:DataArray
Updates 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:
updateSize
in interfaceDataArray
- Parameters:
arraySize
- new array size
-
accept
- Specified by:
accept
in interfaceDataComponent
-