@KFStep(name="FlowByExpression", category="Flow", toolTipText="Route instances according to the evaluation of a logical expression. The expression can test the values of one or more incoming attributes. The test can involve constants or comparing one attribute\'s values to another. Inequalities along with string operations such as contains, starts-with, ends-with and regular expressions may be used as operators. \"True\" instances can be sent to one downstream step and \"False\" instances sent to another.", iconPath="weka/gui/knowledgeflow/icons/FlowByExpression.png") public class FlowByExpression extends BaseStep
Modifier and Type | Class and Description |
---|---|
static class |
FlowByExpression.BracketNode
An expression node that encloses other expression nodes in brackets
|
static class |
FlowByExpression.ExpressionClause
An expression node that represents a clause of an expression
|
static class |
FlowByExpression.ExpressionNode
Abstract base class for parts of a boolean expression.
|
Constructor and Description |
---|
FlowByExpression() |
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> |
getDownstreamStepNames()
Get a list of the names of connected downstream steps
|
java.lang.String |
getExpressionString()
Get the current expression (in internal format)
|
java.lang.String |
getFalseStepName()
Get the name of the connected step to send "false" instances to
|
java.util.List<java.lang.String> |
getIncomingConnectionTypes()
Get a list of incoming connection types that this step can accept.
|
java.util.List<java.lang.String> |
getOutgoingConnectionTypes()
Get a list of outgoing connection types that this step can produce.
|
java.lang.String |
getTrueStepName()
Get the name of the connected step to send "true" instances to
|
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)
Main processing routine
|
void |
setExpressionString(java.lang.String expressionString)
Set the expression (in internal format)
|
void |
setFalseStepName(java.lang.String falseStep)
Set the name of the connected step to send "false" instances to
|
void |
setTrueStepName(java.lang.String trueStep)
Set the name of the connected step to send "true" instances to
|
void |
stepInit()
Initialize the step.
|
environmentSubstitute, getDefaultSettings, getInteractiveViewers, getInteractiveViewersImpls, getName, getStepManager, globalInfo, isResourceIntensive, isStopRequested, outputStructureForConnectionType, setName, setStepIsResourceIntensive, setStepManager, setStepMustRunSingleThreaded, start, stepMustRunSingleThreaded, stop
public void setExpressionString(java.lang.String expressionString)
expressionString
- the expression to use (in internal format)public java.lang.String getExpressionString()
public void setTrueStepName(java.lang.String trueStep)
trueStep
- the name of the step to send "true" instances topublic java.lang.String getTrueStepName()
public void setFalseStepName(java.lang.String falseStep)
falseStep
- the name of the step to send "false" instances topublic java.lang.String getFalseStepName()
public java.util.List<java.lang.String> getDownstreamStepNames()
public void stepInit() throws WekaException
WekaException
- if a problem occurs during initializationpublic java.util.List<java.lang.String> getIncomingConnectionTypes()
public java.util.List<java.lang.String> getOutgoingConnectionTypes()
public Instances outputStructureForConnectionType(java.lang.String connectionName) throws WekaException
outputStructureForConnectionType
in interface Step
outputStructureForConnectionType
in class BaseStep
connectionName
- the name of the connection type to get the output
structure forWekaException
- if a problem occurspublic void processIncoming(Data data) throws WekaException
processIncoming
in interface BaseStepExtender
processIncoming
in interface Step
processIncoming
in class BaseStep
data
- incoming data objectWekaException
- if a problem occurspublic java.lang.String getCustomEditorForStep()
getCustomEditorForStep
in interface Step
getCustomEditorForStep
in class BaseStep