Class AbstractSplitOnDate
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.transformer.timeseriessplit.AbstractTimeseriesSplitter
-
- adams.flow.transformer.timeseriessplit.AbstractSplitOnDate
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,Serializable
- Direct Known Subclasses:
FixedDate
,ReportDate
public abstract class AbstractSplitOnDate extends AbstractTimeseriesSplitter
Ancestor for splitters that split on a date.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractSplitOnDate.Segments
Determines what segments to return.
-
Field Summary
Fields Modifier and Type Field Description protected boolean
m_IncludeSplitDate
whether to include the split date in the segments (if exact hit).protected AbstractSplitOnDate.Segments
m_Segments
what segment to return.-
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 AbstractSplitOnDate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.protected Timeseries[]
doSplit(Timeseries series, Date date)
Performs the actual split on the date.boolean
getIncludeSplitDate()
Returns whether to include the split date in the segments.String
getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.AbstractSplitOnDate.Segments
getSegments()
Returns the segments to return.String
includeSplitDateTipText()
Returns the tip text for this property.String
segmentsTipText()
Returns the tip text for this property.void
setIncludeSplitDate(boolean value)
Sets whether to include the split date in the segments.void
setSegments(AbstractSplitOnDate.Segments value)
Sets the segments to return.-
Methods inherited from class adams.flow.transformer.timeseriessplit.AbstractTimeseriesSplitter
check, doSplit, postProcess, split
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, reset, 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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Segments
protected AbstractSplitOnDate.Segments m_Segments
what segment to return.
-
m_IncludeSplitDate
protected boolean m_IncludeSplitDate
whether to include the split date in the segments (if exact hit).
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setSegments
public void setSegments(AbstractSplitOnDate.Segments value)
Sets the segments to return.- Parameters:
value
- the segments
-
getSegments
public AbstractSplitOnDate.Segments getSegments()
Returns the segments to return.- Returns:
- the segments
-
segmentsTipText
public String segmentsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setIncludeSplitDate
public void setIncludeSplitDate(boolean value)
Sets whether to include the split date in the segments.- Parameters:
value
- ture if to include
-
getIncludeSplitDate
public boolean getIncludeSplitDate()
Returns whether to include the split date in the segments.- Returns:
- true if to include
-
includeSplitDateTipText
public String includeSplitDateTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Overrides:
getQuickInfo
in classAbstractTimeseriesSplitter
- Returns:
- null if no info available, otherwise short string
-
doSplit
protected Timeseries[] doSplit(Timeseries series, Date date)
Performs the actual split on the date.- Parameters:
series
- the timeseries to splitdate
- the date to split on- Returns:
- the generated sub-timeseries
-
-