Package adams.data.io.output
Class AbstractWekaSpreadSheetWriter
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.io.output.AbstractSpreadSheetWriter
-
- adams.data.io.output.AbstractWekaSpreadSheetWriter
-
- All Implemented Interfaces:
adams.core.AdditionalInformationHandler
,adams.core.Destroyable
,adams.core.GlobalInfoSupporter
,adams.core.io.EncodingSupporter
,adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,adams.core.option.OptionHandler
,adams.core.SizeOfHandler
,adams.core.Stoppable
,adams.core.StoppableWithFeedback
,adams.data.io.output.SpreadSheetWriter
,Serializable
- Direct Known Subclasses:
ArffSpreadSheetWriter
,JSONSpreadSheetWriter
,LibSVMSpreadSheetWriter
,MatlabSpreadSheetWriter
,SVMLightSpreadSheetWriter
,XrffSpreadSheetWriter
public abstract class AbstractWekaSpreadSheetWriter extends adams.data.io.output.AbstractSpreadSheetWriter
Ancestor for WEKA file format readers.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected weka.core.converters.AbstractFileSaver
m_Saver
the file loader to use.
-
Constructor Summary
Constructors Constructor Description AbstractWekaSpreadSheetWriter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected boolean
doWrite(adams.data.spreadsheet.SpreadSheet content, OutputStream out)
Performs the actual writing.String
getFormatDescription()
Returns a string describing the format (used in the file chooser).String[]
getFormatExtensions()
Returns the extension(s) of the format.protected adams.data.io.output.AbstractSpreadSheetWriter.OutputType
getOutputType()
Returns how the data is written.protected void
initialize()
Initializes the members.protected abstract weka.core.converters.AbstractFileSaver
newSaver()
Returns an instance of the file loader.-
Methods inherited from class adams.data.io.output.AbstractSpreadSheetWriter
canCompress, doWrite, doWrite, encodingTipText, getAdditionalInformation, getDefaultFormatExtension, getEncoding, getWriters, isStopped, preWriteFile, reset, setEncoding, stopExecution, supportsCompressedOutput, write, write, write, write
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, defineOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, 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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initialize
in classadams.data.io.output.AbstractSpreadSheetWriter
-
newSaver
protected abstract weka.core.converters.AbstractFileSaver newSaver()
Returns an instance of the file loader.- Returns:
- the file loader
-
getOutputType
protected adams.data.io.output.AbstractSpreadSheetWriter.OutputType getOutputType()
Returns how the data is written.- Specified by:
getOutputType
in classadams.data.io.output.AbstractSpreadSheetWriter
- Returns:
- the type
-
getFormatDescription
public String getFormatDescription()
Returns a string describing the format (used in the file chooser).- Specified by:
getFormatDescription
in interfaceadams.data.io.output.SpreadSheetWriter
- Specified by:
getFormatDescription
in classadams.data.io.output.AbstractSpreadSheetWriter
- Returns:
- a description suitable for displaying in the file chooser
-
getFormatExtensions
public String[] getFormatExtensions()
Returns the extension(s) of the format.- Specified by:
getFormatExtensions
in interfaceadams.data.io.output.SpreadSheetWriter
- Specified by:
getFormatExtensions
in classadams.data.io.output.AbstractSpreadSheetWriter
- Returns:
- the extension (without the dot!)
-
doWrite
protected boolean doWrite(adams.data.spreadsheet.SpreadSheet content, OutputStream out)
Performs the actual writing. The caller must ensure that the output stream gets closed.- Overrides:
doWrite
in classadams.data.io.output.AbstractSpreadSheetWriter
- Parameters:
content
- the spreadsheet to writeout
- the output stream to write the spreadsheet to- Returns:
- true if successfully written
-
-