com.rapidminer.operator
Class SingleMacroDefinitionOperator

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

public class SingleMacroDefinitionOperator
extends Operator

(Re-)Define macros for the current process. Macros will be replaced in the value strings of parameters by the macro values defined as a parameter of this operator. In contrast to the usual MacroDefinitionOperator, this operator only supports the definition of a single macro and can hence be used inside of parameter iterations.

You have to define the macro name (without the enclosing brackets) and the macro value. The defined macro can then be used in all succeeding operators as parameter value. A macro must then be enclosed by "MACRO_START" and "MACRO_END".

There are several predefined macros:

In addition to those the user might define arbitrary other macros which will be replaced by arbitrary strings during the process run. Please note also that several other short macros exist, e.g. MACRO_STARTaMACRO_END for the number of times the current operator was applied. Please refer to the section about macros in the RapidMiner tutorial. Please note also that other operators like the FeatureIterator also add specific macros.

Author:
Ingo Mierswa

Field Summary
static java.lang.String PARAMETER_MACRO
          The parameter name for "The values of the user defined macros.
static java.lang.String PARAMETER_VALUE
           
 
Constructor Summary
SingleMacroDefinitionOperator(OperatorDescription description)
           
 
Method Summary
 void doWork()
          Performs the actual work of the operator and must be implemented by subclasses.
 java.util.List<ParameterType> getParameterTypes()
          Returns a list of ParameterTypes describing the parameters of this operator.
 
Methods inherited from class com.rapidminer.operator.Operator
acceptsInput, addError, addError, addValue, addWarning, apply, apply, assumePreconditionsSatisfied, checkAll, checkAllExcludingMetaData, checkDeprecations, checkForStop, checkIO, checkProperties, clear, clearErrorList, cloneOperator, collectErrors, createExperimentTree, createExperimentTree, createFromXML, createFromXML, createFromXML, createMarkedExperimentTree, createMarkedProcessTree, createProcessTree, createProcessTree, disconnectPorts, execute, fireUpdate, freeMemory, getAddOnlyAdditionalOutput, 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, isEnabled, isExpanded, isParallel, isParameterSet, isRunning, log, log, logError, logNote, logWarning, lookupOperator, makeDirty, makeDirtyOnUpdate, notifyRenaming, performAdditionalChecks, preAutoWire, processFinished, processStarts, producesOutput, propagateDirtyness, register, registerOperator, remove, removeAndKeepConnections, rename, resume, setBreakpoint, setCompatibilityLevel, setEnabled, setEnclosingProcess, setExpanded, setInput, setListParameter, setPairParameter, setParameter, setParameters, setUserDescription, shouldAutoConnect, shouldAutoConnect, shouldStopStandaloneExecution, toString, transformMetaData, unregisterOperator, updateExecutionOrder, walk, 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_MACRO

public static final java.lang.String PARAMETER_MACRO
The parameter name for "The values of the user defined macros."

See Also:
Constant Field Values

PARAMETER_VALUE

public static final java.lang.String PARAMETER_VALUE
See Also:
Constant Field Values
Constructor Detail

SingleMacroDefinitionOperator

public SingleMacroDefinitionOperator(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 Operator
Throws:
OperatorException

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