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 Stringprotected DataEncodingprotected CountImplprotected EncodedValuesFields 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 TypeMethodDescriptionvoidaddComponent(String name, DataComponent component) Add a sub-component and registers a name for itabstract AbstractArrayImplcopy()Return a structural copy of this component The copy is done recursively, but only the structure is copied (not the data)protected voidcopyTo(AbstractArrayImpl other) final CountGets 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 propertybooleanRecursively checks if constraints are specified in this component or any of its sub-componentsfinal booleanbooleanChecks if encoding is setbooleanChecks if values is setfinal booleanremoveComponent(int index) Remove the sub-component at the specified indexremoveComponent(String name) Remove sub-component with the specified namevoidsetElementCount(Count elementCount) Sets the elementCount property
If the Count object has a parent, it will used as an external variable size componentvoidsetElementType(String name, DataComponent component) Sets the elementType propertyvoidsetEncoding(DataEncoding encoding) Sets the encoding propertyvoidsetValues(EncodedValues values) Sets the values propertyprotected voidsetVariableSizeComponent(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, validateDataMethods 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.DataArray
updateSize, updateSizeMethods 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: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 classAbstractDataComponentImpl- Returns:
- copy of this component, including sub-components
-
copyTo
-
addComponent
Description copied from interface:DataComponentAdd a sub-component and registers a name for it- Specified by:
addComponentin interfaceDataComponent- Specified by:
addComponentin classAbstractDataComponentImpl- Parameters:
name- name of component to usecomponent- new sub-component to append to this component
-
removeComponent
Description copied from interface:DataComponentRemove the sub-component at the specified index- Specified by:
removeComponentin interfaceDataComponent- Returns:
- the component that was just removed
-
removeComponent
Description copied from interface:DataComponentRemove sub-component with the specified name- Specified by:
removeComponentin interfaceDataComponent- Returns:
- the component that was just removed
-
hasConstraints
public boolean hasConstraints()Description copied from interface:DataComponentRecursively checks if constraints are specified in this component or any of its sub-components- Specified by:
hasConstraintsin interfaceDataComponent- Specified by:
hasConstraintsin classAbstractDataComponentImpl- Returns:
- true if at least one constraint is found, false otherwise
-
isVariableSize
public final boolean isVariableSize()- Specified by:
isVariableSizein interfaceDataArray- Returns:
- true if array has variable size
-
isImplicitSize
public final boolean isImplicitSize()- Specified by:
isImplicitSizein 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:
getElementCountin interfaceBlockComponent
-
getElementCountProperty
Gets extra info (name, xlink, etc.) carried by the elementCount property- Specified by:
getElementCountPropertyin interfaceBlockComponent
-
setElementCount
Sets the elementCount property
If the Count object has a parent, it will used as an external variable size component- Specified by:
setElementCountin interfaceBlockComponent- Specified by:
setElementCountin 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:DataArrayGets the array size component whether the array has fixed, implicit or variable size.- Specified by:
getArraySizeComponentin interfaceDataArray- Returns:
- the Count component that contains the array size value
-
getElementType
Gets the elementType property- Specified by:
getElementTypein interfaceBlockComponent
-
getElementTypeProperty
Description copied from interface:BlockComponentGets extra info (name, xlink, etc.) carried by the elementType property- Specified by:
getElementTypePropertyin interfaceBlockComponent
-
setElementType
Sets the elementType property- Specified by:
setElementTypein interfaceBlockComponent
-
getEncoding
Gets the encoding property- Specified by:
getEncodingin interfaceBlockComponent
-
isSetEncoding
public boolean isSetEncoding()Checks if encoding is set- Specified by:
isSetEncodingin interfaceBlockComponent
-
setEncoding
Sets the encoding property- Specified by:
setEncodingin interfaceBlockComponent
-
getValues
Gets the values property- Specified by:
getValuesin interfaceBlockComponent
-
isSetValues
public boolean isSetValues()Checks if values is set- Specified by:
isSetValuesin interfaceBlockComponent
-
setValues
Sets the values property- Specified by:
setValuesin interfaceBlockComponent
-