Class SpreadSheetToTimeseries

  • All Implemented Interfaces:
    AdditionalInformationHandler, ArrayProvider, CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<Actor>, SizeOfHandler, Stoppable, StoppableWithFeedback, VariablesInspectionHandler, VariableChangeListener, Actor, ArrayProvider, ErrorHandler, InputConsumer, OutputProducer, Serializable, Comparable

    public class SpreadSheetToTimeseries
    extends AbstractArrayProvider
    Extracts one or more timeseries from a spreadsheet.
    It uses one column ('ID') to identify all the rows that belong to a single timeseries. The 'Timestamp' and 'Value' columns make up data points of a timeseries.

    Input/output:
    - accepts:
       adams.data.spreadsheet.SpreadSheet
    - generates:
       adams.data.timeseries.Timeseries


    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -name <java.lang.String> (property: name)
        The name of the actor.
        default: SpreadSheetToTimeseries
     
    -annotation <adams.core.base.BaseAnnotation> (property: annotations)
        The annotations to attach to this actor.
        default: 
     
    -skip <boolean> (property: skip)
        If set to true, transformation is skipped and the input token is just forwarded 
        as it is.
        default: false
     
    -stop-flow-on-error <boolean> (property: stopFlowOnError)
        If set to true, the flow gets stopped in case this actor encounters an error;
         useful for critical actors.
        default: false
     
    -output-array <boolean> (property: outputArray)
        If enabled, outputs an array of Timeseries objects rather than one-by-one.
        default: false
     
    -column-id <adams.data.spreadsheet.SpreadSheetColumnIndex> (property: columnID)
        The column to use for grouping the timeseries data points; if left empty 
        all rows are added to the same timeseries.
        default: 1
        example: An index is a number starting with 1; column names (case-sensitive) as well as the following placeholders can be used: first, second, third, last_2, last_1, last
     
    -column-timestamp <adams.data.spreadsheet.SpreadSheetColumnIndex> (property: columnTimestamp)
        The column that contains the timestamp for the data points.
        default: 2
        example: An index is a number starting with 1; column names (case-sensitive) as well as the following placeholders can be used: first, second, third, last_2, last_1, last
     
    -column-value <adams.data.spreadsheet.SpreadSheetColumnIndex> (property: columnValue)
        The column that contains the value of the data points.
        default: 3
        example: An index is a number starting with 1; column names (case-sensitive) as well as the following placeholders can be used: first, second, third, last_2, last_1, last
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Constructor Detail

      • SpreadSheetToTimeseries

        public SpreadSheetToTimeseries()
    • Method Detail

      • setColumnID

        public void setColumnID​(SpreadSheetColumnIndex value)
        Sets the index/name of the column to use for grouping the timeseries data points.
        Parameters:
        value - the index/name
      • getColumnID

        public SpreadSheetColumnIndex getColumnID()
        Returns the index/name of the column to use for grouping the timeseries data points.
        Returns:
        the index/name
      • columnIDTipText

        public String columnIDTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setColumnTimestamp

        public void setColumnTimestamp​(SpreadSheetColumnIndex value)
        Sets the index/name of the column that contains the timestamp of the data points.
        Parameters:
        value - the index/name
      • getColumnTimestamp

        public SpreadSheetColumnIndex getColumnTimestamp()
        Returns the index/name of the column that contains the timestamp of the data points.
        Returns:
        the index/name
      • columnTimestampTipText

        public String columnTimestampTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setColumnValue

        public void setColumnValue​(SpreadSheetColumnIndex value)
        Sets the index/name of the column that contains the value of the data points.
        Parameters:
        value - the index/name
      • getColumnValue

        public SpreadSheetColumnIndex getColumnValue()
        Returns the index/name of the column that contains the value of the data points.
        Returns:
        the index/name
      • columnValueTipText

        public String columnValueTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • accepts

        public Class[] accepts()
        Returns the class that the consumer accepts.
        Returns:
        the Class of objects that can be processed
      • doExecute

        protected String doExecute()
        Executes the flow item.
        Specified by:
        doExecute in class AbstractActor
        Returns:
        null if everything is fine, otherwise error message