Class BasicDataset

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

public class BasicDataset extends AbstractDataset
See Also:
  • Field Details

    • xmlReaderPool

      protected static XMLReaderPool xmlReaderPool
      XML Reader pool used for deserializing xml serialized data
    • data

      protected Object[][] data
  • Constructor Details

    • BasicDataset

      public BasicDataset()
    • BasicDataset

      public BasicDataset(String[] columnNames, Class<?>[] columnTypes, Object[][] data)
    • BasicDataset

      public BasicDataset(List<String> columnNames, List<Class<?>> columnTypes, Object[][] data)
      Constructor that takes all of the information needed to create a populated dataset.
      Parameters:
      columnNames - The column names of the dataset. Must match the length of columnTypes and data.length
      columnTypes - The types of each column. Must match the length of columnNames and data.length
      data - The raw data. An array of columns of data. (NOT rows.)
    • BasicDataset

      @Deprecated public BasicDataset(List<String> columnNames, List<Class<?>> columnTypes, Object[][] data, DataQuality[][] quality)
      Deprecated.
      Needed for deserialization backwards compatibility. Do not use this method for new code.
    • BasicDataset

      public BasicDataset(List<String> columnNames, List<Class<?>> columnTypes)
    • BasicDataset

      public BasicDataset(List<String> columnNames, List<Class<?>> columnTypes, Object[][] data, QualityCode[][] quality)
    • BasicDataset

      public BasicDataset(@Nonnull Dataset copy)
    • BasicDataset

      public BasicDataset(List<String> columnNames, List<Class<?>> columnTypes, Dataset copy)
  • Method Details

    • getValueAt

      public Object getValueAt(int row, int col)
      Description copied from interface: Dataset
      Returns the value in the dataset at the given location.
    • getRowCount

      public int getRowCount()
      Description copied from interface: Dataset
      Return the number of rows in this dataset
    • setValueAt

      public void setValueAt(int row, int col, Object value) throws ClassCastException
      Not part of the public Dataset API
      Throws:
      ClassCastException
    • binarySearch

      public int binarySearch(int column, Object key)
      Performs a binary search on the specified column, looking for the specified key. Column MUST be sorted in ascending order with NULL values LAST
      Returns:
      index of the search key, if it is contained in the list; otherwise, (-(insertion point) - 1). The insertion point is defined as the point at which the key would be inserted into the list: the index of the first element greater than the key, or list.size(), if all elements in the list are less than the specified key. Note that this guarantees the return value will be greater than or equal to 0, but only if the key is found.
    • setFromXML

      public void setFromXML(List<String> columnNames, List<Class<?>> columnTypes, String encodedData, int rowCount)
    • getData

      public Object[][] getData()
    • setDataDirectly

      public void setDataDirectly(Object[][] list)
      Sets the data array, and fires a change event. The data array of a Dataset is a double object array, with the first index indicating column, and the second indicating row.

      Returns:

    • setData

      @Deprecated public void setData(Object[][] list)
      Deprecated.
      This setter function should ONLY BE CALLED DURING DE-SERIALIZATION, which means that you should NEVER CALL THIS FUNCTION DIRECTLY.
      See Also:
    • setAllDirectly

      public void setAllDirectly(List<String> columnNames, List<Class<?>> columnTypes, Object[][] data)
      This function was added in 1.5.5 to solve a dataset serialization problem. On a component that starts out with a non-null dataset, during de-serialization, the three set functions were called on that dataset. This caused three fireChange()s, with the first two causing the dataset to be in an inconsistent state. See the DataSetPersistenceDelegate.
    • columnContainsNulls

      public boolean columnContainsNulls(int col)
    • datasetContainsNulls

      public boolean datasetContainsNulls()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setColumnNames

      public void setColumnNames(List<String> list)
      Overrides:
      setColumnNames in class AbstractDataset
    • setColumnTypes

      public void setColumnTypes(List<Class<?>> list)
      Overrides:
      setColumnTypes in class AbstractDataset