Package adams.data.io.input
Class AbstractWekaSpreadSheetReader
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.io.input.AbstractSpreadSheetReader
-
- adams.data.io.input.AbstractWekaSpreadSheetReader
-
- All Implemented Interfaces:
adams.core.AdditionalInformationHandler
,adams.core.Destroyable
,adams.core.ErrorProvider
,adams.core.GlobalInfoSupporter
,adams.core.io.EncodingSupporter
,adams.core.io.FileFormatHandler
,adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,adams.core.option.OptionHandler
,adams.core.SizeOfHandler
,adams.core.Stoppable
,adams.core.StoppableWithFeedback
,adams.data.io.input.SpreadSheetReader
,adams.data.spreadsheet.DataRowTypeHandler
,adams.data.spreadsheet.SpreadSheetTypeHandler
,Serializable
- Direct Known Subclasses:
ArffSpreadSheetReader
,JSONSpreadSheetReader
,LibSVMSpreadSheetReader
,MatlabSpreadSheetReader
,SVMLightSpreadSheetReader
,XrffSpreadSheetReader
public abstract class AbstractWekaSpreadSheetReader extends adams.data.io.input.AbstractSpreadSheetReader
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.AbstractFileLoader
m_Loader
the file loader to use.
-
Constructor Summary
Constructors Constructor Description AbstractWekaSpreadSheetReader()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected adams.data.spreadsheet.SpreadSheet
doRead(File file)
Performs the actual reading.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.input.AbstractSpreadSheetReader.InputType
getInputType()
Returns how to read the data, from a file, stream or reader.protected void
initialize()
Initializes the members.protected abstract weka.core.converters.AbstractFileLoader
newLoader()
Returns an instance of the file loader.-
Methods inherited from class adams.data.io.input.AbstractSpreadSheetReader
canDecompress, check, dataRowTypeTipText, defineOptions, doRead, doRead, encodingTipText, getAdditionalInformation, getDataRowType, getDefaultDataRowType, getDefaultFormatExtension, getDefaultSpreadSheet, getEncoding, getLastError, getReaders, getSpreadSheetType, hasLastError, isStopped, read, read, read, read, runReader, setDataRowType, setEncoding, setLastError, setSpreadSheetType, spreadSheetTypeTipText, stopExecution, supportsCompressedInput
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, 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
-
-
-
-
Method Detail
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initialize
in classadams.data.io.input.AbstractSpreadSheetReader
-
newLoader
protected abstract weka.core.converters.AbstractFileLoader newLoader()
Returns an instance of the file loader.- Returns:
- the file loader
-
getInputType
protected adams.data.io.input.AbstractSpreadSheetReader.InputType getInputType()
Returns how to read the data, from a file, stream or reader.- Specified by:
getInputType
in classadams.data.io.input.AbstractSpreadSheetReader
- Returns:
- how to read the data
-
getFormatDescription
public String getFormatDescription()
Returns a string describing the format (used in the file chooser).- Specified by:
getFormatDescription
in interfaceadams.core.io.FileFormatHandler
- Specified by:
getFormatDescription
in interfaceadams.data.io.input.SpreadSheetReader
- Specified by:
getFormatDescription
in classadams.data.io.input.AbstractSpreadSheetReader
- 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.core.io.FileFormatHandler
- Specified by:
getFormatExtensions
in interfaceadams.data.io.input.SpreadSheetReader
- Specified by:
getFormatExtensions
in classadams.data.io.input.AbstractSpreadSheetReader
- Returns:
- the extension (without the dot!)
-
doRead
protected adams.data.spreadsheet.SpreadSheet doRead(File file)
Performs the actual reading.- Overrides:
doRead
in classadams.data.io.input.AbstractSpreadSheetReader
- Parameters:
file
- the file to read from- Returns:
- the spreadsheet or null in case of an error
-
-