|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.core.converters.AbstractSaver
public abstract class AbstractSaver
Abstract class for Saver
| Field Summary |
|---|
| Fields inherited from interface weka.core.converters.Saver |
|---|
BATCH, INCREMENTAL, NONE |
| Constructor Summary | |
|---|---|
AbstractSaver()
|
|
| Method Summary | |
|---|---|
void |
cancel()
Cancels the incremental saving process if the write mode is CANCEL. |
java.lang.String |
filePrefix()
Default implementation throws an IOException. |
Capabilities |
getCapabilities()
Returns the Capabilities of this saver. |
java.lang.String |
getFileExtension()
Default implementation throws an IOException. |
Instances |
getInstances()
Gets instances that should be stored. |
int |
getWriteMode()
Gets the write mode. |
void |
resetOptions()
resets the options |
void |
resetStructure()
Resets the structure (header information of the instances) |
java.lang.String |
retrieveDir()
Default implementation throws an IOException. |
void |
setDestination(java.io.File file)
Default implementation throws an IOException. |
void |
setDestination(java.io.OutputStream output)
Default implementation throws an IOException. |
void |
setDir(java.lang.String dir)
Default implementation throws an IOException. |
void |
setDirAndPrefix(java.lang.String relationName,
java.lang.String add)
Default implementation throws an IOException. |
void |
setFile(java.io.File file)
Default implementation throws an IOException. |
void |
setFilePrefix(java.lang.String prefix)
Default implementation throws an IOException. |
void |
setInstances(Instances instances)
Sets instances that should be stored. |
void |
setRetrieval(int mode)
Sets the retrieval mode. |
int |
setStructure(Instances headerInfo)
Sets the strcuture of the instances for the first step of incremental saving. |
abstract void |
writeBatch()
Writes to a file in batch mode To be overridden. |
void |
writeIncremental(Instance i)
Method for incremental saving. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface weka.core.RevisionHandler |
|---|
getRevision |
| Constructor Detail |
|---|
public AbstractSaver()
| Method Detail |
|---|
public void resetOptions()
public void resetStructure()
public void setRetrieval(int mode)
setRetrieval in interface Savermode - the retrieval modepublic int getWriteMode()
getWriteMode in interface Saverpublic void setInstances(Instances instances)
setInstances in interface Saverinstances - the instancespublic Instances getInstances()
public void setDestination(java.io.File file)
throws java.io.IOException
setDestination in interface Saverfile - the File
java.io.IOException - always
public void setDestination(java.io.OutputStream output)
throws java.io.IOException
setDestination in interface Saveroutput - the OutputStream
java.io.IOException - alwayspublic Capabilities getCapabilities()
getCapabilities in interface CapabilitiesHandlerCapabilitiespublic int setStructure(Instances headerInfo)
headerInfo - an instances object.
public void cancel()
public void writeIncremental(Instance i)
throws java.io.IOException
writeIncremental in interface Saveri - the instance to be saved
java.io.IOException - IOEXception if the instance acnnot be written to the specified destination
public abstract void writeBatch()
throws java.io.IOException
writeBatch in interface Saverjava.io.IOException - exception if writting is not possible
public java.lang.String getFileExtension()
throws java.lang.Exception
getFileExtension in interface Saverjava.io.IOException - always
java.lang.Exception - exception if a Saver not implementing FileSourcedConverter is used.
public void setFile(java.io.File file)
throws java.io.IOException
setFile in interface Saverfile - the File
java.io.IOException - always
public void setFilePrefix(java.lang.String prefix)
throws java.lang.Exception
setFilePrefix in interface Saverprefix - the file prefix
java.io.IOException - always
java.lang.Exception - exception if a Saver not implementing FileSourcedConverter is used.
public java.lang.String filePrefix()
throws java.lang.Exception
filePrefix in interface Saverjava.io.IOException - always
java.lang.Exception - exception if a Saver not implementing FileSourcedConverter is used.
public void setDir(java.lang.String dir)
throws java.io.IOException
setDir in interface Saverdir - the name of the directory to save in
java.io.IOException - always
public void setDirAndPrefix(java.lang.String relationName,
java.lang.String add)
throws java.io.IOException
setDirAndPrefix in interface SaverrelationName - add -
java.io.IOException - always
public java.lang.String retrieveDir()
throws java.io.IOException
retrieveDir in interface Saverjava.io.IOException - always
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||