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.PlaceholderFile
m_OutputFile
the output file.protected adams.data.io.input.SpreadSheetReader
m_Reader
the spreadsheet reader to use.protected adams.data.io.output.SpreadSheetWriter
m_Writer
the spreadsheet writer to use.
-
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.adams.core.io.PlaceholderFile
getOutputFile()
Get output file.adams.data.io.input.SpreadSheetReader
getReader()
Returns the spreadsheet reader to use.adams.data.io.output.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.adams.data.spreadsheet.SpreadSheet
read()
Loads the results (if possible).String
readerTipText()
Returns the tip text for this property.void
setOutputFile(adams.core.io.PlaceholderFile value)
Set output file.void
setReader(adams.data.io.input.SpreadSheetReader value)
Sets the spreadsheet reader to use.void
setWriter(adams.data.io.output.SpreadSheetWriter value)
Sets the spreadsheet writer to use.String
write(adams.data.spreadsheet.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
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceadams.core.GlobalInfoSupporter
- Specified by:
globalInfo
in 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:
defineOptions
in interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in classadams.core.option.AbstractOptionHandler
-
setOutputFile
public void setOutputFile(adams.core.io.PlaceholderFile value)
Set output file.- Specified by:
setOutputFile
in interfaceadams.core.io.FileWriter
- Parameters:
value
- file
-
getOutputFile
public adams.core.io.PlaceholderFile getOutputFile()
Get output file.- Specified by:
getOutputFile
in interfaceadams.core.io.FileWriter
- Returns:
- file
-
outputFileTipText
public String outputFileTipText()
Returns the tip text for this property.- Specified by:
outputFileTipText
in 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:
read
in 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:
write
in classAbstractResultsHandler
- Parameters:
results
- the results to store- Returns:
- null if successful, otherwise error message
-
-