Class MultiArrayDataSet

  • All Implemented Interfaces:
    IDAREService, Serializable

    public class MultiArrayDataSet
    extends DataSet
    Class to provide a basic setting for MultiArray Datasets. This class will read in multiple sheets from a sourcefile, and generate Data structures accordingly. If the headers of such a sheet are numeric values, the corresponding layouts have to treat the data quite differently to to a string header based dataset, as numeric values indicate continous data, while string headers indicate discrete steps.
    Author:
    Thomas Pfau
    See Also:
    Serialized Form
    • Constructor Detail

      • MultiArrayDataSet

        public MultiArrayDataSet()
        Basic Constructor, generating an empty dataset.
      • MultiArrayDataSet

        public MultiArrayDataSet​(int DataSetID,
                                 boolean useTowColHeaders,
                                 Properties DataSetProperties)
        Constructor using an id, a two column indicator and the dataset properties.
        Parameters:
        DataSetID - The ID of the Dataset
        useTowColHeaders - Whether to use two columns for label and id or only one for both
        DataSetProperties - some properties of the dataset
    • Method Detail

      • readWorkBookData

        public void readWorkBookData​(IDAREWorkbook WB)
                              throws WrongFormat,
                                     DuplicateIDException
        Description copied from class: DataSet
        Read the Data for this workbook into the dataset. This function should also remove any inappropriate property options, as those can only be determined now.
        Specified by:
        readWorkBookData in class DataSet
        Parameters:
        WB - The IDAREWorkbook to read from.
        Throws:
        WrongFormat - If there is a format problem in the Workbook (mix numeric/string, invalid string o.รค.)
        DuplicateIDException - If there are duplicate IDs in the Workbook that is being loaded.
      • getDataForID

        public NodeData getDataForID​(String NodeID)
        Description copied from class: DataSet
        Get the NodeData for a specific ID.
        Specified by:
        getDataForID in class DataSet
        Parameters:
        NodeID - The ID of the NodeData requested.
        Returns:
        the requested NodeData (if it is not present an appropriate empty entry should be returned.)
      • setID

        public void setID​(int id)
        Description copied from class: DataSet
        Set the ID of this DataSet
        Specified by:
        setID in class DataSet
        Parameters:
        id - The ID assigned to this DataSet
      • getID

        public int getID()
        Description copied from class: DataSet
        Get the ID of this set.
        Specified by:
        getID in class DataSet
        Returns:
        the internal ID of this DataSet
      • getDefaultData

        public NodeData getDefaultData()
        Description copied from class: DataSet
        Get a default NodeData object for this dataset
        Specified by:
        getDefaultData in class DataSet
        Returns:
        the Default Data used in this dataset.
      • getDataSetTypeName

        public String getDataSetTypeName()
        Description copied from class: DataSet
        Get the general Name for this Type of DataSet
        Specified by:
        getDataSetTypeName in class DataSet
        Returns:
        The Type of Dataset (as String)
      • getSetNames

        public Vector<String> getSetNames()
        Get the names of the Sheets represented in this DataSet
        Returns:
        a Vector of Strings with the names of the Sheets in this DataSet
      • getHeadersForSheet

        public Vector<Comparable> getHeadersForSheet​(String SheetName)
        Get the Headers (Either String or Double, so handle with care) for a specific sheet in this Dataset, based on the sheet name.
        Parameters:
        SheetName - the Sheetname for which to obtain headers
        Returns:
        the HeaderColumn for the requested Sheet
      • getHeaders

        public Vector<Comparable> getHeaders()
        Get all values present in the headers of this DataSet
        Specified by:
        getHeaders in class DataSet
        Returns:
        a Vector of all headers in this dataset.
      • reset

        protected void reset()
        Description copied from class: DataSet
        reset this Dataset to a stage as if it would have been just initialized.
        Overrides:
        reset in class DataSet
      • getColorMapOptions

        public Vector<ColorMap> getColorMapOptions()
        Description copied from class: DataSet
        Get the ColorMaps available for this DataSet The objects in this vector should always be the same (i.e. two successive calls should yield colormaps that can be compare with ==)
        Specified by:
        getColorMapOptions in class DataSet
        Returns:
        A collection of ColorMaps available to this DataSet