weka.knowledgeflow.steps

## Class GraphViewer

- java.lang.Object
- - weka.knowledgeflow.steps.BaseStep
  - - weka.knowledgeflow.steps.BaseSimpleDataVisualizer
    - - weka.knowledgeflow.steps.GraphViewer

- All Implemented Interfaces:
    java.io.Serializable, BaseStepExtender, DataCollector, Step

      @KFStep(name="GraphViewer",
              category="Visualization",
              toolTipText="Visualize graph output from Drawable schemes",
              iconPath="weka/gui/knowledgeflow/icons/DefaultGraph.gif")
      public class GraphViewer
      extends BaseSimpleDataVisualizer

  Step for collecting and visualizing graph output from Drawable schemes.
  Version:
    $Revision: $
  Author:
    Mark Hall (mhall{[at]}pentaho{[dot]}com)
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GraphViewer()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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.List<java.lang.String>` | `getOutgoingConnectionTypes()` Get a list of outgoing connection types that this step can produce.
    `void` | `processIncoming(Data data)` Process an incoming data payload (if the step accepts incoming connections)

    - ### Methods inherited from class weka.knowledgeflow.steps.BaseSimpleDataVisualizer

      `getDatasets, restoreData, retrieveData, stepInit`

    - ### Methods inherited from class weka.knowledgeflow.steps.BaseStep

      `environmentSubstitute, getCustomEditorForStep, getDefaultSettings, getInteractiveViewersImpls, getName, getStepManager, globalInfo, isResourceIntensive, isStopRequested, outputStructureForConnectionType, setName, setStepIsResourceIntensive, setStepManager, setStepMustRunSingleThreaded, start, stepMustRunSingleThreaded, stop`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GraphViewer

          public GraphViewer()

  - ### Method Detail

    - #### getIncomingConnectionTypes

          public 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.
      Specified by:
        `getIncomingConnectionTypes` in interface `BaseStepExtender`
      Specified by:
        `getIncomingConnectionTypes` in interface `Step`
      Overrides:
        `getIncomingConnectionTypes` in class `BaseSimpleDataVisualizer`
      Returns:
        a list of incoming connections that this step can accept given its current state

    - #### getOutgoingConnectionTypes

          public 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.
      Specified by:
        `getOutgoingConnectionTypes` in interface `BaseStepExtender`
      Specified by:
        `getOutgoingConnectionTypes` in interface `Step`
      Overrides:
        `getOutgoingConnectionTypes` in class `BaseSimpleDataVisualizer`
      Returns:
        a list of outgoing connections that this step can produce

    - #### processIncoming

          public void processIncoming(Data data)
                               throws WekaException

      Process an incoming data payload (if the step accepts incoming connections)
      Specified by:
        `processIncoming` in interface `BaseStepExtender`
      Specified by:
        `processIncoming` in interface `Step`
      Overrides:
        `processIncoming` in class `BaseSimpleDataVisualizer`
      Parameters:
        `data` - the payload to process
      Throws:
        `WekaException` - if a problem occurs

    - #### getInteractiveViewers

          public 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.
      Specified by:
        `getInteractiveViewers` in interface `Step`
      Overrides:
        `getInteractiveViewers` in class `BaseStep`
      Returns:
        a map of viewer component names, or null if this step has no graphical views