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 PlaceholderFilem_OutputFilethe output file.protected SpreadSheetReaderm_Readerthe spreadsheet reader to use.protected SpreadSheetWriterm_Writerthe 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 voiddefineOptions()Adds options to the internal list of options.PlaceholderFilegetOutputFile()Get output file.SpreadSheetReadergetReader()Returns the spreadsheet reader to use.SpreadSheetWritergetWriter()Returns the spreadsheet writer to use.StringglobalInfo()Returns a string describing the object.StringoutputFileTipText()Returns the tip text for this property.SpreadSheetread()Loads the results (if possible).StringreaderTipText()Returns the tip text for this property.voidsetOutputFile(PlaceholderFile value)Set output file.voidsetReader(SpreadSheetReader value)Sets the spreadsheet reader to use.voidsetWriter(SpreadSheetWriter value)Sets the spreadsheet writer to use.Stringwrite(SpreadSheet results)Stores the results.StringwriterTipText()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:
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 classAbstractOptionHandler
-
setOutputFile
public void setOutputFile(PlaceholderFile value)
Set output file.- Specified by:
setOutputFilein interfaceFileWriter- Parameters:
value- file
-
getOutputFile
public PlaceholderFile getOutputFile()
Get output file.- Specified by:
getOutputFilein interfaceFileWriter- Returns:
- file
-
outputFileTipText
public String outputFileTipText()
Returns the tip text for this property.- Specified by:
outputFileTipTextin 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:
readin classAbstractResultsHandler- Returns:
- the results, null if failed to obtain (or not available)
-
write
public String write(SpreadSheet results)
Stores the results.- Specified by:
writein classAbstractResultsHandler- Parameters:
results- the results to store- Returns:
- null if successful, otherwise error message
-
-