Class AbstractDataReader
java.lang.Object
net.simplace.core.io.AbstractDataReader
- Direct Known Subclasses:
AbstractAsciiReader, AbstractListReader
Base class of readers that read tabular data according to an XML configuration: each child element of the
configuration defines a column (
ColumnData); attribute values may contain parameters of the observable.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Vector<ColumnData> the column definitionsprotected org.jdom2.Elementthe configuration element with one child per columnprotected FWObservableprovides the parameters for the configuration values -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IntegergetIntegerValue(FWObservable aObservable, org.jdom2.Element aElement, String aAttributeName, Integer aDefaultValue) Reads an integer attribute; parameters in the value are replaced first.protected abstract voidInitializes the column names that are not configured (e.g.protected abstract voidInitializes the title of the data (e.g.voidreadData()Creates the column definitions from the configuration (invalid ones are skipped) and reads column heads and title.
-
Field Details
-
iConfigData
protected org.jdom2.Element iConfigDatathe configuration element with one child per column -
iObservable
provides the parameters for the configuration values -
iColumnsData
the column definitions
-
-
Constructor Details
-
AbstractDataReader
- Parameters:
aConfigData- the configuration element with one child per columnaObservable- provides the parameters for the configuration values
-
-
Method Details
-
readData
-
initColumnHeads
-
initTitle
-
getIntegerValue
public static Integer getIntegerValue(FWObservable aObservable, org.jdom2.Element aElement, String aAttributeName, Integer aDefaultValue) Reads an integer attribute; parameters in the value are replaced first.- Parameters:
aObservable- provides the parametersaElement- the element, may benullaAttributeName- name of the attributeaDefaultValue- value returned if the attribute is missing or not an integer (a warning is logged)- Returns:
- the attribute value, or the default
-