Package adams.data.conversion
Class WekaForecastContainerToTimeseries
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.conversion.AbstractConversion
-
- adams.data.conversion.WekaForecastContainerToTimeseries
-
- All Implemented Interfaces:
AdditionalInformationHandler
,CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,ShallowCopySupporter<AbstractConversion>
,SizeOfHandler
,Stoppable
,Conversion
,Serializable
public class WekaForecastContainerToTimeseries extends AbstractConversion
Turns a series of predictions of a adams.flow.container.WekaForecastContainer container into a 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
-index <adams.core.Index> (property: index) The index of the timeseries to extract from the container. default: first example: An index is a number starting with 1; the following placeholders can be used as well: first, second, third, last_2, last_1, last
-prediction-range <adams.core.Range> (property: predictionRange) The range of predictions to convert into a 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 '...'; the following placeholders can be used as well: first, second, third, last_2, last_1, last
-start <adams.core.base.BaseDateTime> (property: start) The start date/time for the timeseries. default: 2000-01-01 00:00:00
-interval <adams.core.base.BaseDateTime> (property: interval) The interval between timeseries points; START refers to the previous data point. default: START +1 DAY
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Index
m_Index
the index of the timeseries to extract from the container.protected BaseDateTime
m_Interval
the interval for predictions.protected Range
m_PredictionRange
the range of predictions to turn into a timeseries.protected BaseDateTime
m_Start
the start date for timeseries.-
Fields inherited from class adams.data.conversion.AbstractConversion
m_Input, m_Output, m_Owner, m_Stopped
-
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 WekaForecastContainerToTimeseries()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class
accepts()
Returns the class that is accepted as input.void
defineOptions()
Adds options to the internal list of options.protected Object
doConvert()
Performs the actual conversion.Class
generates()
Returns the class that is generated as output.protected BaseDateTime
getDefaultInterval()
Returns the default interval date/time.protected BaseDateTime
getDefaultStart()
Returns the default start date/time.Index
getIndex()
Returns the index of the timeseries to extract from the container.BaseDateTime
getInterval()
Returns the interval betwen timeseries points, withBaseDateTime.START
referring to the previous data point.Range
getPredictionRange()
Returns the range of predictions to turn into a timeseries.BaseDateTime
getStart()
Returns the start date/time for the timeseries.String
globalInfo()
Returns a string describing the object.String
indexTipText()
Returns the tip text for this property.String
intervalTipText()
Returns the tip text for this property.String
predictionRangeTipText()
Returns the tip text for this property.void
setIndex(Index value)
Sets the index of the timeseries to extract from the container.void
setInterval(BaseDateTime value)
Sets the interval betwen timeseries points, withBaseDateTime.START
referring to the previous data point.void
setPredictionRange(Range value)
Sets the range of predictions to turn into a timeseries.void
setStart(BaseDateTime value)
Sets the start date/time for the timeseries.String
startTipText()
Returns the tip text for this property.-
Methods inherited from class adams.data.conversion.AbstractConversion
checkData, cleanUp, convert, getAdditionalInformation, getInput, getInput, getOutput, getOutput, getOwner, getQuickInfo, reset, setInput, setOwner, shallowCopy, shallowCopy, stopExecution
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, 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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Index
protected Index m_Index
the index of the timeseries to extract from the container.
-
m_PredictionRange
protected Range m_PredictionRange
the range of predictions to turn into a timeseries.
-
m_Start
protected BaseDateTime m_Start
the start date for timeseries.
-
m_Interval
protected BaseDateTime m_Interval
the interval for predictions.
-
-
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 classAbstractOptionHandler
-
setIndex
public void setIndex(Index value)
Sets the index of the timeseries to extract from the container.- Parameters:
value
- the index
-
getIndex
public Index getIndex()
Returns the index of the timeseries to extract from the container.- Returns:
- the index
-
indexTipText
public String indexTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setPredictionRange
public void setPredictionRange(Range value)
Sets the range of predictions to turn into a timeseries.- Parameters:
value
- the range
-
getPredictionRange
public Range getPredictionRange()
Returns the range of predictions to turn into a timeseries.- Returns:
- the range
-
predictionRangeTipText
public String predictionRangeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getDefaultStart
protected BaseDateTime getDefaultStart()
Returns the default start date/time.- Returns:
- the default
-
setStart
public void setStart(BaseDateTime value)
Sets the start date/time for the timeseries.- Parameters:
value
- the start
-
getStart
public BaseDateTime getStart()
Returns the start date/time for the timeseries.- Returns:
- the start
-
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.
-
getDefaultInterval
protected BaseDateTime getDefaultInterval()
Returns the default interval date/time.- Returns:
- the default
-
setInterval
public void setInterval(BaseDateTime value)
Sets the interval betwen timeseries points, withBaseDateTime.START
referring to the previous data point.- Parameters:
value
- the interval
-
getInterval
public BaseDateTime getInterval()
Returns the interval betwen timeseries points, withBaseDateTime.START
referring to the previous data point.- Returns:
- the interval
-
intervalTipText
public String intervalTipText()
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 is accepted as input.- Specified by:
accepts
in interfaceConversion
- Specified by:
accepts
in classAbstractConversion
- Returns:
- the class
-
generates
public Class generates()
Returns the class that is generated as output.- Specified by:
generates
in interfaceConversion
- Specified by:
generates
in classAbstractConversion
- Returns:
- the class
-
doConvert
protected Object doConvert() throws Exception
Performs the actual conversion.- Specified by:
doConvert
in classAbstractConversion
- Returns:
- the converted data
- Throws:
Exception
- if something goes wrong with the conversion
-
-