Class AbstractDataset
java.lang.Object
com.inductiveautomation.ignition.common.AbstractDataset
- All Implemented Interfaces:
Dataset
,Serializable
- Direct Known Subclasses:
BasicDataset
,BasicStreamingDataset
,ColumnFilteredDataSet
,OptimizedDataSet
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionTransient variable to make case insensitive lookups quickprotected QualityCode[][]
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractDataset
(List<String> columnNames, List<Class<?>> columnTypes) AbstractDataset
(List<String> columnNames, List<Class<?>> columnTypes, QualityCode[][] qualityCodes) -
Method Summary
Modifier and TypeMethodDescriptionprotected static QualityCode[][]
convertToQualityCodes
(DataQuality[][] dataQualities) getAsXML()
Deprecated.QualityCode[][]
int
Returns the number of columns.int
getColumnIndex
(String colName) Returns the index of the given column, case-insensitivegetColumnName
(int col) Returns the name of the given column.Returns an unmodifiable list of this dataset's column names, in order.Class<?>
getColumnType
(int col) Returns the type of the given column.Returns an unmodifiable list of this dataset's column types, in order.double
getPrimitiveValueAt
(int row, int col) If the given column is a numeric type or a Date, then the value will be returned as a double.getQualityAt
(int row, int col) Returns the quality of the value at the given location.getValueAt
(int row, String colName) Returns the value at the given row and at a column named colName.boolean
Whether this dataset has any quality data to report.protected void
setColumnNames
(List<String> list) protected void
setColumnTypes
(List<Class<?>> list) protected void
setDirty()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.inductiveautomation.ignition.common.Dataset
binarySearch, getColumnAsList, getRowCount, getValueAt
-
Field Details
-
columnNames
-
_columnNamesLowercase
Transient variable to make case insensitive lookups quick -
columnTypes
-
qualityCodes
-
-
Constructor Details
-
AbstractDataset
-
AbstractDataset
public AbstractDataset(List<String> columnNames, List<Class<?>> columnTypes, QualityCode[][] qualityCodes)
-
-
Method Details
-
getColumnIndex
Returns the index of the given column, case-insensitive- Specified by:
getColumnIndex
in interfaceDataset
- Parameters:
colName
- the name of the column to look upw- Returns:
- the index of the column
- Throws:
ArrayIndexOutOfBoundsException
- if the column doesn't exist
-
getColumnCount
public int getColumnCount()Description copied from interface:Dataset
Returns the number of columns.- Specified by:
getColumnCount
in interfaceDataset
-
getColumnNames
Description copied from interface:Dataset
Returns an unmodifiable list of this dataset's column names, in order.- Specified by:
getColumnNames
in interfaceDataset
-
getColumnName
Description copied from interface:Dataset
Returns the name of the given column.- Specified by:
getColumnName
in interfaceDataset
-
getColumnTypes
Description copied from interface:Dataset
Returns an unmodifiable list of this dataset's column types, in order.- Specified by:
getColumnTypes
in interfaceDataset
-
getColumnType
Description copied from interface:Dataset
Returns the type of the given column.- Specified by:
getColumnType
in interfaceDataset
-
setColumnNames
-
setColumnTypes
-
setDirty
protected void setDirty() -
getPrimitiveValueAt
public double getPrimitiveValueAt(int row, int col) If the given column is a numeric type or a Date, then the value will be returned as a double. The Chart uses this functionality to provide a seamless interface with the optimized dataset.- Specified by:
getPrimitiveValueAt
in interfaceDataset
-
getValueAt
Returns the value at the given row and at a column named colName. Column name matching is case insensitive.- Specified by:
getValueAt
in interfaceDataset
-
getQualityAt
Description copied from interface:Dataset
Returns the quality of the value at the given location.- Specified by:
getQualityAt
in interfaceDataset
-
hasQualityData
public boolean hasQualityData()Description copied from interface:Dataset
Whether this dataset has any quality data to report. If false, getQualityAt is expected to returnQualityCode.Good
.- Specified by:
hasQualityData
in interfaceDataset
- See Also:
-
getBulkQualityCodes
-
getAsXML
Deprecated.Returns the data of the dataset as a Base64-encoded zipped XML string -
convertToQualityCodes
-