Package adams.data.timeseries
Class Values
-
- All Implemented Interfaces:
CleanUpHandler,Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,QuickInfoSupporter,ShallowCopySupporter<AbstractTimeseriesFeatureGenerator>,SizeOfHandler,Serializable,Comparable
public class Values extends AbstractTimeseriesFeatureGenerator<Timeseries>
Simple feature generator that just outputs all the values of a timeseries.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-converter <adams.data.featureconverter.AbstractFeatureConverter> (property: converter) The feature converter to use to produce the output data. default: adams.data.featureconverter.SpreadSheetFeatureConverter -data-row-type adams.data.spreadsheet.DenseDataRow -spreadsheet-type adams.data.spreadsheet.SpreadSheet
-field <adams.data.report.Field> [-field ...] (property: fields) The fields to add to the output. default:
-notes <adams.core.base.BaseString> [-notes ...] (property: notes) The notes to add as attributes to the generated data, eg 'PROCESS INFORMATION' . default:
-prefix-value <java.lang.String> (property: prefixValue) The prefix to use for the values. default: Value-
-add-timestamp <boolean> (property: addTimestamp) If enabled, the timestamp gets added as well, preceding the value. default: false
-prefix-timestamp <java.lang.String> (property: prefixTimestamp) The prefix to use for the timestamps. default: Timestamp-
-timestamp-format <adams.data.DateFormatString> (property: timestampFormat) The format to use for the timestamp strings. default: yyyy-MM-dd HH:mm:ss more: http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanm_AddTimestampwhether to include the timestamp.protected Stringm_PrefixTimestampthe prefix to use for timestamps.protected Stringm_PrefixValuethe prefix to use for values.protected DateFormatStringm_TimestampFormatthe timestamp format.-
Fields inherited from class adams.data.timeseries.AbstractTimeseriesFeatureGenerator
m_Converter, m_Fields, m_Notes
-
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 Values()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringaddTimestampTipText()Returns the tip text for this property.HeaderDefinitioncreateHeader(Timeseries timeseries)Creates the header from a template timeseries.voiddefineOptions()Adds options to the internal list of options.List<Object>[]generateRows(Timeseries timeseries)Performs the actual feature genration.booleangetAddTimestamp()Returns whether to add the timestamp as well (preceding the value).StringgetPrefixTimestamp()Returns the prefix for the timestamps.StringgetPrefixValue()Returns the prefix for the values.DateFormatStringgetTimestampFormat()Returns the format string to use for the timestamp strings.StringglobalInfo()Returns a string describing the object.StringprefixTimestampTipText()Returns the tip text for this property.StringprefixValueTipText()Returns the tip text for this property.voidsetAddTimestamp(boolean value)Sets whether to add the timestamp as well (preceding the value).voidsetPrefixTimestamp(String timestamp)Sets the prefix for the timestamps.voidsetPrefixValue(String value)Sets the prefix for the values.voidsetTimestampFormat(DateFormatString value)Sets the format string to use for the timestamp strings.StringtimestampFormatTipText()Returns the tip text for this property.-
Methods inherited from class adams.data.timeseries.AbstractTimeseriesFeatureGenerator
checkData, cleanUp, compareTo, converterTipText, destroy, equals, fieldsTipText, generate, getConverter, getDatasetFormat, getFields, getNotes, getQuickInfo, getRowFormat, notesTipText, postProcessHeader, postProcessRow, postProcessRows, reset, setConverter, setFields, setNotes, 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
-
-
-
-
Field Detail
-
m_PrefixValue
protected String m_PrefixValue
the prefix to use for values.
-
m_PrefixTimestamp
protected String m_PrefixTimestamp
the prefix to use for timestamps.
-
m_AddTimestamp
protected boolean m_AddTimestamp
whether to include the timestamp.
-
m_TimestampFormat
protected DateFormatString m_TimestampFormat
the timestamp format.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractTimeseriesFeatureGenerator<Timeseries>
-
setPrefixValue
public void setPrefixValue(String value)
Sets the prefix for the values.- Parameters:
value- the prefix
-
getPrefixValue
public String getPrefixValue()
Returns the prefix for the values.- Returns:
- the prefix
-
prefixValueTipText
public String prefixValueTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setAddTimestamp
public void setAddTimestamp(boolean value)
Sets whether to add the timestamp as well (preceding the value).- Parameters:
value- true if to add timestamp
-
getAddTimestamp
public boolean getAddTimestamp()
Returns whether to add the timestamp as well (preceding the value).- Returns:
- true if to add timestamp
-
addTimestampTipText
public String addTimestampTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setPrefixTimestamp
public void setPrefixTimestamp(String timestamp)
Sets the prefix for the timestamps.- Parameters:
timestamp- the prefix
-
getPrefixTimestamp
public String getPrefixTimestamp()
Returns the prefix for the timestamps.- Returns:
- the prefix
-
prefixTimestampTipText
public String prefixTimestampTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setTimestampFormat
public void setTimestampFormat(DateFormatString value)
Sets the format string to use for the timestamp strings.- Parameters:
value- the format
-
getTimestampFormat
public DateFormatString getTimestampFormat()
Returns the format string to use for the timestamp strings.- Returns:
- the format
-
timestampFormatTipText
public String timestampFormatTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
createHeader
public HeaderDefinition createHeader(Timeseries timeseries)
Creates the header from a template timeseries.- Specified by:
createHeaderin classAbstractTimeseriesFeatureGenerator<Timeseries>- Parameters:
timeseries- the timeseries to act as a template- Returns:
- the generated header
-
generateRows
public List<Object>[] generateRows(Timeseries timeseries)
Performs the actual feature genration.- Specified by:
generateRowsin classAbstractTimeseriesFeatureGenerator<Timeseries>- Parameters:
timeseries- the timeseries to process- Returns:
- the generated features
-
-