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 Step
Client 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

  Modifier and Type
  Method
  Description
  `String`
  `getCustomEditorForStep()`
  Return the fully qualified name of a custom editor component (JComponent) to use for editing the properties of the step.
  `Defaults`
  `getDefaultSettings()`
  Get default settings for the step (if any).
  `List<String>`
  `getIncomingConnectionTypes()`
  Get a list of incoming connection types that this step can accept.
  `Map<String,String>`
  `getInteractiveViewers()`
  When running in a graphical execution environment a step can make one or more popup Viewer components available.
  `Map<String,StepInteractiveViewer>`
  `getInteractiveViewersImpls()`
  An alternative to getStepInteractiveViewers that returns a Map of instantiated StepInteractiveViewer objects.
  `String`
  `getName()`
  Get the name of this step
  `List<String>`
  `getOutgoingConnectionTypes()`
  Get a list of outgoing connection types that this step can produce.
  `StepManager`
  `getStepManager()`
  Get the step manager in use with this step
  `Instances`
  `outputStructureForConnectionType(String connectionName)`
  If possible, get the output structure for the named connection type as a header-only set of instances.
  `Instances`
  `outputStructureForConnectionType(String connectionName, Environment env)`
  If possible, get the output structure for the named connection type as a header-only set of instances.
  `void`
  `processIncoming(Data data)`
  Process an incoming data payload (if the step accepts incoming connections)
  `void`
  `setName(String name)`
  Set the name for this step
  `void`
  `setStepManager(StepManager manager)`
  Set the step manager to use with this step.
  `void`
  `start()`
  Start executing (if this component is a start point)
  `void`
  `stepInit()`
  Initialize the step.
  `void`
  `stop()`
  Request a stop to all processing by this step (as soon as possible)

- ## Method Details

  - ### 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

    String getName()
    Get the name of this step
    Returns:
      the name of this step

  - ### setName

    void setName(String name)
    Set the name for this step
    Parameters:
      `name` - the name for this step

  - ### stepInit

    void stepInit() throws WekaException
    Initialize the step.
    Throws:
      `WekaException` - if a problem occurs during initialization

  - ### getIncomingConnectionTypes

    List<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

    List<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 WekaException
    Start 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(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(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 for
      `env` - Environment variables
    Returns:
      the output structure as a header-only Instances object
    Throws:
      `WekaException` - if a problem occurs

  - ### getCustomEditorForStep

    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

    Map<String,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

    Map<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