Package org.vast.data
Class AbstractDataComponentImpl
java.lang.Object
org.vast.data.AbstractSWEImpl
org.vast.data.AbstractSWEIdentifiableImpl
org.vast.data.AbstractDataComponentImpl
- All Implemented Interfaces:
 Serializable,HasCopy,AbstractSWE,AbstractSWEIdentifiable,DataComponent
- Direct Known Subclasses:
 AbstractArrayImpl,AbstractRecordImpl,AbstractSimpleComponentImpl,DataChoiceImpl
public abstract class AbstractDataComponentImpl
extends AbstractSWEIdentifiableImpl
implements DataComponent
Abstract DataComponent base
- See Also:
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AbstractDataBlockprotected Stringprotected BinaryMemberprotected static final Stringstatic final intprotected Booleanprotected AbstractDataComponentImplprotected intprotected BooleanFields 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 TypeMethodDescriptionabstract voidaddComponent(String name, DataComponent component) Add a sub-component and registers a name for itvoidCreate and assign a new datablock structure to this component.abstract voidClear the datablock used by this component.clone()Get a full recursive copy of this component.abstract AbstractDataComponentImplcopy()Return a structural copy of this component The copy is done recursively, but only the structure is copied (not the data)protected voidcopyTo(AbstractDataComponentImpl other) abstract AbstractDataBlockCreate a new datablock for holding data of this componentabstract AbstractDataComponentImplgetComponent(int index) Get the sub-component located at the specified indexabstract AbstractDataComponentImplgetComponent(String name) Get the sub-component registered with the specified nameabstract intReturns number of sub-components in this componentabstract intgetComponentIndex(String name) Get the index of the sub-component registered with this namegetData()Get the datablock associated to this componentGets the definition propertygetName()booleanGets the optional propertybooleanGets the updatable propertyabstract booleanRecursively checks if constraints are specified in this component or any of its sub-componentsbooleanhasData()booleanChecks if definition is setbooleanChecks if optional is setbooleanChecks if updatable is setvoidRenew the datablock of this component.abstract voidAssign a new datablock to this component.voidsetDefinition(String definition) Sets the definition propertyvoidsetEncodingInfo(BinaryMember encodingInfo) voidSets the name of this componentvoidsetOptional(boolean optional) Sets the optional propertyprotected final voidsetParent(AbstractDataComponentImpl parent) voidsetUpdatable(boolean updatable) Sets the updatable propertytoString()abstract StringReturns String representation of this DataContainervoidUnsets the optional propertyvoidUnsets the updatable propertyprotected abstract voidupdateAtomCount(int childOffsetCount) Update this component's datablock atomCount (for resizable array support).protected abstract 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 DataBlockabstract voidvalidateData(List<ValidationException> errorList) Validates datablock against constraints if any.Methods 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.DataComponent
accept, removeComponent, removeComponent 
- 
Field Details
- 
MAX_ARRAY_ERRORS
public static final int MAX_ARRAY_ERRORS- See Also:
 
 - 
INDENT
- See Also:
 
 - 
updatable
 - 
optional
 - 
definition
 - 
parent
 - 
dataBlock
 - 
scalarCount
protected int scalarCount - 
encodingInfo
 
 - 
 - 
Constructor Details
- 
AbstractDataComponentImpl
public AbstractDataComponentImpl() 
 - 
 - 
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 interfaceDataComponent- Specified by:
 copyin interfaceHasCopy- Returns:
 - copy of this component, including sub-components
 
 - 
copyTo
 - 
clone
Description copied from interface:DataComponentGet a full recursive copy of this component. Both structure and data are copied- Specified by:
 clonein interfaceDataComponent- Overrides:
 clonein classObject- Returns:
 - clone of this component, including sub-components
 
 - 
getParent
- Specified by:
 getParentin interfaceDataComponent- Returns:
 - parent component of this component
 
 - 
setParent
 - 
addComponent
Description copied from interface:DataComponentAdd a sub-component and registers a name for it- Specified by:
 addComponentin interfaceDataComponent- Parameters:
 name- name of component to usecomponent- new sub-component to append to this component
 - 
getComponent
Description copied from interface:DataComponentGet the sub-component located at the specified index- Specified by:
 getComponentin interfaceDataComponent- Parameters:
 index- index of component to lookup- Returns:
 - child component or null if none exists at the specified index
 
 - 
