Package weka.knowledgeflow.steps
Interface Step
-
- All Known Implementing Classes:
AlterRelationName,Appender,ASEvaluator,ASSearchStrategy,Associator,AttributeSummarizer,BaseSimpleDataVisualizer,BaseStep,Block,BoundaryPlotter,ClassAssigner,Classifier,ClassifierPerformanceEvaluator,ClassValuePicker,Clusterer,ClustererPerformanceEvaluator,CostBenefitAnalysis,CrossValidationFoldMaker,DataGenerator,DataGrid,DataVisualizer,Dummy,ExecuteProcess,Filter,FlowByExpression,GetDataFromResult,GraphViewer,ImageSaver,ImageViewer,IncrementalClassifierEvaluator,InstanceStreamToBatchMaker,Job,Join,Loader,MakeResourceIntensive,MemoryBasedDataSource,ModelPerformanceChart,Note,PredictionAppender,Saver,ScatterPlotMatrix,SendToPerspective,SerializedModelSaver,SetPropertiesFromEnvironment,SetVariables,Sorter,StorePropertiesInEnvironment,StripChart,SubstringLabeler,SubstringReplacer,TestSetMaker,TextSaver,TextViewer,TrainingSetMaker,TrainTestSplitMaker,WekaAlgorithmWrapper,WriteDataToResult,WriteWekaLog
public interface StepClient API for Knowledge Flow steps. Typically, an implementation would extend BaseStep. A minimal subset of the methods in this class that a simple implementation extending BaseStep would need to address is also specified in the BaseStepExtender interface.- Version:
- $Revision: $
- Author:
- Mark Hall (mhall{[at]}pentaho{[dot]}com)
- See Also:
BaseStep,BaseStepExtender
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetCustomEditorForStep()Return the fully qualified name of a custom editor component (JComponent) to use for editing the properties of the step.DefaultsgetDefaultSettings()Get default settings for the step (if any).java.util.List<java.lang.String>getIncomingConnectionTypes()Get a list of incoming connection types that this step can accept.java.util.Map<java.lang.String,java.lang.String>getInteractiveViewers()When running in a graphical execution environment a step can make one or more popup Viewer components available.java.util.Map<java.lang.String,StepInteractiveViewer>getInteractiveViewersImpls()An alternative to getStepInteractiveViewers that returns a Map of instantiated StepInteractiveViewer objects.java.lang.StringgetName()Get the name of this stepjava.util.List<java.lang.String>getOutgoingConnectionTypes()Get a list of outgoing connection types that this step can produce.StepManagergetStepManager()Get the step manager in use with this stepInstancesoutputStructureForConnectionType(java.lang.String connectionName)If possible, get the output structure for the named connection type as a header-only set of instances.InstancesoutputStructureForConnectionType(java.lang.String connectionName, Environment env)If possible, get the output structure for the named connection type as a header-only set of instances.voidprocessIncoming(Data data)Process an incoming data payload (if the step accepts incoming connections)voidsetName(java.lang.String name)Set the name for this stepvoidsetStepManager(StepManager manager)Set the step manager to use with this step.voidstart()Start executing (if this component is a start point)voidstepInit()Initialize the step.voidstop()Request a stop to all processing by this step (as soon as possible)
-
-
-
Method Detail
-
getStepManager
StepManager getStepManager()
Get the step manager in use with this step- Returns:
- the step manager
-
setStepManager
void setStepManager(StepManager manager)
Set the step manager to use with this step. The execution environment will call this method to provide a StepManager.- Parameters:
manager- the step manager to use
-
getName
java.lang.String getName()
Get the name of this step- Returns:
- the name of this step
-
setName
void setName(java.lang.String name)
Set the name for this step- Parameters:
name- the name for this step
-
stepInit
void stepInit() throws WekaExceptionInitialize the step.- Throws:
WekaException- if a problem occurs during initialization
-
getIncomingConnectionTypes
java.util.List<java.lang.String> getIncomingConnectionTypes()
Get a list of incoming connection types that this step can accept. Ideally (and if appropriate), this should take into account the state of the step and any existing incoming connections. E.g. a step might be able to accept one (and only one) incoming batch data connection.- Returns:
- a list of incoming connections that this step can accept given its current state
-
getOutgoingConnectionTypes
java.util.List<java.lang.String> getOutgoingConnectionTypes()
Get a list of outgoing connection types that this step can produce. Ideally (and if appropriate), this should take into account the state of the step and the incoming connections. E.g. depending on what incoming connection is present, a step might be able to produce a trainingSet output, a testSet output or neither, but not both.- Returns:
- a list of outgoing connections that this step can produce
-
start
void start() throws WekaExceptionStart executing (if this component is a start point)- Throws:
WekaException- if a problem occurs
-
stop
void stop()
Request a stop to all processing by this step (as soon as possible)
-
processIncoming
void processIncoming(Data data) throws WekaException
Process an incoming data payload (if the step accepts incoming connections)- Parameters:
data- the data to process- Throws:
WekaException- if a problem occurs
-
outputStructureForConnectionType
Instances outputStructureForConnectionType(java.lang.String connectionName) throws WekaException
If possible, get the output structure for the named connection type as a header-only set of instances. Can return null if the specified connection type is not representable as Instances or cannot be determined at present.- Parameters:
connectionName- the name of the connection type to get the output structure for- Returns:
- the output structure as a header-only Instances object
- Throws:
WekaException- if a problem occurs
-
outputStructureForConnectionType
Instances outputStructureForConnectionType(java.lang.String connectionName, Environment env) throws WekaException
If possible, get the output structure for the named connection type as a header-only set of instances. Can return null if the specified connection type is not representable as Instances or cannot be determined at present.- Parameters:
connectionName- the name of the connection type to get the output structure forenv- Environment variables- Returns:
- the output structure as a header-only Instances object
- Throws:
WekaException- if a problem occurs
-
getCustomEditorForStep
java.lang.String getCustomEditorForStep()
Return the fully qualified name of a custom editor component (JComponent) to use for editing the properties of the step. This method can return null, in which case the system will dynamically generate an editor using the GenericObjectEditor- Returns:
- the fully qualified name of a step editor component
-
getInteractiveViewers
java.util.Map<java.lang.String,java.lang.String> getInteractiveViewers()
When running in a graphical execution environment a step can make one or more popup Viewer components available. These might be used to display results, graphics etc. Returning null indicates that the step has no such additional graphical views. The map returned by this method should be keyed by action name (e.g. "View results"), and values should be fully qualified names of the corresponding StepInteractiveView implementation. Furthermore, the contents of this map can (and should) be dependent on whether a particular viewer should be made available - i.e. if execution hasn't occurred yet, or if a particular incoming connection type is not present, then it might not be possible to view certain results. Viewers can implement StepInteractiveView directly (in which case they need to extends JPanel), or extends the AbstractInteractiveViewer class. The later extends JPanel, uses a BorderLayout, provides a "Close" button and a method to add additional buttons.- Returns:
- a map of viewer component names, or null if this step has no graphical views
-
getInteractiveViewersImpls
java.util.Map<java.lang.String,StepInteractiveViewer> getInteractiveViewersImpls()
An alternative to getStepInteractiveViewers that returns a Map of instantiated StepInteractiveViewer objects. Generally, getInteractiveViewers() is the preferred mechanism to specify any interactive viewers, as it does not require Steps to import and instantiate GUI classes. However, in some cases it might be unavoidable (e.g. Groovy script compilation involves custom classloaders), in these cases this method can be used instead.- Returns:
- a map of instantiated instances of StepInteractiveViewers
-
getDefaultSettings
Defaults getDefaultSettings()
Get default settings for the step (if any). Returning null indicates that the step has no user-editable defaults.- Returns:
- the default settings
-
-