@KFStep(name="SetVariables", category="Flow", toolTipText="Assign default values for static variables, if not already set, and for dynamic variables. Static variables are guaranteed to be available to all other steps at initialization as the Knowledge Flow makes sure that SetVariables is invoked first first. Dynamic variables can have their values set using the values of attributes from incoming instances. Dynamic variables are *not* guaranteed to be available to other steps in the flow - instead, they are intended for use by a directly connected \'Job\' step, which will execute a specified sub-flow for each \'variables\' data object received.", iconPath="weka/gui/knowledgeflow/icons/SetVariables.gif") public class SetVariables extends BaseStep
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SEP1
Separators for internal variable specification
|
static java.lang.String |
SEP2 |
static java.lang.String |
SEP3 |
Constructor and Description |
---|
SetVariables() |
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.lang.String |
getDynamicVarsInternalRep() |
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 |
getVarsInternalRep()
Get the variables to set (in internal representation)
|
static java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
internalDynamicToMap(java.lang.String internalRep) |
static java.util.Map<java.lang.String,java.lang.String> |
internalToMap(java.lang.String internalRep)
Convert a string in the internal static variable representation to a map of
variables + values
|
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 |
setDynamicVarsInternalRep(java.lang.String rep) |
void |
setVarsInternalRep(java.lang.String rep)
Set the static variables to set (in internal representation)
|
void |
stepInit()
Initialize the step.
|
environmentSubstitute, getDefaultSettings, getInteractiveViewers, getInteractiveViewersImpls, getName, getStepManager, globalInfo, isResourceIntensive, isStopRequested, outputStructureForConnectionType, setName, setStepIsResourceIntensive, setStepManager, setStepMustRunSingleThreaded, start, stepMustRunSingleThreaded, stop
public static final java.lang.String SEP1
public static final java.lang.String SEP2
public static final java.lang.String SEP3
@ProgrammaticProperty public void setVarsInternalRep(java.lang.String rep)
rep
- the variables to setpublic java.lang.String getVarsInternalRep()
@ProgrammaticProperty public void setDynamicVarsInternalRep(java.lang.String rep)
public java.lang.String getDynamicVarsInternalRep()
public void stepInit() throws WekaException
WekaException
- if a problem occurs during initializationpublic void processIncoming(Data data) throws WekaException
BaseStep
processIncoming
in interface BaseStepExtender
processIncoming
in interface Step
processIncoming
in class BaseStep
data
- the payload to processWekaException
- if a problem occurspublic java.util.List<java.lang.String> getIncomingConnectionTypes()
public java.util.List<java.lang.String> getOutgoingConnectionTypes()
public Instances outputStructureForConnectionType(java.lang.String connectionName) throws WekaException
BaseStep
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 java.lang.String getCustomEditorForStep()
getCustomEditorForStep
in interface Step
getCustomEditorForStep
in class BaseStep
public static java.util.Map<java.lang.String,java.util.List<java.lang.String>> internalDynamicToMap(java.lang.String internalRep)
public static java.util.Map<java.lang.String,java.lang.String> internalToMap(java.lang.String internalRep)
internalRep
- the variables in internal represenation