Package weka.knowledgeflow.steps
Class AlterRelationName
java.lang.Object
weka.knowledgeflow.steps.BaseStep
weka.knowledgeflow.steps.AlterRelationName
- All Implemented Interfaces:
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:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the list of acceptable incoming connection typesGet the modification text to applyweka.knowledgeflow.steps.AlterRelationName.ModType
Get the modification type to applyGet the list of outgoing connection types that can be made given the current state of incoming connectionsGet the match string for regex modificationsboolean
Get whether to replace all regular expression matches, or just the first.void
processIncoming
(Data data) Process incoming datavoid
setModificationText
(String text) Set the modification text to applyvoid
setModType
(weka.knowledgeflow.steps.AlterRelationName.ModType mod) Set the modification type to applyvoid
setRegexMatch
(String match) Set the match string for regex modificationsvoid
setReplaceAll
(boolean replaceAll) Set whether to replace all regular expression matches, or just the first.void
stepInit()
Initialize the stepMethods inherited from class weka.knowledgeflow.steps.BaseStep
environmentSubstitute, getCustomEditorForStep, getDefaultSettings, getInteractiveViewers, getInteractiveViewersImpls, getName, getStepManager, globalInfo, isResourceIntensive, isStopRequested, outputStructureForConnectionType, outputStructureForConnectionType, setName, setStepIsResourceIntensive, setStepManager, setStepMustRunSingleThreaded, start, stepMustRunSingleThreaded, stop
-
Constructor Details
-
AlterRelationName
public AlterRelationName()
-
-
Method Details
-
stepInit
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(String text) Set the modification text to apply- Parameters:
text
- the text to apply
-
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(String match) Set the match string for regex modifications- Parameters:
match
- the regular expression to apply for matching
-
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
Process incoming data- Specified by:
processIncoming
in interfaceBaseStepExtender
- Specified by:
processIncoming
in interfaceStep
- Overrides:
processIncoming
in classBaseStep
- Parameters:
data
- the payload to process- Throws:
WekaException
- if a problem occurs
-
getIncomingConnectionTypes
Get the list of acceptable incoming connection types- Returns:
- the list of acceptable incoming connection types
-
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
-