Package org.vast.data
Class AbstractArrayImpl
java.lang.Object
org.vast.data.AbstractSWEImpl
org.vast.data.AbstractSWEIdentifiableImpl
org.vast.data.AbstractDataComponentImpl
org.vast.data.AbstractArrayImpl
- All Implemented Interfaces:
Serializable
,HasCopy
,AbstractSWE
,AbstractSWEIdentifiable
,BlockComponent
,DataArray
,DataComponent
- Direct Known Subclasses:
DataArrayImpl
,DataList
public abstract class AbstractArrayImpl
extends AbstractDataComponentImpl
implements DataArray, BlockComponent
Provides common methods for all implementations of block components
- Since:
- Nov 10, 2014
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected OgcPropertyImpl<Count>
protected OgcPropertyImpl<DataComponent>
static final String
protected DataEncoding
protected CountImpl
protected EncodedValues
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
addComponent
(String name, DataComponent component) Add a sub-component and registers a name for itabstract AbstractArrayImpl
copy()
Return a structural copy of this component The copy is done recursively, but only the structure is copied (not the data)protected void
copyTo
(AbstractArrayImpl other) final Count
Gets the array size component whether the array has fixed, implicit or variable size.Gets the elementCount propertyGets extra info (name, xlink, etc.) carried by the elementCount propertyGets the elementType propertyGets extra info (name, xlink, etc.) carried by the elementType propertyGets the encoding propertyGets the values propertyboolean
Recursively checks if constraints are specified in this component or any of its sub-componentsfinal boolean
boolean
Checks if encoding is setboolean
Checks if values is setfinal boolean
removeComponent
(int index) Remove the sub-component at the specified indexremoveComponent
(String name) Remove sub-component with the specified namevoid
setElementCount
(Count elementCount) Sets the elementCount property
If the Count object has a parent, it will used as an external variable size componentvoid
setElementType
(String name, DataComponent component) Sets the elementType propertyvoid
setEncoding
(DataEncoding encoding) Sets the encoding propertyvoid
setValues
(EncodedValues values) Sets the values propertyprotected void
setVariableSizeComponent
(Count sizeComponent) Sets the size component to use (for variable size array).Methods inherited from class org.vast.data.AbstractDataComponentImpl
assignNewDataBlock, clearData, clone, copyTo, createDataBlock, getComponent, getComponent, getComponentCount, getComponentIndex, getData, getDefinition, getEncodingInfo, getName, getOptional, getParent, getUpdatable, hasData, isSetDefinition, isSetOptional, isSetUpdatable, renewDataBlock, setData, setDefinition, setEncodingInfo, setName, setOptional, setParent, setUpdatable, toString, toString, unSetOptional, unSetUpdatable, updateAtomCount, updateStartIndex, validateData
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.DataArray
updateSize, updateSize
Methods inherited from interface net.opengis.swe.v20.DataComponent
accept, assignNewDataBlock, clearData, clone, createDataBlock, getComponent, getComponent, getComponentCount, getComponentIndex, getData, getDefinition, getName, getOptional, getParent, getUpdatable, hasData, isSetDefinition, isSetOptional, isSetUpdatable, renewDataBlock, setData, setDefinition, setName, setOptional, setUpdatable, unSetOptional, unSetUpdatable, validateData
-
Field Details
-
ELT_COUNT_NAME
- See Also:
-
elementCount
-
elementType
-
encoding
-
values
-
implicitElementCount
-
-
Constructor Details
-
AbstractArrayImpl
public AbstractArrayImpl()
-
-
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 classAbstractDataComponentImpl
- Returns:
- copy of this component, including sub-components
-
copyTo
-
addComponent
Description copied from interface:DataComponent
Add a sub-component and registers a name for it- Specified by:
addComponent
in interfaceDataComponent
- Specified by:
addComponent
in classAbstractDataComponentImpl
- Parameters:
name
- name of component to usecomponent
- new sub-component to append to this component
-
removeComponent
Description copied from interface:DataComponent
Remove the sub-component at the specified index- Specified by:
removeComponent
in interfaceDataComponent
- Returns:
- the component that was just removed
-
removeComponent
Description copied from interface:DataComponent
Remove sub-component with the specified name- Specified by:
removeComponent
in interfaceDataComponent
- Returns:
- the component that was just removed
-
hasConstraints
public boolean hasConstraints()Description copied from interface:DataComponent
Recursively checks if constraints are specified in this component or any of its sub-components- Specified by:
hasConstraints
in interfaceDataComponent
- Specified by:
hasConstraints
in classAbstractDataComponentImpl
- Returns:
- true if at least one constraint is found, false otherwise
-
isVariableSize
public final boolean isVariableSize()- Specified by:
isVariableSize
in interfaceDataArray
- Returns:
- true if array has variable size
-
isImplicitSize
public final boolean isImplicitSize()- Specified by:
isImplicitSize
in interfaceDataArray
- Returns:
- true if array has implicit variable size (i.e. the size is not specified by any component but will be included implicitely in a stream right before the array data).
-
getElementCount
Gets the elementCount property- Specified by:
getElementCount
in interfaceBlockComponent
-
getElementCountProperty
Gets extra info (name, xlink, etc.) carried by the elementCount property- Specified by:
getElementCountProperty
in interfaceBlockComponent
-
setElementCount
Sets the elementCount property
If the Count object has a parent, it will used as an external variable size component- Specified by:
setElementCount
in interfaceBlockComponent
- Specified by:
setElementCount
in interfaceDataArray
-
setVariableSizeComponent
Sets the size component to use (for variable size array). The component must have an id and exist up the data component tree- Parameters:
sizeComponent
- Count component to obtain array size from
-
getArraySizeComponent
Description copied from interface:DataArray
Gets the array size component whether the array has fixed, implicit or variable size.- Specified by:
getArraySizeComponent
in interfaceDataArray
- Returns:
- the Count component that contains the array size value
-
getElementType
Gets the elementType property- Specified by:
getElementType
in interfaceBlockComponent
-
getElementTypeProperty
Description copied from interface:BlockComponent
Gets extra info (name, xlink, etc.) carried by the elementType property- Specified by:
getElementTypeProperty
in interfaceBlockComponent
-
setElementType
Sets the elementType property- Specified by:
setElementType
in interfaceBlockComponent
-
getEncoding
Gets the encoding property- Specified by:
getEncoding
in interfaceBlockComponent
-
isSetEncoding
public boolean isSetEncoding()Checks if encoding is set- Specified by:
isSetEncoding
in interfaceBlockComponent
-
setEncoding
Sets the encoding property- Specified by:
setEncoding
in interfaceBlockComponent
-
getValues
Gets the values property- Specified by:
getValues
in interfaceBlockComponent
-
isSetValues
public boolean isSetValues()Checks if values is set- Specified by:
isSetValues
in interfaceBlockComponent
-
setValues
Sets the values property- Specified by:
setValues
in interfaceBlockComponent
-