|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Saver
Interface to something that can save Instances to an output destination in some format.
| Field Summary | |
|---|---|
static int |
BATCH
|
static int |
INCREMENTAL
|
static int |
NONE
The retrieval modes |
| Method Summary | |
|---|---|
java.lang.String |
filePrefix()
Gets the file prefix This method is used in the KnowledgeFlow GUI. |
java.lang.String |
getFileExtension()
Gets the file extension |
int |
getWriteMode()
Gets the write mode |
java.lang.String |
retrieveDir()
Gets the driectory of the output file This method is used in the KnowledgeFlow GUI. |
void |
setDestination(java.io.File file)
Resets the Saver object and sets the destination to be the supplied File object. |
void |
setDestination(java.io.OutputStream output)
Resets the Saver object and sets the destination to be the supplied InputStream. |
void |
setDir(java.lang.String dir)
Sets the directory of the output file. |
void |
setDirAndPrefix(java.lang.String relationName,
java.lang.String add)
Sets the file prefix and the directory. |
void |
setFile(java.io.File file)
Sets the output file |
void |
setFilePrefix(java.lang.String prefix)
Sets the file prefix. |
void |
setInstances(Instances instances)
Sets the instances to be saved |
void |
setRetrieval(int mode)
Sets the retrieval mode |
void |
writeBatch()
Writes to a destination in batch mode |
void |
writeIncremental(Instance inst)
Writes to a destination in incremental mode. |
| Methods inherited from interface weka.core.RevisionHandler |
|---|
getRevision |
| Field Detail |
|---|
static final int NONE
static final int BATCH
static final int INCREMENTAL
| Method Detail |
|---|
void setDestination(java.io.File file)
throws java.io.IOException
file - the File
java.io.IOException - if an error occurs
support loading from a File.
public_normal_behavior requires: file != null && (* file exists *); modifiable: model_sourceSupplied, model_structureDetermined; ensures: model_sourceSupplied == true && model_structureDetermined == false; also public_exceptional_behavior requires: file == null || (* file does not exist *); signals: (IOException);
void setDestination(java.io.OutputStream output)
throws java.io.IOException
output - the output stream
java.io.IOException - if this Loader doesn't
support loading from a File.void setRetrieval(int mode)
mode - an integer representing a retrieval mode
java.lang.String getFileExtension()
throws java.lang.Exception
java.lang.Exception - exception if a Saver not implementing FileSourcedConverter is used.
void setFile(java.io.File file)
throws java.io.IOException
file - the output file
java.io.IOException - exception if new output file cannot be set
void setFilePrefix(java.lang.String prefix)
throws java.lang.Exception
prefix - the prefix of the file name
java.lang.Exception - exception if a Saver not implementing FileSourcedConverter is used.
java.lang.String filePrefix()
throws java.lang.Exception
java.lang.Exception - exception if a Saver not implementing FileSourcedConverter is used.
void setDir(java.lang.String dir)
throws java.io.IOException
dir - a string containing the path and name of the directory
java.io.IOException - exception if a Saver not implementing FileSourcedConverter is used.
void setDirAndPrefix(java.lang.String relationName,
java.lang.String add)
throws java.io.IOException
relationName - the name of the realtion to be savedadd - additional String for the file name
java.io.IOException - exception if a Saver not implementing FileSourcedConverter is used.
java.lang.String retrieveDir()
throws java.io.IOException
java.io.IOException - exception if a Saver not implementing FileSourcedConverter is used.void setInstances(Instances instances)
instances - the instances
void writeBatch()
throws java.io.IOException
java.io.IOException - throws exection if writting in batch mode is not possible
void writeIncremental(Instance inst)
throws java.io.IOException
inst - the instance to write, if null the output file is closed
java.io.IOException - throws exception if incremental writting is not possibleint getWriteMode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||