@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
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AlterRelationName.ModType
Enum of modification types
|
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Set<java.lang.String> |
m_hasAltered
The set of source step identifiers that have had their data modified so far
|
protected AlterRelationName.ModType |
m_modType
The type of modification to make
|
protected java.lang.String |
m_regexMatch
Regex string to match
|
protected java.util.regex.Pattern |
m_regexPattern
For regex replacement
|
protected java.lang.String |
m_relationNameModText
Text to modify the relation name with
|
protected boolean |
m_replaceAll
Whether to replace all rexex matches, or just the first
|
m_stepIsResourceIntensive, m_stepManager, m_stepName| Constructor and Description |
|---|
AlterRelationName() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyRelationNameChange(Instances insts)
Apply the change to the relation name in the given Instances object
|
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
|
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(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
|
environmentSubstitute, getCustomEditorForStep, getDefaultSettings, getInteractiveViewers, getInteractiveViewersImpls, getName, getStepManager, globalInfo, isResourceIntensive, isStopRequested, outputStructureForConnectionType, setName, setStepIsResourceIntensive, setStepManager, setStepMustRunSingleThreaded, start, stepMustRunSingleThreaded, stopprotected java.util.Set<java.lang.String> m_hasAltered
protected java.lang.String m_relationNameModText
protected AlterRelationName.ModType m_modType
protected java.util.regex.Pattern m_regexPattern
protected java.lang.String m_regexMatch
protected boolean m_replaceAll
public void stepInit()
throws WekaException
WekaException - if a problem occurs@OptionMetadata(displayName="Text to use", description="The text to modify the relation name with", displayOrder=0) public void setModificationText(java.lang.String text)
text - the text to applypublic java.lang.String getModificationText()
@OptionMetadata(displayName="Relation name modification type", description="The type of modification to apply", displayOrder=1) public void setModType(AlterRelationName.ModType mod)
mod - the modification type to applypublic AlterRelationName.ModType getModType()
@OptionMetadata(displayName="Regular expression", description="Regular expression to match when performing a REGEX modification", displayOrder=2) public void setRegexMatch(java.lang.String match)
match - the regular expression to apply for matchingpublic java.lang.String getRegexMatch()
@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)
replaceAll - true to replace all regex matchespublic boolean getReplaceAll()
public void processIncoming(Data data) throws WekaException
processIncoming in interface BaseStepExtenderprocessIncoming in interface StepprocessIncoming in class BaseStepdata - the payload to processWekaException - if a problem occursprotected void applyRelationNameChange(Instances insts)
insts - the Instances object to operate onpublic java.util.List<java.lang.String> getIncomingConnectionTypes()
public java.util.List<java.lang.String> getOutgoingConnectionTypes()