public class DataList extends AbstractArrayImpl implements DataArray, DataStream, BlockComponent
Growable List of identical DataComponents. Each new cluster of data must comply to the DataList component structure. Data clusters are stored using a DataBlockList so that data can be added and removed in real time. 11-2014: Updated to implement new API autogenerated from XML schema
Modifier and Type | Field and Description |
---|---|
protected ListIterator<DataBlock> |
blockIterator |
protected AbstractDataComponentImpl |
tempComponent |
elementCount, elementType, ELT_COUNT_NAME, encoding, values
dataBlock, definition, encodingInfo, INDENT, MAX_ARRAY_ERRORS, optional, parent, scalarCount, updatable
description, identifier, label
extensionList, id
Modifier and Type | Method and Description |
---|---|
void |
accept(DataComponentVisitor visitor) |
void |
addData(DataBlock dataBlock) |
protected void |
checkIndex(int index)
Check that the integer index given is in range: 0 to size of array - 1
|
void |
clearData()
Clear the datablock used by this component.
|
DataList |
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(DataList other) |
AbstractDataBlock |
createDataBlock()
Create a new datablock for holding data of this component
|
AbstractDataComponentImpl |
getComponent(int index)
Get the sub-component located at the specified index
|
AbstractDataComponentImpl |
getComponent(String name)
Get the sub-component registered with the specified name
|
int |
getComponentCount()
Returns number of sub-components in this component
|
int |
getComponentIndex(String name)
Get the index of the sub-component registered with this name
|
AbstractDataComponentImpl |
getListComponent() |
boolean |
hasNext() |
boolean |
isSetElementCount()
Checks if elementCount is set
|
AbstractDataComponentImpl |
nextComponent() |
DataBlock |
nextDataBlock() |
void |
resetIterator() |
void |
setData(DataBlock dataBlock)
Assign a new datablock to this component.
|
String |
toString(String indent)
Returns String representation of this DataContainer
|
protected 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!
|
void |
updateSize()
Updates the size of the array (and corresponding data block if set)
using the size value set in the size component
|
void |
updateSize(int arraySize)
Updates the size of the array (and corresponding data block if set) to
the given size.
|
protected 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
|
void |
validateData(List<ValidationException> errorList)
Validates dataBlock against constraints if any.
|
addComponent, copyTo, getElementCount, getElementCountProperty, getElementType, getElementTypeProperty, getEncoding, getValues, hasConstraints, isImplicitSize, isSetEncoding, isSetValues, isVariableSize, removeComponent, removeComponent, setElementCount, setElementType, setEncoding, setValues, setVariableSizeComponent
assignNewDataBlock, clone, copyTo, getData, getDefinition, getEncodingInfo, getName, getOptional, getParent, getUpdatable, isSetDefinition, isSetOptional, isSetUpdatable, renewDataBlock, setDefinition, setEncodingInfo, setName, setOptional, setParent, setUpdatable, toString, unSetOptional, unSetUpdatable
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
isImplicitSize, isVariableSize
getElementCount, getElementCountProperty, getElementType, getElementTypeProperty, getEncoding, getValues, isSetEncoding, isSetValues, setElementCount, setElementType, setEncoding, setValues
addComponent, assignNewDataBlock, clone, getData, getDefinition, getName, getOptional, getParent, getUpdatable, hasConstraints, isSetDefinition, isSetOptional, isSetUpdatable, removeComponent, removeComponent, renewDataBlock, setDefinition, setName, setOptional, setUpdatable, unSetOptional, unSetUpdatable
protected ListIterator<DataBlock> blockIterator
protected AbstractDataComponentImpl tempComponent
public DataList()
public DataList(String name)
public DataList copy()
DataComponent
copy
in interface HasCopy
copy
in interface DataArray
copy
in interface DataComponent
copy
in interface DataStream
copy
in class AbstractArrayImpl
protected void copyTo(DataList other)
protected void updateStartIndex(int startIndex)
AbstractDataComponentImpl
updateStartIndex
in class AbstractDataComponentImpl
protected void updateAtomCount(int childOffsetCount)
AbstractDataComponentImpl
updateAtomCount
in class AbstractDataComponentImpl
public AbstractDataComponentImpl getComponent(int index)
DataComponent
getComponent
in interface DataComponent
getComponent
in class AbstractDataComponentImpl
index
- index of component to lookuppublic AbstractDataComponentImpl getListComponent()
public void resetIterator()
public boolean hasNext()
public AbstractDataComponentImpl nextComponent()
public DataBlock nextDataBlock()
public void setData(DataBlock dataBlock)
DataComponent
setData
in interface DataComponent
setData
in class AbstractDataComponentImpl
public void clearData()
DataComponent
clearData
in interface DataComponent
clearData
in class AbstractDataComponentImpl
public void validateData(List<ValidationException> errorList)
DataComponent
validateData
in interface DataComponent
validateData
in class AbstractDataComponentImpl
errorList
- list to which validation exceptions will be appendedpublic final void addData(DataBlock dataBlock)
public AbstractDataBlock createDataBlock()
DataComponent
createDataBlock
in interface DataComponent
createDataBlock
in class AbstractDataComponentImpl
protected void checkIndex(int index)
index
- intDataException
public int getComponentCount()
DataComponent
getComponentCount
in interface DataComponent
getComponentCount
in class AbstractDataComponentImpl
public String toString(String indent)
AbstractDataComponentImpl
toString
in class AbstractDataComponentImpl
indent
- intpublic int getComponentIndex(String name)
DataComponent
getComponentIndex
in interface DataComponent
getComponentIndex
in class AbstractDataComponentImpl
name
- name of component to lookuppublic AbstractDataComponentImpl getComponent(String name)
DataComponent
getComponent
in interface DataComponent
getComponent
in class AbstractDataComponentImpl
name
- name of component to lookuppublic boolean isSetElementCount()
DataStream
isSetElementCount
in interface DataStream
public void updateSize()
DataArray
updateSize
in interface DataArray
public void updateSize(int arraySize)
DataArray
updateSize
in interface DataArray
arraySize
- new array sizepublic void accept(DataComponentVisitor visitor)
accept
in interface DataComponent
Copyright © 2016 Sensia Software LLC. All rights reserved.