public abstract class AbstractDataComponentImpl extends AbstractSWEIdentifiableImpl implements DataComponent, Serializable
Abstract DataComponent base
Modifier and Type | Field and Description |
---|---|
protected AbstractDataBlock |
dataBlock |
protected String |
definition |
protected BinaryMember |
encodingInfo |
protected static String |
INDENT |
static int |
MAX_ARRAY_ERRORS |
protected Boolean |
optional |
protected AbstractDataComponentImpl |
parent |
protected int |
scalarCount |
protected Boolean |
updatable |
description, identifier, label
extensionList, id
Constructor and Description |
---|
AbstractDataComponentImpl() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addComponent(String name,
DataComponent component)
Add a sub-component and registers a name for it
|
void |
assignNewDataBlock()
Create and assign a new datablock structure to this component.
|
abstract void |
clearData()
Clear the datablock used by this component.
|
AbstractDataComponentImpl |
clone()
Get a full recursive copy of this component.
|
abstract AbstractDataComponentImpl |
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(AbstractDataComponentImpl other) |
abstract AbstractDataBlock |
createDataBlock()
Create a new datablock for holding data of this component
|
abstract AbstractDataComponentImpl |
getComponent(int index)
Get the sub-component located at the specified index
|
abstract AbstractDataComponentImpl |
getComponent(String name)
Get the sub-component registered with the specified name
|
abstract int |
getComponentCount()
Returns number of sub-components in this component
|
abstract int |
getComponentIndex(String name)
Get the index of the sub-component registered with this name
|
DataBlock |
getData()
Get the datablock associated to this component
|
String |
getDefinition()
Gets the definition property
|
BinaryMember |
getEncodingInfo() |
String |
getName() |
boolean |
getOptional()
Gets the optional property
|
AbstractDataComponentImpl |
getParent() |
boolean |
getUpdatable()
Gets the updatable property
|
abstract boolean |
hasConstraints()
Recursively checks if constraints are specified in this component or
any of its sub-components
|
boolean |
isSetDefinition()
Checks if definition is set
|
boolean |
isSetOptional()
Checks if optional is set
|
boolean |
isSetUpdatable()
Checks if updatable is set
|
void |
renewDataBlock()
Renew the datablock of this component by cloning it.
|
abstract void |
setData(DataBlock dataBlock)
Assign a new datablock to this component.
|
void |
setDefinition(String definition)
Sets the definition property
|
void |
setEncodingInfo(BinaryMember encodingInfo) |
void |
setName(String name)
Sets the name of this component
|
void |
setOptional(boolean optional)
Sets the optional property
|
protected void |
setParent(AbstractDataComponentImpl parent) |
void |
setUpdatable(boolean updatable)
Sets the updatable property
|
String |
toString() |
abstract String |
toString(String indent)
Returns String representation of this DataContainer
|
void |
unSetOptional()
Unsets the optional property
|
void |
unSetUpdatable()
Unsets the updatable property
|
protected abstract void |
updateAtomCount(int childOffsetCount)
Update datablock atomCount (for resizable array support)
Needed to update atom count info in all parents of a
DataArray that has been resized!
|
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
|
abstract void |
validateData(List<ValidationException> errorList)
Validates dataBlock against constraints if any.
|
copyTo, getDescription, getIdentifier, getLabel, isSetDescription, isSetIdentifier, isSetLabel, setDescription, setIdentifier, setLabel
addExtension, copyTo, getExtensionList, getId, getNumExtensions, isSetId, setId
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
accept, removeComponent, removeComponent
getDescription, getIdentifier, getLabel, isSetDescription, isSetIdentifier, isSetLabel, setDescription, setIdentifier, setLabel
addExtension, getExtensionList, getId, getNumExtensions, isSetId, setId
public static int MAX_ARRAY_ERRORS
protected static final String INDENT
protected Boolean updatable
protected Boolean optional
protected String definition
protected AbstractDataComponentImpl parent
protected AbstractDataBlock dataBlock
protected int scalarCount
protected BinaryMember encodingInfo
public abstract AbstractDataComponentImpl copy()
DataComponent
copy
in interface HasCopy
copy
in interface DataComponent
protected void copyTo(AbstractDataComponentImpl other)
public AbstractDataComponentImpl clone()
DataComponent
clone
in interface DataComponent
clone
in class Object
public final AbstractDataComponentImpl getParent()
getParent
in interface DataComponent
protected final void setParent(AbstractDataComponentImpl parent)
public abstract void addComponent(String name, DataComponent component)
DataComponent
addComponent
in interface DataComponent
name
- name of component to usecomponent
- new sub-component to append to this componentpublic abstract AbstractDataComponentImpl getComponent(int index)
DataComponent
getComponent
in interface DataComponent
index
- index of component to lookuppublic abstract int getComponentIndex(String name)
DataComponent
getComponentIndex
in interface DataComponent
name
- name of component to lookuppublic abstract AbstractDataComponentImpl getComponent(String name)
DataComponent
getComponent
in interface DataComponent
name
- name of component to lookuppublic abstract int getComponentCount()
DataComponent
getComponentCount
in interface DataComponent
public abstract AbstractDataBlock createDataBlock()
DataComponent
createDataBlock
in interface DataComponent
public void assignNewDataBlock()
DataComponent
assignNewDataBlock
in interface DataComponent
public void renewDataBlock()
DataComponent
renewDataBlock
in interface DataComponent
public DataBlock getData()
DataComponent
getData
in interface DataComponent
public abstract void setData(DataBlock dataBlock)
DataComponent
setData
in interface DataComponent
public abstract void clearData()
DataComponent
clearData
in interface DataComponent
public abstract void validateData(List<ValidationException> errorList)
DataComponent
validateData
in interface DataComponent
errorList
- list to which validation exceptions will be appendedpublic abstract boolean hasConstraints()
DataComponent
hasConstraints
in interface DataComponent
protected abstract void updateStartIndex(int startIndex)
startIndex
- protected abstract void updateAtomCount(int childOffsetCount)
startIndex
- public abstract String toString(String indent)
indent
- intpublic boolean getUpdatable()
getUpdatable
in interface DataComponent
public boolean isSetUpdatable()
isSetUpdatable
in interface DataComponent
public void setUpdatable(boolean updatable)
setUpdatable
in interface DataComponent
public void unSetUpdatable()
unSetUpdatable
in interface DataComponent
public boolean getOptional()
getOptional
in interface DataComponent
public boolean isSetOptional()
isSetOptional
in interface DataComponent
public void setOptional(boolean optional)
setOptional
in interface DataComponent
public void unSetOptional()
unSetOptional
in interface DataComponent
public String getDefinition()
getDefinition
in interface DataComponent
public boolean isSetDefinition()
isSetDefinition
in interface DataComponent
public void setDefinition(String definition)
setDefinition
in interface DataComponent
definition
- definition URIpublic String getName()
getName
in interface DataComponent
public void setName(String name)
DataComponent
setName
in interface DataComponent
public BinaryMember getEncodingInfo()
public void setEncodingInfo(BinaryMember encodingInfo)
Copyright © 2016 Sensia Software LLC. All rights reserved.