@KFStep(name="Saver", category="DataSinks", toolTipText="Weka saver wrapper", iconPath="") public class Saver extends WekaAlgorithmWrapper implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
m_isDBSaver
True if the saver is a DatabaseSaver
|
protected Saver |
m_saver
The actual saver instance to use
|
protected Instances |
m_structure
Holds the structure
|
m_defaultIconPath, m_defaultPackageIconPath, m_iconPath, m_wrappedAlgorithmm_stepIsResourceIntensive, m_stepManager, m_stepName| Constructor and Description |
|---|
Saver() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCustomEditorForStep()
Return the fully qualified name of a custom editor component (JComponent)
to use for editing the properties of the step.
|
java.util.List<java.lang.String> |
getIncomingConnectionTypes()
Get a list of incoming connection types that this step can receive at this
time
|
java.util.List<java.lang.String> |
getOutgoingConnectionTypes()
Get a list of outgoing connection types that this step can produce at this
time
|
boolean |
getRelationNameForFilename()
Get whether the relation name is the primary part of the filename.
|
Saver |
getSaver()
Get the saver instance that is wrapped by this step.
|
java.lang.Class |
getWrappedAlgorithmClass()
Get the class of the wrapped algorithm
|
void |
processIncoming(Data data)
Processes incoming data
|
protected java.lang.String |
sanitizeFilename(java.lang.String filename)
makes sure that the filename is valid, i.e., replaces slashes, backslashes
and colons with underscores ("_").
|
protected void |
saveBatch(Instances data,
java.lang.Integer setNum,
java.lang.Integer maxSetNum,
java.lang.String connectionName)
Save a batch of instances
|
void |
setRelationNameForFilename(boolean r)
Set whether to use the relation name as the primary part of the filename.
|
void |
setSaver(Saver saver)
Set the saver instance that is wrapped by this step.
|
void |
setWrappedAlgorithm(java.lang.Object algo)
Set the actual wrapped algorithm instance
|
void |
stepInit()
Initialize the step
|
getDefaultIconPath, getDefaultPackageLevelIconPath, getIconPath, getWrappedAlgorithm, globalInfoenvironmentSubstitute, getDefaultSettings, getInteractiveViewers, getInteractiveViewersImpls, getName, getStepManager, isResourceIntensive, isStopRequested, outputStructureForConnectionType, setName, setStepIsResourceIntensive, setStepManager, setStepMustRunSingleThreaded, start, stepMustRunSingleThreaded, stopprotected Instances m_structure
protected Saver m_saver
protected boolean m_isDBSaver
public java.lang.Class getWrappedAlgorithmClass()
getWrappedAlgorithmClass in class WekaAlgorithmWrapperpublic void setWrappedAlgorithm(java.lang.Object algo)
setWrappedAlgorithm in class WekaAlgorithmWrapperalgo - the wrapped algorithm instancepublic Saver getSaver()
getWrappedAlgorithm()@ProgrammaticProperty public void setSaver(Saver saver)
setWrappedAlgorithm().saver - the saver instance that is wrapped by this steppublic boolean getRelationNameForFilename()
public void setRelationNameForFilename(boolean r)
r - true if the relation name is to be part of the filename.public void stepInit()
throws WekaException
stepInit in interface BaseStepExtenderstepInit in interface StepWekaException - if a problem occurs during initializationprotected void saveBatch(Instances data, java.lang.Integer setNum, java.lang.Integer maxSetNum, java.lang.String connectionName) throws WekaException
data - the Instances to savesetNum - the set/fold number of this batchmaxSetNum - the maximum number of sets/folds in this batchconnectionName - the connection type that this batch arrived inWekaException - if a problem occurspublic void processIncoming(Data data) throws WekaException
processIncoming in interface BaseStepExtenderprocessIncoming in interface StepprocessIncoming in class BaseStepdata - the data processWekaException - if a problem occurspublic java.util.List<java.lang.String> getIncomingConnectionTypes()
getIncomingConnectionTypes in interface BaseStepExtendergetIncomingConnectionTypes in interface Steppublic java.util.List<java.lang.String> getOutgoingConnectionTypes()
getOutgoingConnectionTypes in interface BaseStepExtendergetOutgoingConnectionTypes in interface Stepprotected java.lang.String sanitizeFilename(java.lang.String filename)
filename - the filename to cleansepublic java.lang.String getCustomEditorForStep()
getCustomEditorForStep in interface StepgetCustomEditorForStep in class BaseStep