Package adams.data.filter
Class TimeseriesWindow
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.filter.AbstractFilter<Timeseries>
-
- adams.data.filter.TimeseriesWindow
-
- All Implemented Interfaces:
CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<Filter>
,SizeOfHandler
,Filter<Timeseries>
,Serializable
,Comparable
public class TimeseriesWindow extends AbstractFilter<Timeseries>
Leaves only the specified window in the timeseries (borders included).
The matching can be inverted, i.e., everything but the window is returned.
Valid options are:
-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
-start <adams.core.base.BaseDateTime> (property: start) The timestamp for the first data point in series to keep. default: -INF
-end <adams.core.base.BaseDateTime> (property: end) The timestamp for the last data point in series to keep. default: +INF
-invert <boolean> (property: invert) If enabled, everything but the window is kept. default: false
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class adams.data.filter.AbstractFilter
AbstractFilter.FilterJob<T extends DataContainer>
-
-
Field Summary
Fields Modifier and Type Field Description protected BaseDateTime
m_End
the end point.protected boolean
m_Invert
whether to invert the matching.protected BaseDateTime
m_Start
the starting point.-
Fields inherited from class adams.data.filter.AbstractFilter
m_DontUpdateID
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description TimeseriesWindow()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.String
endTipText()
Returns the tip text for this property.BaseDateTime
getEnd()
The end timestamp of series.boolean
getInvert()
Returns whether the matching is inverted.BaseDateTime
getStart()
The start timestamp of series.String
globalInfo()
Returns a string describing the object.String
invertTipText()
Returns the tip text for this property.protected Timeseries
processData(Timeseries data)
Performs the actual filtering.void
setEnd(BaseDateTime value)
Sets the end timestamp for series.void
setInvert(boolean value)
Sets whether to invert the matching.void
setStart(BaseDateTime value)
Sets the start timestamp for series.String
startTipText()
Returns the tip text for this property.-
Methods inherited from class adams.data.filter.AbstractFilter
checkData, cleanUp, compareTo, destroy, dontUpdateIDTipText, equals, filter, forCommandLine, getDontUpdateID, reset, setDontUpdateID, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel, setLoggingLevel
-
Methods inherited from interface adams.core.logging.LoggingSupporter
getLogger, isLoggingEnabled
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_Start
protected BaseDateTime m_Start
the starting point.
-
m_End
protected BaseDateTime m_End
the end point.
-
m_Invert
protected boolean m_Invert
whether to invert the matching.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractFilter<Timeseries>
-
setStart
public void setStart(BaseDateTime value)
Sets the start timestamp for series.- Parameters:
value
- the timestamp
-
getStart
public BaseDateTime getStart()
The start timestamp of series.- Returns:
- the timestamp
-
startTipText
public String startTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setEnd
public void setEnd(BaseDateTime value)
Sets the end timestamp for series.- Parameters:
value
- the timestamp
-
getEnd
public BaseDateTime getEnd()
The end timestamp of series.- Returns:
- the timestamp
-
endTipText
public String endTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setInvert
public void setInvert(boolean value)
Sets whether to invert the matching.- Parameters:
value
- true if to invert
-
getInvert
public boolean getInvert()
Returns whether the matching is inverted.- Returns:
- true if inverted
-
invertTipText
public String invertTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
processData
protected Timeseries processData(Timeseries data)
Performs the actual filtering.- Specified by:
processData
in classAbstractFilter<Timeseries>
- Parameters:
data
- the data to filter- Returns:
- the filtered data
-
-