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:
adams.core.Destroyable,adams.core.GlobalInfoSupporter,adams.core.io.FileWriter,adams.core.logging.LoggingLevelHandler,adams.core.logging.LoggingSupporter,adams.core.option.OptionHandler,adams.core.SizeOfHandler,Serializable
public class FileResultsHandler extends AbstractResultsHandler implements adams.core.io.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 adams.core.io.PlaceholderFilem_OutputFilethe output file.protected adams.data.io.input.SpreadSheetReaderm_Readerthe spreadsheet reader to use.protected adams.data.io.output.SpreadSheetWriterm_Writerthe spreadsheet writer to use.
-
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.adams.core.io.PlaceholderFilegetOutputFile()Get output file.adams.data.io.input.SpreadSheetReadergetReader()Returns the spreadsheet reader to use.adams.data.io.output.SpreadSheetWritergetWriter()Returns the spreadsheet writer to use.StringglobalInfo()Returns a string describing the object.StringoutputFileTipText()Returns the tip text for this property.adams.data.spreadsheet.SpreadSheetread()Loads the results (if possible).StringreaderTipText()Returns the tip text for this property.voidsetOutputFile(adams.core.io.PlaceholderFile value)Set output file.voidsetReader(adams.data.io.input.SpreadSheetReader value)Sets the spreadsheet reader to use.voidsetWriter(adams.data.io.output.SpreadSheetWriter value)Sets the spreadsheet writer to use.Stringwrite(adams.data.spreadsheet.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
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceadams.core.GlobalInfoSupporter- Specified by:
globalInfoin classadams.core.option.AbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceadams.core.option.OptionHandler- Overrides:
defineOptionsin classadams.core.option.AbstractOptionHandler
-
setOutputFile
public void setOutputFile(adams.core.io.PlaceholderFile value)
Set output file.- Specified by:
setOutputFilein interfaceadams.core.io.FileWriter- Parameters:
value- file
-
getOutputFile
public adams.core.io.PlaceholderFile getOutputFile()
Get output file.- Specified by:
getOutputFilein interfaceadams.core.io.FileWriter- Returns:
- file
-
outputFileTipText
public String outputFileTipText()
Returns the tip text for this property.- Specified by:
outputFileTipTextin interfaceadams.core.io.FileWriter- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setReader
public void setReader(adams.data.io.input.SpreadSheetReader value)
Sets the spreadsheet reader to use.- Parameters:
value- file
-
getReader
public adams.data.io.input.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(adams.data.io.output.SpreadSheetWriter value)
Sets the spreadsheet writer to use.- Parameters:
value- file
-
getWriter
public adams.data.io.output.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 adams.data.spreadsheet.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(adams.data.spreadsheet.SpreadSheet results)
Stores the results.- Specified by:
writein classAbstractResultsHandler- Parameters:
results- the results to store- Returns:
- null if successful, otherwise error message
-
-