Class FileResultsHandler
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.tools.wekamultiexperimenter.experiment.AbstractResultsHandler
-
- adams.gui.tools.wekamultiexperimenter.experiment.FileResultsHandler
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,FileWriter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,Serializable
public class FileResultsHandler extends AbstractResultsHandler implements FileWriter
Writes the experiment results to a file.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected PlaceholderFile
m_OutputFile
the output file.protected SpreadSheetReader
m_Reader
the spreadsheet reader to use.protected SpreadSheetWriter
m_Writer
the spreadsheet writer to use.-
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 FileResultsHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.PlaceholderFile
getOutputFile()
Get output file.SpreadSheetReader
getReader()
Returns the spreadsheet reader to use.SpreadSheetWriter
getWriter()
Returns the spreadsheet writer to use.String
globalInfo()
Returns a string describing the object.String
outputFileTipText()
Returns the tip text for this property.SpreadSheet
read()
Loads the results (if possible).String
readerTipText()
Returns the tip text for this property.void
setOutputFile(PlaceholderFile value)
Set output file.void
setReader(SpreadSheetReader value)
Sets the spreadsheet reader to use.void
setWriter(SpreadSheetWriter value)
Sets the spreadsheet writer to use.String
write(SpreadSheet results)
Stores the results.String
writerTipText()
Returns the tip text for this property.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, 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_OutputFile
protected PlaceholderFile m_OutputFile
the output file.
-
m_Reader
protected SpreadSheetReader m_Reader
the spreadsheet reader to use.
-
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:
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
-
setOutputFile
public void setOutputFile(PlaceholderFile value)
Set output file.- Specified by:
setOutputFile
in interfaceFileWriter
- Parameters:
value
- file
-
getOutputFile
public PlaceholderFile getOutputFile()
Get output file.- Specified by:
getOutputFile
in interfaceFileWriter
- Returns:
- file
-
outputFileTipText
public String outputFileTipText()
Returns the tip text for this property.- Specified by:
outputFileTipText
in interfaceFileWriter
- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setReader
public void setReader(SpreadSheetReader value)
Sets the spreadsheet reader to use.- Parameters:
value
- file
-
getReader
public SpreadSheetReader getReader()
Returns the spreadsheet reader to use.- Returns:
- the reader
-
readerTipText
public String readerTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setWriter
public void setWriter(SpreadSheetWriter value)
Sets the spreadsheet writer to use.- Parameters:
value
- file
-
getWriter
public SpreadSheetWriter getWriter()
Returns the spreadsheet 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.
-
read
public SpreadSheet read()
Loads the results (if possible).- Specified by:
read
in classAbstractResultsHandler
- Returns:
- the results, null if failed to obtain (or not available)
-
write
public String write(SpreadSheet results)
Stores the results.- Specified by:
write
in classAbstractResultsHandler
- Parameters:
results
- the results to store- Returns:
- null if successful, otherwise error message
-
-