|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectadams.core.ConsoleObject
adams.core.option.AbstractOptionHandler
adams.flow.core.AbstractActor
adams.flow.sink.AbstractSink
adams.flow.sink.AbstractFileWriter
adams.flow.sink.WekaFileWriter
public class WekaFileWriter
Actor for saving a weka.core.Instances object as file.
The relation name of the incoming dataset can be used to replace the current filename (path and extension are kept).
-D <int> (property: debugLevel) The greater the number the more additional info the scheme may output to the console (0 = off). default: 0 minimum: 0
-name <java.lang.String> (property: name) The name of the actor. default: WekaFileWriter
-annotation <adams.core.base.BaseText> (property: annotations) The annotations to attach to this actor. default:
-skip (property: skip) If set to true, transformation is skipped and the input token is just forwarded as it is.
-stop-flow-on-error (property: stopFlowOnError) If set to true, the flow gets stopped in case this actor encounters an error; useful for critical actors.
-output <adams.core.io.PlaceholderFile> (property: outputFile) The filename of the dataset to write (the file extension determines the file format). default: .
-use-relation (property: useRelationNameAsFilename) If set to true, then the relation name replaces the name of the output file; eg if the output file is '/some/where/file.arff' and the relation is 'anneal' then the resulting file name will be '/some/where/anneal.arff'.
-use-custom (property: useCustomSaver) If set to true, then the custom saver will be used for saving the data.
-saver <weka.core.converters.AbstractFileSaver [options]> (property: customSaver) The custom saver to use if enabled. default: weka.core.converters.ArffSaver
| Field Summary | |
|---|---|
protected weka.core.converters.AbstractFileSaver |
m_CustomSaver
the custom saver. |
protected boolean |
m_UseCustomSaver
whether to use a custom converter. |
protected boolean |
m_UseRelationNameAsFilename
whether to use the relation name as filename. |
| Fields inherited from class adams.flow.sink.AbstractFileWriter |
|---|
m_OutputFile |
| Fields inherited from class adams.flow.sink.AbstractSink |
|---|
BACKUP_INPUT, m_InputToken |
| Fields inherited from class adams.flow.core.AbstractActor |
|---|
FILE_EXTENSION, FILE_EXTENSION_GZ, m_Annotations, m_BackupState, m_DetectedObjectVariables, m_DetectedVariables, m_ErrorHandler, m_Executed, m_FullName, m_Headless, m_Name, m_Parent, m_Root, m_Self, m_Skip, m_StopFlowOnError, m_StopMessage, m_Stopped, m_StorageHandler, m_VariablesUpdated |
| Fields inherited from class adams.core.option.AbstractOptionHandler |
|---|
m_DebugLevel, m_OptionManager |
| Constructor Summary | |
|---|---|
WekaFileWriter()
|
|
| Method Summary | |
|---|---|
Class[] |
accepts()
Returns the class that the consumer accepts. |
String |
customSaverTipText()
Returns the tip text for this property. |
void |
defineOptions()
Adds options to the internal list of options. |
protected String |
doExecute()
Executes the flow item. |
weka.core.converters.AbstractFileSaver |
getCustomSaver()
Returns the custom saver in use. |
boolean |
getUseCustomSaver()
Returns whether a custom saver is used or not. |
boolean |
getUseRelationNameAsFilename()
Returns whether the relation name is used as filename. |
String |
globalInfo()
Returns a string describing the object. |
String |
outputFileTipText()
Returns the tip text for this property. |
protected String |
performSetUpChecks(boolean fromSetUp)
Hook for performing setup checks -- used in setUp() and preExecute(). |
void |
setCustomSaver(weka.core.converters.AbstractFileSaver value)
Sets the custom saver to use. |
void |
setUseCustomSaver(boolean value)
Sets whether to use a custom saver or not. |
void |
setUseRelationNameAsFilename(boolean value)
Sets whether to use the relation name as filename instead. |
String |
useCustomSaverTipText()
Returns the tip text for this property. |
String |
useRelationNameAsFilenameTipText()
Returns the tip text for this property. |
| Methods inherited from class adams.flow.sink.AbstractFileWriter |
|---|
getDefaultOutputFile, getOutputFile, getQuickInfo, setOutputFile, setUp |
| Methods inherited from class adams.flow.sink.AbstractSink |
|---|
backupState, input, restoreState, wrapUp |
| Methods inherited from class adams.core.option.AbstractOptionHandler |
|---|
cleanUpOptions, debug, debugLevelTipText, finishInit, getDebugLevel, getOptionManager, isDebugOn, newOptionManager, setDebugLevel, toCommandLine, toString |
| Methods inherited from class adams.core.ConsoleObject |
|---|
getDebugging, getSystemErr, getSystemOut |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected boolean m_UseRelationNameAsFilename
protected boolean m_UseCustomSaver
protected weka.core.converters.AbstractFileSaver m_CustomSaver
| Constructor Detail |
|---|
public WekaFileWriter()
| Method Detail |
|---|
public String globalInfo()
globalInfo in class AbstractOptionHandlerpublic void defineOptions()
defineOptions in interface OptionHandlerdefineOptions in class AbstractFileWriterpublic String outputFileTipText()
outputFileTipText in class AbstractFileWriterpublic void setUseRelationNameAsFilename(boolean value)
value - if true then the relation name will be usedpublic boolean getUseRelationNameAsFilename()
public String useRelationNameAsFilenameTipText()
public void setUseCustomSaver(boolean value)
value - if true then the custom saver will be usedpublic boolean getUseCustomSaver()
public String useCustomSaverTipText()
public void setCustomSaver(weka.core.converters.AbstractFileSaver value)
value - the custom saverpublic weka.core.converters.AbstractFileSaver getCustomSaver()
public String customSaverTipText()
public Class[] accepts()
protected String performSetUpChecks(boolean fromSetUp)
performSetUpChecks in class AbstractActorfromSetUp - whether the method has been called from within setUp()
protected String doExecute()
doExecute in class AbstractActor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||