com.rapidminer.operator.meta.branch
Class ProcessBranch

java.lang.Object
  extended by com.rapidminer.tools.AbstractObservable<Operator>
      extended by com.rapidminer.operator.Operator
          extended by com.rapidminer.operator.OperatorChain
              extended by com.rapidminer.operator.meta.branch.ProcessBranch
All Implemented Interfaces:
ConfigurationListener, PreviewListener, ResourceConsumer, ParameterHandler, LoggingHandler, Observable<Operator>

public class ProcessBranch
extends OperatorChain

This operator provides a conditional execution of parts of processes. It has to have two OperatorChains as children. The first chain is processed if the specified condition is true, the second one is processed if it is false (if-then-else). The second chain may be omitted (if-then). In this case, this operator has only one inner operator.

If the condition "attribute_value_filter" is used, the same attribute value conditions already known from the ExampleFilter operator can be used. In addition to the known attribute value relation format (e.g. "att1>=0.7"), this operator expects an additional definition for the used example which cam be added in "[" and "]" after the attribute value condition. The following values are possible:

Author:
Sebastian Land, Ingo Mierswa

Field Summary
static java.lang.Class[] CONDITION_CLASSES
           
static java.lang.String CONDITION_INPUT_EXISTS
           
static java.lang.String[] CONDITION_NAMES
           
static java.lang.String PARAMETER_CONDITION_TYPE
           
static java.lang.String PARAMETER_CONDITION_VALUE
           
static java.lang.String PARAMETER_IO_OBJECT
           
static java.lang.String PARAMETER_RETURN_INNER_OUTPUT
           
 
Constructor Summary
ProcessBranch(OperatorDescription description)
           
 
Method Summary
 void doWork()
          Performs the actual work of the operator and must be implemented by subclasses.
 boolean getAddOnlyAdditionalOutput()
          Indicates how additional output should be added to the IOContainer.
<T extends IOObject>
T
getConditionInput(java.lang.Class<T> cls)
           
 java.util.List<ParameterType> getParameterTypes()
          Returns a list of ParameterTypes describing the parameters of this operator.
 java.lang.Class<? extends IOObject> getSelectedClass()
           
 
Methods inherited from class com.rapidminer.operator.OperatorChain
addOperator, addOperator, addSubprocess, areSubprocessesExtendable, assumePreconditionsSatisfied, checkDeprecations, checkIO, checkNumberOfInnerOperators, checkProperties, clear, cloneOperator, collectErrors, createProcessTree, createSubprocess, freeMemory, getAllInnerOperators, getAllInnerOperatorsAndMe, getImmediateChildren, getIndexOfOperator, getInnerOperatorCondition, getMaxNumberOfInnerOperators, getMinNumberOfInnerOperators, getNumberOfAllOperators, getNumberOfOperators, getNumberOfSubprocesses, getOperator, getOperatorFromAll, getOperators, getSubprocess, getSubprocesses, isEnabled, lookupOperator, notifyRenaming, performAdditionalChecks, processFinished, processStarts, propagateDirtyness, registerOperator, removeOperator, removeSubprocess, shouldAddNonConsumedInput, shouldReturnInnerOutput, unregisterOperator, updateExecutionOrder, walk
 