getComponentIndex
Description copied from interface:DataComponentGet the index of the sub-component registered with this name- Specified by:
 getComponentIndexin interfaceDataComponent- 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- Parameters:
 name- name of component to lookup- Returns:
 - child component or null if none exists with the specified name
 
 - 
getComponentCount
public abstract int getComponentCount()Description copied from interface:DataComponentReturns number of sub-components in this component- Specified by:
 getComponentCountin interfaceDataComponent- Returns:
 - number of direct sub-components
 
 - 
createDataBlock
Description copied from interface:DataComponentCreate a new datablock for holding data of this component- Specified by:
 createDataBlockin interfaceDataComponent- Returns:
 - new datablock object
 
 - 
assignNewDataBlock
public void assignNewDataBlock()Description copied from interface:DataComponentCreate and assign a new datablock structure to this component. This will also assign the right datablocks to sub-components recursively.- Specified by:
 assignNewDataBlockin interfaceDataComponent
 - 
renewDataBlock
public void renewDataBlock()Description copied from interface:DataComponentRenew the datablock of this component. This method is faster than recreating a datablock from scratch with createDataBlock().- Specified by:
 renewDataBlockin interfaceDataComponent
 - 
hasData
public boolean hasData()- Specified by:
 hasDatain interfaceDataComponent- Returns:
 - true if a datablock is associated to this component
 
 - 
getData
Description copied from interface:DataComponentGet the datablock associated to this component- Specified by:
 getDatain interfaceDataComponent- Returns:
 - datablock object or null if none has been generated yet
 
 - 
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
 - 
clearData
public abstract 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
 - 
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- Parameters:
 errorList- list to which validation exceptions will be appended
 - 
hasConstraints
public abstract 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- Returns:
 - true if at least one constraint is found, false otherwise
 
 - 
updateStartIndex
protected abstract 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 DataBlock- Parameters:
 startIndex-
 - 
updateAtomCount
protected abstract void updateAtomCount(int childOffsetCount) 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- Parameters:
 startIndex-
 - 
toString
Returns String representation of this DataContainer- Parameters:
 indent- int- Returns:
 - String
 
 - 
toString
 - 
getUpdatable
public boolean getUpdatable()Gets the updatable property- Specified by:
 getUpdatablein interfaceDataComponent- Returns:
 - true if component can be updated dynamically
 
 - 
isSetUpdatable
public boolean isSetUpdatable()Checks if updatable is set- Specified by:
 isSetUpdatablein interfaceDataComponent- Returns:
 - true if the updatable attribute is set
 
 - 
setUpdatable
public void setUpdatable(boolean updatable) Sets the updatable property- Specified by:
 setUpdatablein interfaceDataComponent
 - 
unSetUpdatable
public void unSetUpdatable()Unsets the updatable property- Specified by:
 unSetUpdatablein interfaceDataComponent
 - 
getOptional
public boolean getOptional()Gets the optional property- Specified by:
 getOptionalin interfaceDataComponent- Returns:
 - true if component value is optional in the stream
 
 - 
isSetOptional
public boolean isSetOptional()Checks if optional is set- Specified by:
 isSetOptionalin interfaceDataComponent- Returns:
 - true if the optional attribute is set
 
 - 
setOptional
public void setOptional(boolean optional) Sets the optional property- Specified by:
 setOptionalin interfaceDataComponent
 - 
unSetOptional
public void unSetOptional()Unsets the optional property- Specified by:
 unSetOptionalin interfaceDataComponent
 - 
getDefinition
Gets the definition property- Specified by:
 getDefinitionin interfaceDataComponent- Returns:
 - definition URI
 
 - 
isSetDefinition
public boolean isSetDefinition()Checks if definition is set- Specified by:
 isSetDefinitionin interfaceDataComponent- Returns:
 - true if the definition attribute is set
 
 - 
setDefinition
Sets the definition property- Specified by:
 setDefinitionin interfaceDataComponent- Parameters:
 definition- definition URI
 - 
getName
- Specified by:
 getNamein interfaceDataComponent- Returns:
 - name of sub-component
 
 - 
setName
Description copied from interface:DataComponentSets the name of this component- Specified by:
 setNamein interfaceDataComponent
 - 
getEncodingInfo
 - 
setEncodingInfo
 
 -