Class AbstractDataset

java.lang.Object
com.inductiveautomation.ignition.common.AbstractDataset
All Implemented Interfaces:
Dataset, Serializable
Direct Known Subclasses:
BasicDataset, BasicStreamingDataset, ColumnFilteredDataSet, OptimizedDataSet

public abstract class AbstractDataset extends Object implements Dataset
See Also:
  • Field Details

    • columnNames

      protected List<String> columnNames
    • _columnNamesLowercase

      protected List<String> _columnNamesLowercase
      Transient variable to make case insensitive lookups quick
    • columnTypes

      protected List<Class<?>> columnTypes
    • qualityCodes

      protected QualityCode[][] qualityCodes
  • Constructor Details

  • Method Details

    • getColumnIndex

      public int getColumnIndex(String colName)
      Returns the index of the given column, case-insensitive
      Specified by:
      getColumnIndex in interface Dataset
      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 interface Dataset
    • getColumnNames

      public List<String> getColumnNames()
      Description copied from interface: Dataset
      Returns an unmodifiable list of this dataset's column names, in order.
      Specified by:
      getColumnNames in interface Dataset
    • getColumnName

      public String getColumnName(int col)
      Description copied from interface: Dataset
      Returns the name of the given column.
      Specified by:
      getColumnName in interface Dataset
    • getColumnTypes

      public List<Class<?>> getColumnTypes()
      Description copied from interface: Dataset
      Returns an unmodifiable list of this dataset's column types, in order.
      Specified by:
      getColumnTypes in interface Dataset
    • getColumnType

      public Class<?> getColumnType(int col)
      Description copied from interface: Dataset
      Returns the type of the given column.
      Specified by:
      getColumnType in interface Dataset
    • setColumnNames

      protected void setColumnNames(List<String> list)
    • setColumnTypes

      protected void setColumnTypes(List<Class<?>> list)
    • 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 interface Dataset
    • getValueAt

      public Object getValueAt(int row, String colName)
      Returns the value at the given row and at a column named colName. Column name matching is case insensitive.
      Specified by:
      getValueAt in interface Dataset
    • getQualityAt

      public QualityCode getQualityAt(int row, int col)
      Description copied from interface: Dataset
      Returns the quality of the value at the given location.
      Specified by:
      getQualityAt in interface Dataset
    • hasQualityData

      public boolean hasQualityData()
      Description copied from interface: Dataset
      Whether this dataset has any quality data to report. If false, getQualityAt is expected to return QualityCode.Good.
      Specified by:
      hasQualityData in interface Dataset
      See Also:
    • getBulkQualityCodes

      public QualityCode[][] getBulkQualityCodes()
    • getAsXML

      @Deprecated public String getAsXML()
      Deprecated.
      Returns the data of the dataset as a Base64-encoded zipped XML string
    • convertToQualityCodes

      protected static QualityCode[][] convertToQualityCodes(DataQuality[][] dataQualities)