Methods inherited from class com.rapidminer.operator.Operator
acceptsInput, addError, addError, addValue, addWarning, apply, apply, checkAll, checkAllExcludingMetaData, checkForStop, clearErrorList, createExperimentTree, createExperimentTree, createFromXML, createFromXML, createFromXML, createMarkedExperimentTree, createMarkedProcessTree, createProcessTree, disconnectPorts, execute, fireUpdate, getApplyCount, getCompatibilityLevel, getDeliveredOutputClasses, getDeprecationInfo, getDesiredInputClasses, getDOMRepresentation, getEncoding, getErrorList, getExecutionUnit, getExperiment, getIncompatibleVersionChanges, getInput, getInput, getInput, getInputClasses, getInputDescription, getInputPorts, getIODescription, getLog, getLogger, getName, getNumberOfBreakpoints, getOperatorClassName, getOperatorDescription, getOutputClasses, getOutputPorts, getParameter, getParameterAsBoolean, getParameterAsChar, getParameterAsColor, getParameterAsDouble, getParameterAsFile, getParameterAsFile, getParameterAsInputStream, getParameterAsInt, getParameterAsMatrix, getParameterAsRepositoryLocation, getParameterAsString, getParameterHandler, getParameterList, getParameters, getParameterTupel, getParameterType, getParent, getPortOwner, getProcess, getResourceConsumptionEstimator, getRoot, getStartTime, getTransformer, getUserDescription, getValue, getValues, getXML, getXML, getXML, hasBreakpoint, hasBreakpoint, hasInput, inApplyLoop, isDebugMode, isDirty, isExpanded, isParallel, isParameterSet, isRunning, log, log, logError, logNote, logWarning, makeDirty, makeDirtyOnUpdate, preAutoWire, producesOutput, register, remove, removeAndKeepConnections, rename, resume, setBreakpoint, setCompatibilityLevel, setEnabled, setEnclosingProcess, setExpanded, setInput, setListParameter, setPairParameter, setParameter, setParameters, setUserDescription, shouldAutoConnect, shouldAutoConnect, shouldStopStandaloneExecution, toString, transformMetaData, writeXML, writeXML
 
Methods inherited from class com.rapidminer.tools.AbstractObservable
addObserver, addObserverAsFirst, fireUpdate, removeObserver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PARAMETER_CONDITION_TYPE

public static final java.lang.String PARAMETER_CONDITION_TYPE
See Also:
Constant Field Values

PARAMETER_CONDITION_VALUE

public static final java.lang.String PARAMETER_CONDITION_VALUE
See Also:
Constant Field Values

PARAMETER_RETURN_INNER_OUTPUT

public static final java.lang.String PARAMETER_RETURN_INNER_OUTPUT
See Also:
Constant Field Values

PARAMETER_IO_OBJECT

public static final java.lang.String PARAMETER_IO_OBJECT
See Also:
Constant Field Values

CONDITION_NAMES

public static final java.lang.String[] CONDITION_NAMES

CONDITION_INPUT_EXISTS

public static final java.lang.String CONDITION_INPUT_EXISTS

CONDITION_CLASSES

public static final java.lang.Class[] CONDITION_CLASSES
Constructor Detail

ProcessBranch

public ProcessBranch(OperatorDescription description)
Method Detail

doWork

public void doWork()
            throws OperatorException
Description copied from class: Operator
Performs the actual work of the operator and must be implemented by subclasses. Replaces the old method apply().

Overrides:
doWork in class OperatorChain
Throws:
OperatorException

getAddOnlyAdditionalOutput

public boolean getAddOnlyAdditionalOutput()
Description copied from class: Operator
Indicates how additional output should be added to the IOContainer. Usually the additional output should be preprended to the input container but some operators, especially operator chains might override this method in order add only the additional output instead of the complete IOContainer. This prevents doubling the IOObjects e.g. for SimpleOperatorChains. The default implementation returns false.

Overrides:
getAddOnlyAdditionalOutput in class Operator

getConditionInput

public <T extends IOObject> T getConditionInput(java.lang.Class<T> cls)
                                     throws UserError
Throws:
UserError

getSelectedClass

public java.lang.Class<? extends IOObject> getSelectedClass()
                                                     throws UndefinedParameterError
Throws:
UndefinedParameterError

getParameterTypes

public java.util.List<ParameterType> getParameterTypes()
Description copied from class: Operator
Returns a list of ParameterTypes describing the parameters of this operator. The default implementation returns an empty list if no input objects can be retained and special parameters for those input objects which can be prevented from being consumed. ATTENTION! This will create new parameterTypes. For calling already existing parameter types use getParameters().getParameterTypes();

Specified by:
getParameterTypes in interface ParameterHandler
Overrides:
getParameterTypes in class Operator


Copyright © 2001-2009 by Rapid-I