| |
|
| weka.core.converters.Saver
All known Subclasses: weka.core.converters.AbstractSaver,
Saver | public interface Saver extends Serializable(Code) | | Interface to something that can save Instances to an output destination in some
format.
author: Mark Hall (mhall@cs.waikato.ac.nz) author: Stefan Mutter (mutter@cs.waikato.ac.nz) version: $Revision: 1.3 $ |
BATCH | final static int BATCH(Code) | | |
INCREMENTAL | final static int INCREMENTAL(Code) | | |
NONE | final static int NONE(Code) | | The retrieval modes
|
filePrefix | String filePrefix() throws Exception(Code) | | Gets the file prefix
This method is used in the KnowledgeFlow GUI.
the prefix of the file name throws: Exception - exception if a Saver not implementing FileSourcedConverter is used. |
getFileExtension | String getFileExtension() throws Exception(Code) | | Gets the file extension
a string conatining the file extension (including the '.') throws: Exception - exception if a Saver not implementing FileSourcedConverter is used. |
getWriteMode | public int getWriteMode()(Code) | | Gets the write mode
an integer representing the write mode |
retrieveDir | String retrieveDir() throws IOException(Code) | | Gets the driectory of the output file
This method is used in the KnowledgeFlow GUI.
the directory as a string throws: IOException - exception if a Saver not implementing FileSourcedConverter is used. |
setDestination | void setDestination(File file) throws IOException(Code) | | Resets the Saver object and sets the destination to be
the supplied File object.
Parameters: file - the File exception: IOException - if an error occurssupport loading from a File.public_normal_behaviorrequires: file != null&& (* file exists *);modifiable: model_sourceSupplied, model_structureDetermined;ensures: model_sourceSupplied == true && model_structureDetermined == false;alsopublic_exceptional_behaviorrequires: file == null|| (* file does not exist *);signals: (IOException); |
setDestination | void setDestination(OutputStream output) throws IOException(Code) | | Resets the Saver object and sets the destination to be
the supplied InputStream.
Parameters: output - the output stream exception: IOException - if this Loader doesn'tsupport loading from a File. |
setDir | void setDir(String dir) throws IOException(Code) | | Sets the directory of the output file.
This method is used in the KnowledgeFlow GUI.
Parameters: dir - a string containing the path and name of the directory throws: IOException - exception if a Saver not implementing FileSourcedConverter is used. |
setDirAndPrefix | public void setDirAndPrefix(String relationName, String add) throws IOException(Code) | | Sets the file prefix and the directory.
This method is used in the KnowledgeFlow GUI.
Parameters: relationName - the name of the realtion to be saved Parameters: add - additional String for the file name throws: IOException - exception if a Saver not implementing FileSourcedConverter is used. |
setFile | void setFile(File file) throws IOException(Code) | | Sets the output file
Parameters: file - the output file throws: IOException - exception if new output file cannot be set |
setFilePrefix | void setFilePrefix(String prefix) throws Exception(Code) | | Sets the file prefix.
This method is used in the KnowledgeFlow GUI.
Parameters: prefix - the prefix of the file name throws: Exception - exception if a Saver not implementing FileSourcedConverter is used. |
setInstances | void setInstances(Instances instances)(Code) | | Sets the instances to be saved
Parameters: instances - the instances |
setRetrieval | void setRetrieval(int mode)(Code) | | Sets the retrieval mode
Parameters: mode - an integer representing a retrieval mode |
writeBatch | void writeBatch() throws IOException(Code) | | Writes to a destination in batch mode
throws: IOException - throws exection if writting in batch mode is not possible |
writeIncremental | void writeIncremental(Instance inst) throws IOException(Code) | | Writes to a destination in incremental mode.
If the instance is null, the outputfile will be closed.
Parameters: inst - the instance to write, if null the output file is closed throws: IOException - throws exception if incremental writting is not possible |
|
|
|