Package adams.data.io.output
Class SpreadSheetTimeseriesWriter
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.io.output.AbstractDataContainerWriter<Timeseries>
-
- adams.data.io.output.AbstractTimeseriesWriter
-
- adams.data.io.output.SpreadSheetTimeseriesWriter
-
- All Implemented Interfaces:
AdditionalInformationHandler,CleanUpHandler,Destroyable,GlobalInfoSupporter,FileFormatHandler,LoggingLevelHandler,LoggingSupporter,OptionHandler,ShallowCopySupporter<DataContainerWriter>,SizeOfHandler,DataContainerWriter<Timeseries>,MetaFileWriter,Serializable,Comparable
public class SpreadSheetTimeseriesWriter extends AbstractTimeseriesWriter implements MetaFileWriter
Writes timeseries data using a spreadsheet writer.
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
-output <adams.core.io.PlaceholderFile> (property: output) The directory to write the container to. default: ${TMP}/out.tmp-writer <adams.data.io.output.SpreadSheetWriter> (property: writer) The writer to use for writing the spreadsheet file. default: adams.data.io.output.CsvSpreadSheetWriter
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected SpreadSheetWriterm_Writerthe spreadsheet writer to use.-
Fields inherited from class adams.data.io.output.AbstractDataContainerWriter
m_Output, m_OutputIsFile
-
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 SpreadSheetTimeseriesWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanWriteMultiple()Returns whether writing of multiple containers is supported.voiddefineOptions()Adds options to the internal list of options.String[]getActualFormatExtensions()Returns the underlying format extensions.StringgetFormatDescription()Returns a string describing the format (used in the file chooser).String[]getFormatExtensions()Returns the extension(s) of the format.SpreadSheetWritergetWriter()Returns the writer to use.StringglobalInfo()Returns a string describing the object.voidsetWriter(SpreadSheetWriter value)Sets the writer to use.protected booleanwriteData(List<Timeseries> data)Performs the actual writing.StringwriterTipText()Returns the tip text for this property.-
Methods inherited from class adams.data.io.output.AbstractTimeseriesWriter
getWriters, initialize
-
Methods inherited from class adams.data.io.output.AbstractDataContainerWriter
checkData, cleanUp, compareTo, destroy, equals, forCommandLine, forName, getAdditionalInformation, getDefaultFormatExtension, getOutput, isOutputFile, outputTipText, reset, setOutput, shallowCopy, shallowCopy, write, write
-
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
-
m_Writer
protected SpreadSheetWriter m_Writer
the spreadsheet writer to use.
-
-
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 classAbstractDataContainerWriter<Timeseries>
-
getFormatDescription
public String getFormatDescription()
Returns a string describing the format (used in the file chooser).- Specified by:
getFormatDescriptionin interfaceFileFormatHandler- Specified by:
getFormatDescriptionin classAbstractDataContainerWriter<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 classAbstractDataContainerWriter<Timeseries>- Returns:
- the extension (without the dot!)
-
getActualFormatExtensions
public String[] getActualFormatExtensions()
Returns the underlying format extensions.- Specified by:
getActualFormatExtensionsin interfaceMetaFileWriter- Returns:
- the format extensions (excluding dot)
-
setWriter
public void setWriter(SpreadSheetWriter value)
Sets the writer to use.- Parameters:
value- the writer
-
getWriter
public SpreadSheetWriter getWriter()
Returns the writer to use.- Returns:
- the writer
-
writerTipText
public String writerTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
canWriteMultiple
public boolean canWriteMultiple()
Returns whether writing of multiple containers is supported.- Specified by:
canWriteMultiplein interfaceDataContainerWriter<Timeseries>- Overrides:
canWriteMultiplein classAbstractTimeseriesWriter- Returns:
- true if multiple containers are supported
-
writeData
protected boolean writeData(List<Timeseries> data)
Performs the actual writing.- Specified by:
writeDatain classAbstractDataContainerWriter<Timeseries>- Parameters:
data- the data to write- Returns:
- true if successfully written
-
-