@KFStep(name="SubstringReplacer", category="Tools", toolTipText="Replace substrings in String attribute values using either literal match-and-replace or regular expression matching. The attributes to apply the match and replace rules to can be selected via a range string (e.g. 1-5,6-last) or by a comma-separated list of attribute names (/first and /last can be used to indicate the first and last attribute respectively)", iconPath="weka/gui/knowledgeflow/icons/DefaultFilter.gif") public class SubstringReplacer extends BaseStep
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
m_isReset
Step has been reset - i.e. start of processing
|
protected java.lang.String |
m_matchReplaceDetails
Internally encoded list of match-replace rules
|
protected SubstringReplacerRules |
m_mr
Handles the rules for replacement
|
protected Data |
m_streamingData
Reusable data object for output
|
m_stepIsResourceIntensive, m_stepManager, m_stepName| Constructor and Description |
|---|
SubstringReplacer() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCustomEditorForStep()
Return the fully qualified name of a custom editor component (JComponent)
to use for editing the properties of the step.
|
java.util.List<java.lang.String> |
getIncomingConnectionTypes()
Get a list of incoming connection types that this step can accept.
|
java.lang.String |
getMatchReplaceDetails()
Get the internally encoded list of match-replace rules
|
java.util.List<java.lang.String> |
getOutgoingConnectionTypes()
Get a list of outgoing connection types that this step can produce.
|
Instances |
outputStructureForConnectionType(java.lang.String connectionName)
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 |
setMatchReplaceDetails(java.lang.String details)
Set internally encoded list of match-replace rules
|
void |
stepInit()
Initialize the step
|
environmentSubstitute, getDefaultSettings, getInteractiveViewers, getInteractiveViewersImpls, getName, getStepManager, globalInfo, isResourceIntensive, isStopRequested, setName, setStepIsResourceIntensive, setStepManager, setStepMustRunSingleThreaded, start, stepMustRunSingleThreaded, stopprotected java.lang.String m_matchReplaceDetails
protected transient SubstringReplacerRules m_mr
protected Data m_streamingData
protected boolean m_isReset
@ProgrammaticProperty public void setMatchReplaceDetails(java.lang.String details)
details - the list of match-replace rulespublic java.lang.String getMatchReplaceDetails()
public void stepInit()
throws WekaException
WekaException - if a problem occurspublic java.util.List<java.lang.String> getIncomingConnectionTypes()
public java.util.List<java.lang.String> getOutgoingConnectionTypes()
public void processIncoming(Data data) throws WekaException
processIncoming in interface BaseStepExtenderprocessIncoming in interface StepprocessIncoming in class BaseStepdata - the data to processWekaException - if a problem occurspublic Instances outputStructureForConnectionType(java.lang.String connectionName) throws WekaException
outputStructureForConnectionType in interface StepoutputStructureForConnectionType in class BaseStepconnectionName - the name of the connection type to get the output
structure forWekaException - if a problem occurspublic java.lang.String getCustomEditorForStep()
getCustomEditorForStep in interface StepgetCustomEditorForStep in class BaseStep