Class SpreadSheetRowToTimeseries

  • 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 SpreadSheetRowToTimeseries
    extends AbstractArrayProvider
    Turns a spreadsheet row into a timeseries.
    Columns for timestamps and values are extracted using the regular expressions, the timestamp columns are optional.

    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: SpreadSheetRowToTimeseries
     
    -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 (optional) column storing the ID for a 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
     
    -data-range <adams.data.spreadsheet.SpreadSheetColumnRange> (property: dataRange)
        The range of columns to use for generating the timeseries.
        default: first-last
        example: A range is a comma-separated list of single 1-based indices or sub-ranges of indices ('start-end'); 'inv(...)' inverts the range '...'; column names (case-sensitive) as well as the following placeholders can be used: first, second, third, last_2, last_1, last
     
    -regexp-timestamp <adams.core.base.BaseRegExp> (property: regExpTimestamp)
        The regular expression for matching the columns that contain the timestamps 
        for the data points.
        default: Timestamp-
     
    -regexp-value <adams.core.base.BaseRegExp> (property: regExpValue)
        The regular expression for matching the columns that contain the values 
        of the data points.
        default: Value-
     
    Version:
    $Revision: 8016 $
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_RegExpTimestamp

        protected BaseRegExp m_RegExpTimestamp
        the regular expression for timestamp columns.
      • m_RegExpValue

        protected BaseRegExp m_RegExpValue
        the regular expression for value columns.
    • Constructor Detail

      • SpreadSheetRowToTimeseries

        public SpreadSheetRowToTimeseries()
    • 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.
      • setDataRange

        public void setDataRange​(SpreadSheetColumnRange value)
        Sets the range of columns to use for generating the timeseries.
        Parameters:
        value - the range
      • getDataRange

        public SpreadSheetColumnRange getDataRange()
        Returns the range of columns to use for generating the timeseries.
        Returns:
        the range
      • dataRangeTipText

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

        public void setRegExpTimestamp​(BaseRegExp value)
        Sets the regular expression for matching the timestamp columns.
        Parameters:
        value - the expression
      • getRegExpTimestamp

        public BaseRegExp getRegExpTimestamp()
        Returns the regular expression for matching the timestamp columns.
        Returns:
        the expression
      • regExpTimestampTipText

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

        public void setRegExpValue​(BaseRegExp value)
        Sets the regular expression for matching the timestamp columns.
        Parameters:
        value - the expression
      • getRegExpValue

        public BaseRegExp getRegExpValue()
        Returns the regular expression for matching the timestamp columns.
        Returns:
        the expression
      • regExpValueTipText

        public String regExpValueTipText()
        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