类 AbstractSaver
java.lang.Object
weka.core.converters.AbstractSaver
- 所有已实现的接口:
Serializable
,CapabilitiesHandler
,Saver
,RevisionHandler
- 直接已知子类:
AbstractFileSaver
,DatabaseSaver
Abstract class for Saver
- 版本:
- $Revision: 1.4 $
- 作者:
- Richard Kirkby (rkirkby@cs.waikato.ac.nz), Stefan Mutter (mutter@cs.waikato.ac.nz)
- 另请参阅:
-
字段概要
从接口继承的字段 weka.core.converters.Saver
BATCH, INCREMENTAL, NONE
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
cancel()
Cancels the incremental saving process if the write mode is CANCEL.Default implementation throws an IOException.Returns the Capabilities of this saver.Default implementation throws an IOException.Gets instances that should be stored.int
Gets the write mode.void
resets the optionsvoid
Resets the structure (header information of the instances)Default implementation throws an IOException.void
setDestination
(File file) Default implementation throws an IOException.void
setDestination
(OutputStream output) Default implementation throws an IOException.void
Default implementation throws an IOException.void
setDirAndPrefix
(String relationName, String add) Default implementation throws an IOException.void
Default implementation throws an IOException.void
setFilePrefix
(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
Writes to a file in batch mode To be overridden.void
Method for incremental saving.从接口继承的方法 weka.core.RevisionHandler
getRevision
-
构造器详细资料
-
AbstractSaver
public AbstractSaver()
-
-
方法详细资料
-
resetOptions
public void resetOptions()resets the options -
resetStructure
public void resetStructure()Resets the structure (header information of the instances) -
setRetrieval
public void setRetrieval(int mode) Sets the retrieval mode.- 指定者:
setRetrieval
在接口中Saver
- 参数:
mode
- the retrieval mode
-
getWriteMode
public int getWriteMode()Gets the write mode.- 指定者:
getWriteMode
在接口中Saver
- 返回:
- the write mode
-
setInstances
Sets instances that should be stored.- 指定者:
setInstances
在接口中Saver
- 参数:
instances
- the instances
-
getInstances
Gets instances that should be stored.- 返回:
- the instances
-
setDestination
Default implementation throws an IOException.- 指定者:
setDestination
在接口中Saver
- 参数:
file
- the File- 抛出:
IOException
- always
-
setDestination
Default implementation throws an IOException.- 指定者:
setDestination
在接口中Saver
- 参数:
output
- the OutputStream- 抛出:
IOException
- always
-
getCapabilities
Returns the Capabilities of this saver. Derived savers have to override this method to enable capabilities.- 指定者:
getCapabilities
在接口中CapabilitiesHandler
- 返回:
- the capabilities of this object
- 另请参阅:
-
setStructure
Sets the strcuture of the instances for the first step of incremental saving. The instances only need to have a header.- 参数:
headerInfo
- an instances object.- 返回:
- the appropriate write mode
-
cancel
public void cancel()Cancels the incremental saving process if the write mode is CANCEL. -
writeIncremental
Method for incremental saving. Standard behaviour: no incremental saving is possible, therefore throw an IOException. An incremental saving process is stopped by calling this method with null.- 指定者:
writeIncremental
在接口中Saver
- 参数:
i
- the instance to be saved- 抛出:
IOException
- IOEXception if the instance acnnot be written to the specified destination
-
writeBatch
Writes to a file in batch mode To be overridden.- 指定者:
writeBatch
在接口中Saver
- 抛出:
IOException
- exception if writting is not possible
-
getFileExtension
Default implementation throws an IOException.- 指定者:
getFileExtension
在接口中Saver
- 返回:
- a string conatining the file extension (including the '.')
- 抛出:
IOException
- alwaysException
- exception if a Saver not implementing FileSourcedConverter is used.
-
setFile
Default implementation throws an IOException.- 指定者:
setFile
在接口中Saver
- 参数:
file
- the File- 抛出:
IOException
- always
-
setFilePrefix
Default implementation throws an IOException.- 指定者:
setFilePrefix
在接口中Saver
- 参数:
prefix
- the file prefix- 抛出:
IOException
- alwaysException
- exception if a Saver not implementing FileSourcedConverter is used.
-
filePrefix
Default implementation throws an IOException.- 指定者:
filePrefix
在接口中Saver
- 返回:
- the prefix of the file name
- 抛出:
IOException
- alwaysException
- exception if a Saver not implementing FileSourcedConverter is used.
-
setDir
Default implementation throws an IOException.- 指定者:
setDir
在接口中Saver
- 参数:
dir
- the name of the directory to save in- 抛出:
IOException
- always
-
setDirAndPrefix
Default implementation throws an IOException.- 指定者:
setDirAndPrefix
在接口中Saver
- 参数:
relationName
-add
-- 抛出:
IOException
- always
-
retrieveDir
Default implementation throws an IOException.- 指定者:
retrieveDir
在接口中Saver
- 返回:
- the directory as a string
- 抛出:
IOException
- always
-