Package org.vast.data
Class AbstractRecordImpl<ComponentType extends DataComponent>
java.lang.Object
org.vast.data.AbstractSWEImpl
org.vast.data.AbstractSWEIdentifiableImpl
org.vast.data.AbstractDataComponentImpl
org.vast.data.AbstractRecordImpl<ComponentType>
- All Implemented Interfaces:
 Serializable,HasCopy,AbstractSWE,AbstractSWEIdentifiable,DataComponent
- Direct Known Subclasses:
 DataRecordImpl,VectorImpl
public abstract class AbstractRecordImpl<ComponentType extends DataComponent>
extends AbstractDataComponentImpl
Implementation of an heterogeneous list of data components This is the base type for DataRecord and Vector
- See Also:
 
- 
Field Summary
FieldsFields 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 TypeMethodDescriptionvoidClear the datablock used by this component.voidSpecific to DataRecord and used by ProcessChain Allows to combine child blocks into one mixed block when blocks are coming from different independent sourcesCreate object adapted to carry data for this container TODO could save the calculated structure and do a shallow copy for the nexts...getComponent(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 namebooleanRecursively checks if constraints are specified in this component or any of its sub-componentsremoveComponent(int index) Remove the sub-component at the specified indexremoveComponent(String name) Remove sub-component with the specified namevoidAssign a new datablock to this component.protected voidupdateAtomCount(int childAtomCountDiff) Update this component's datablock atomCount (for resizable array support).voidCall this when some child component data is re-assigned (e.g.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.AbstractDataComponentImpl
addComponent, assignNewDataBlock, clone, copy, copyTo, getData, getDefinition, getEncodingInfo, getName, getOptional, getParent, getUpdatable, hasData, isSetDefinition, isSetOptional, isSetUpdatable, renewDataBlock, setDefinition, setEncodingInfo, setName, setOptional, setParent, setUpdatable, toString, 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.DataComponent
accept 
- 
Field Details
- 
fieldList
 
 - 
 - 
Constructor Details
- 
AbstractRecordImpl
public AbstractRecordImpl() - 
AbstractRecordImpl
public AbstractRecordImpl(int size)  
 - 
 - 
Method Details
- 
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 childAtomCountDiff) 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
 
 - 
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
 
 - 
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
 
 - 
removeComponent
Description copied from interface:DataComponentRemove the sub-component at the specified index- Returns:
 - the component that was just removed
 
 - 
removeComponent
Description copied from interface:DataComponentRemove sub-component with the specified name- Returns:
 - the component that was just removed
 
 - 
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
 - 
createDataBlock
Create object adapted to carry data for this container TODO could save the calculated structure and do a shallow copy for the nexts... Saved copy would be discarded every time the structure changes- Specified by:
 createDataBlockin interfaceDataComponent- Specified by:
 createDataBlockin classAbstractDataComponentImpl- Returns:
 - new datablock object
 
 - 
updateDataBlock
public void updateDataBlock()Call this when some child component data is re-assigned (e.g. variable size array data) - 
combineDataBlocks
public void combineDataBlocks()Specific to DataRecord and used by ProcessChain Allows to combine child blocks into one mixed block when blocks are coming from different independent sources - 
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
 
 - 
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
 
 
 -