weka.knowledgeflow.steps

## Class AlterRelationName

- java.lang.Object
- - weka.knowledgeflow.steps.BaseStep
  - - weka.knowledgeflow.steps.AlterRelationName

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

      @KFStep(name="AlterRelationName",
              category="Flow",
              toolTipText="Alter the relation name in data sets",
              iconPath="weka/gui/knowledgeflow/icons/DiamondPlain.gif")
      public class AlterRelationName
      extends BaseStep

  Step that alters the relation name for data received via instance, dataSet, trainingSet and testSet connections
  Version:
    $Revision: $
  Author:
    Mark Hall (mhall{[at]}pentaho{[dot]}com)
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AlterRelationName()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.List<java.lang.String>` | `getIncomingConnectionTypes()` Get the list of acceptable incoming connection types
    `java.lang.String` | `getModificationText()` Get the modification text to apply
    `weka.knowledgeflow.steps.AlterRelationName.ModType` | `getModType()` Get the modification type to apply
    `java.util.List<java.lang.String>` | `getOutgoingConnectionTypes()` Get the list of outgoing connection types that can be made given the current state of incoming connections
    `java.lang.String` | `getRegexMatch()` Get the match string for regex modifications
    `boolean` | `getReplaceAll()` Get whether to replace all regular expression matches, or just the first.
    `void` | `processIncoming(Data data)` Process incoming data
    `void` | `setModificationText(java.lang.String text)` Set the modification text to apply
    `void` | `setModType(weka.knowledgeflow.steps.AlterRelationName.ModType mod)` Set the modification type to apply
    `void` | `setRegexMatch(java.lang.String match)` Set the match string for regex modifications
    `void` | `setReplaceAll(boolean replaceAll)` Set whether to replace all regular expression matches, or just the first.
    `void` | `stepInit()` Initialize the step

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

      `environmentSubstitute, getCustomEditorForStep, getDefaultSettings, getInteractiveViewers, 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

    - #### AlterRelationName

          public AlterRelationName()

  - ### Method Detail

    - #### stepInit

          public void stepInit()
                        throws WekaException

      Initialize the step
      Throws:
        `WekaException` - if a problem occurs

    - #### setModificationText

          @OptionMetadata(displayName="Text to use",
                          description="The text to modify the relation name with",
                          displayOrder=0)
          public void setModificationText(java.lang.String text)

      Set the modification text to apply
      Parameters:
        `text` - the text to apply

    - #### getModificationText

          public java.lang.String getModificationText()

      Get the modification text to apply
      Returns:
        the modification text

    - #### setModType

          @OptionMetadata(displayName="Relation name modification type",
                          description="The type of modification to apply",
                          displayOrder=1)
          public void setModType(weka.knowledgeflow.steps.AlterRelationName.ModType mod)

      Set the modification type to apply
      Parameters:
        `mod` - the modification type to apply

    - #### getModType

          public weka.knowledgeflow.steps.AlterRelationName.ModType getModType()

      Get the modification type to apply
      Returns:
        the modification type to apply

    - #### setRegexMatch

          @OptionMetadata(displayName="Regular expression",
                          description="Regular expression to match when performing a REGEX modification",
                          displayOrder=2)
          public void setRegexMatch(java.lang.String match)

      Set the match string for regex modifications
      Parameters:
        `match` - the regular expression to apply for matching

    - #### getRegexMatch

          public java.lang.String getRegexMatch()

      Get the match string for regex modifications
      Returns:
        the regular expression to apply for matching

    - #### setReplaceAll

          @OptionMetadata(displayName="Replace all regex matches",
                          description="Replace all matching occurrences if set to true, or just the first match if set to false",
                          displayOrder=3)
          public void setReplaceAll(boolean replaceAll)

      Set whether to replace all regular expression matches, or just the first.
      Parameters:
        `replaceAll` - true to replace all regex matches

    - #### getReplaceAll

          public boolean getReplaceAll()

      Get whether to replace all regular expression matches, or just the first.
      Returns:
        true to replace all regex matches

    - #### processIncoming

          public void processIncoming(Data data)
                               throws WekaException

      Process incoming data
      Specified by:
        `processIncoming` in interface `BaseStepExtender`
      Specified by:
        `processIncoming` in interface `Step`
      Overrides:
        `processIncoming` in class `BaseStep`
      Parameters:
        `data` - the payload to process
      Throws:
        `WekaException` - if a problem occurs

    - #### getIncomingConnectionTypes

          public java.util.List<java.lang.String> getIncomingConnectionTypes()

      Get the list of acceptable incoming connection types
      Returns:
        the list of acceptable incoming connection types

    - #### getOutgoingConnectionTypes

          public java.util.List<java.lang.String> getOutgoingConnectionTypes()

      Get the list of outgoing connection types that can be made given the current state of incoming connections
      Returns:
        a list of outgoing connection types that can be made