Package adams.data.io.input
Class SimpleTimeseriesReader
-
- All Implemented Interfaces:
AdditionalInformationHandler,CleanUpHandler,Destroyable,GlobalInfoSupporter,FileFormatHandler,LoggingLevelHandler,LoggingSupporter,OptionHandler,ShallowCopySupporter<DataContainerReader>,SizeOfHandler,DataContainerReader<Timeseries>,Serializable,Comparable
public class SimpleTimeseriesReader extends AbstractTimeseriesReader
Reader for the simple timeseries data format, CSV-like with preceding comments.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringFILE_FORMATthe file format extension.static StringFILE_FORMAT_GZthe file format extension (gzipped).protected DateFormatStringm_TimestampFormatthe date format string to use for formatting the timestamp.-
Fields inherited from class adams.data.io.input.AbstractDataContainerReader
m_CreateDummyReport, m_Input, m_InputIsFile, m_Processed, m_ReadData
-
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 SimpleTimeseriesReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddefineOptions()Adds options to the internal list of options.StringgetFormatDescription()Returns a string describing the format (used in the file chooser).String[]getFormatExtensions()Returns the extension(s) of the format.DateFormatStringgetTimestampFormat()Returns the format to use for the timestamps.StringglobalInfo()Returns a string describing the object.protected voidreadData()Performs the actual reading.voidsetTimestampFormat(DateFormatString value)Sets the format to use for the timestamps.StringtimestampFormatTipText()Returns the tip text for this property.-
Methods inherited from class adams.data.io.input.AbstractTimeseriesReader
getReaders
-
Methods inherited from class adams.data.io.input.AbstractDataContainerReader
checkData, cleanUp, compareTo, createDummyReport, createDummyReportTipText, destroy, doRead, equals, getAdditionalInformation, getCreateDummyReport, getDefaultFormatExtension, getInput, initialize, inputTipText, isInputFile, postProcessData, read, reset, setCreateDummyReport, setInput, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, 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
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
FILE_FORMAT
public static final String FILE_FORMAT
the file format extension.- See Also:
- Constant Field Values
-
FILE_FORMAT_GZ
public static final String FILE_FORMAT_GZ
the file format extension (gzipped).- See Also:
- Constant Field Values
-
m_TimestampFormat
protected DateFormatString m_TimestampFormat
the date format string to use for formatting the timestamp.
-
-
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 classAbstractDataContainerReader<Timeseries>
-
getFormatDescription
public String getFormatDescription()
Returns a string describing the format (used in the file chooser).- Specified by:
getFormatDescriptionin interfaceFileFormatHandler- Specified by:
getFormatDescriptionin classAbstractDataContainerReader<Timeseries>- Returns:
- a description suitable for displaying in the file chooser
-
getFormatExtensions
public String[] getFormatExtensions()
Returns the extension(s) of the format.- Specified by:
getFormatExtensionsin interfaceFileFormatHandler- Specified by:
getFormatExtensionsin classAbstractDataContainerReader<Timeseries>- Returns:
- the extension (without the dot!)
-
setTimestampFormat
public void setTimestampFormat(DateFormatString value)
Sets the format to use for the timestamps.- Parameters:
value- the format
-
getTimestampFormat
public DateFormatString getTimestampFormat()
Returns the format to use for the timestamps.- 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.
-
readData
protected void readData()
Performs the actual reading.- Specified by:
readDatain classAbstractDataContainerReader<Timeseries>
-
-