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:
AdditionalInformationHandler
,Destroyable
,GlobalInfoSupporter
,EncodingSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,Stoppable
,StoppableWithFeedback
,SpreadSheetWriter
,Serializable
- Direct Known Subclasses:
ArffSpreadSheetWriter
,JSONSpreadSheetWriter
,LibSVMSpreadSheetWriter
,MatlabSpreadSheetWriter
,SVMLightSpreadSheetWriter
,XrffSpreadSheetWriter
public abstract class AbstractWekaSpreadSheetWriter extends AbstractSpreadSheetWriter
Ancestor for WEKA file format readers.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class adams.data.io.output.AbstractSpreadSheetWriter
AbstractSpreadSheetWriter.OutputType
-
-
Field Summary
Fields Modifier and Type Field Description protected weka.core.converters.AbstractFileSaver
m_Saver
the file loader to use.-
Fields inherited from class adams.data.io.output.AbstractSpreadSheetWriter
m_Encoding, m_Stopped
-
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 AbstractWekaSpreadSheetWriter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected boolean
doWrite(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 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
-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, defineOptions, getOptionManager, toCommandLine
-
Methods inherited from interface adams.data.io.output.SpreadSheetWriter
getCorrespondingReader
-
-
-
-
Method Detail
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initialize
in classAbstractSpreadSheetWriter
-
newSaver
protected abstract weka.core.converters.AbstractFileSaver newSaver()
Returns an instance of the file loader.- Returns:
- the file loader
-
getOutputType
protected AbstractSpreadSheetWriter.OutputType getOutputType()
Returns how the data is written.- Specified by:
getOutputType
in classAbstractSpreadSheetWriter
- Returns:
- the type
-
getFormatDescription
public String getFormatDescription()
Returns a string describing the format (used in the file chooser).- Specified by:
getFormatDescription
in interfaceSpreadSheetWriter
- Specified by:
getFormatDescription
in classAbstractSpreadSheetWriter
- 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 interfaceSpreadSheetWriter
- Specified by:
getFormatExtensions
in classAbstractSpreadSheetWriter
- Returns:
- the extension (without the dot!)
-
doWrite
protected boolean doWrite(SpreadSheet content, OutputStream out)
Performs the actual writing. The caller must ensure that the output stream gets closed.- Overrides:
doWrite
in classAbstractSpreadSheetWriter
- Parameters:
content
- the spreadsheet to writeout
- the output stream to write the spreadsheet to- Returns:
- true if successfully written
-
-