Class TimeseriesShiftTimestamps

  • All Implemented Interfaces:
    CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, ShallowCopySupporter<Filter>, SizeOfHandler, Filter<Timeseries>, Serializable, Comparable

    public class TimeseriesShiftTimestamps
    extends AbstractFilter<Timeseries>
    Shifts the timestamps of the timeseries by a calculated amount.
    The amount is either the difference between the 'new' timestamp and a timestamp from the report or a supplied timestamp.
    Accepted date formats (unless custom format specified):
    yyyy-MM-dd HH:mm:ss
    yyyy-MM-dd HH:mm:ss.S
    yyyy-MM-dd

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -no-id-update <boolean> (property: dontUpdateID)
        If enabled, suppresses updating the ID of adams.data.id.IDHandler data containers.
        default: false
     
    -source <REPORT_FIELD|SUPPLIED_TIMESTAMP> (property: source)
        Specifies where to get the 'old' timestamp from.
        default: SUPPLIED_TIMESTAMP
     
    -report-field <adams.data.report.Field> (property: reportField)
        The report field to obtain the timestamp from.
        default: 
     
    -custom-format <java.lang.String> (property: customFormat)
        The custom date format to use for parsing the value from the report.
        default: 
     
    -supplied-timestamp <adams.core.base.BaseDateTime> (property: suppliedTimestamp)
        The supplied timestamp value to use.
        default: NOW
     
    -new-timestamp <adams.core.base.BaseDateTime> (property: newTimestamp)
        The new timestamp value to use.
        default: NOW
     
    Version:
    $Revision: 7789 $
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_ReportField

        protected Field m_ReportField
        the reprt field to use.
      • m_CustomFormat

        protected String m_CustomFormat
        the custom format to use.
      • m_SuppliedTimestamp

        protected BaseDateTime m_SuppliedTimestamp
        the supplied timestamp.
      • m_NewTimestamp

        protected BaseDateTime m_NewTimestamp
        the new timstamp.
    • Constructor Detail

      • TimeseriesShiftTimestamps

        public TimeseriesShiftTimestamps()
    • Method Detail

      • sourceTipText

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

        public void setReportField​(Field value)
        Sets the report field to obtain the timestamp from.
        Parameters:
        value - the field
      • getReportField

        public Field getReportField()
        The report field to obtain the timestamp from.
        Returns:
        the field
      • reportFieldTipText

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

        public void setCustomFormat​(String value)
        Sets the custom date format to use for parsing. Ignored if empty.
        Parameters:
        value - the custom format
      • getCustomFormat

        public String getCustomFormat()
        Returns the custom date format to use for parsing. Ignored if empty.
        Returns:
        the custom format
      • customFormatTipText

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

        public void setSuppliedTimestamp​(BaseDateTime value)
        Sets the supplied timestamp to use.
        Parameters:
        value - the timestamp
      • getSuppliedTimestamp

        public BaseDateTime getSuppliedTimestamp()
        The supplied timestamp to use.
        Returns:
        the timestamp
      • suppliedTimestampTipText

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

        public void setNewTimestamp​(BaseDateTime value)
        Sets the new timestamp to use.
        Parameters:
        value - the timestamp
      • getNewTimestamp

        public BaseDateTime getNewTimestamp()
        The new timestamp to use.
        Returns:
        the timestamp
      • newTimestampTipText

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