|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectweka.core.converters.AbstractSaver
weka.core.converters.AbstractFileSaver
Abstract class for Savers that save to a file
Valid options are:
-i input arff file
The input filw in arff format.
-o the output file
The output file. The prefix of the output file is sufficient. If no output file is given, Saver tries to use standard out.
| Field Summary |
| Fields inherited from interface weka.core.converters.Saver |
BATCH, INCREMENTAL, NONE |
| Constructor Summary | |
AbstractFileSaver()
|
|
| Method Summary | |
void |
cancel()
Cancels the incremental saving process. |
java.lang.String |
filePrefix()
Gets the file name prefix |
abstract java.lang.String |
getFileDescription()
to be pverridden |
java.lang.String |
getFileExtension()
Gets ihe file extension. |
java.lang.String[] |
getOptions()
Gets the current settings of the Saver object. |
java.io.BufferedWriter |
getWriter()
Gets the writer |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options. |
void |
resetOptions()
resets the options |
void |
resetWriter()
Sets the writer to null. |
java.lang.String |
retrieveDir()
Gets the directory |
java.io.File |
retrieveFile()
Gets the destination file. |
void |
setDestination(java.io.File file)
Sets the destination file (and directories if necessary). |
void |
setDestination(java.io.OutputStream output)
Sets the destination output stream. |
void |
setDir(java.lang.String dir)
Sets the directory where the instances should be stored |
void |
setDirAndPrefix(java.lang.String relationName,
java.lang.String add)
Sets the directory and the file prefix. |
void |
setFile(java.io.File outputFile)
Sets the destination file. |
void |
setFilePrefix(java.lang.String prefix)
Sets the file name prefix |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
| Methods inherited from class weka.core.converters.AbstractSaver |
getInstances, getWriteMode, resetStructure, setInstances, setRetrieval, setStructure, writeBatch, writeIncremental |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbstractFileSaver()
| Method Detail |
public void resetOptions()
resetOptions in class AbstractSaverpublic java.io.BufferedWriter getWriter()
public void resetWriter()
public java.lang.String getFileExtension()
getFileExtension in interface FileSourcedConvertergetFileExtension in class AbstractSaverpublic java.io.File retrieveFile()
retrieveFile in interface FileSourcedConverter
public void setFile(java.io.File outputFile)
throws java.io.IOException
setFile in interface FileSourcedConvertersetFile in class AbstractSaveroutputFile - the destination file.
java.io.IOException - throws an IOException if file cannot be setpublic void setFilePrefix(java.lang.String prefix)
setFilePrefix in interface SaversetFilePrefix in class AbstractSaverprefix - the file name prefixpublic java.lang.String filePrefix()
filePrefix in interface SaverfilePrefix in class AbstractSaverpublic void setDir(java.lang.String dir)
setDir in interface SaversetDir in class AbstractSaverdir - a string containing the directory path and namepublic java.lang.String retrieveDir()
retrieveDir in interface SaverretrieveDir in class AbstractSaverpublic java.util.Enumeration listOptions()
listOptions in interface OptionHandler
public void setOptions(java.lang.String[] options)
throws java.lang.Exception
-i input arff file
The input filw in arff format.
-o the output file
The output file. The prefix of the output file is sufficient. If no output file is given, Saver tries to use standard out.
setOptions in interface OptionHandleroptions - the list of options as an array of strings
java.lang.Exception - if an option is not supportedpublic java.lang.String[] getOptions()
getOptions in interface OptionHandlerpublic void cancel()
cancel in class AbstractSaver
public void setDestination(java.io.File file)
throws java.io.IOException
setDestination in interface SaversetDestination in class AbstractSaverfile - the File
java.io.IOException - always
public void setDestination(java.io.OutputStream output)
throws java.io.IOException
setDestination in interface SaversetDestination in class AbstractSaveroutput - the output stream.
java.io.IOException - throws an IOException if destination cannot be set
public void setDirAndPrefix(java.lang.String relationName,
java.lang.String add)
setDirAndPrefix in interface SaversetDirAndPrefix in class AbstractSaverrelationName - the name of the relation to saveadd - additional string which should be part of the filenamepublic abstract java.lang.String getFileDescription()
getFileDescription in interface FileSourcedConverter
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||