|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.rapidminer.tools.AbstractObservable<Operator>
com.rapidminer.operator.Operator
public abstract class Operator
An operator accepts an array of input objects and generates an array of output objects that can be processed by other operators. Both must implement the IOObject interface. This is the superclass which must be extended by all RapidMiner operators. Please refer to the RapidMiner tutorial for a detailed description how to implement your operator.
As default, operators consume their input by using it. This is often a useful
behavior especially in complex processes. For example, a learning operator
consumes an example set to produce a model and so does a cross validation to
produce a performance value of the learning method. To receive the input
IOObject
of a certain class simply use getInput(Class class)
.
This method delivers the first object of the desired class which is in the
input of this operator. The delivered object is consumed afterwards and thus
is removed from input. If the operator alters this object, it should return
the altered object as output again. Therefore, you have to add the object to
the output array which is delivered by the apply()
method of the
operator. You also have to declare it in getOutputClasses()
. All
input objects which are not used by your operator will be automatically
passed to the next operators.
In some cases it would be useful if the user can define if the input object
should be consumed or not. For example, a validation chain like cross
validation should estimate the performance but should also be able to return
the example set which is then used to learn the overall model. Operators can
change the default behavior for input consumption and a parameter will be
automatically defined and queried. The default behavior is defined in the
method getInputDescription(Class cls)
and should be overridden in
these cases. Please note that input objects with a changed input description
must not be defined in getOutputClasses()
and must not be returned
at the end of apply. Both is automatically done with respect to the value of
the automatically created parameter. Please refer to the Javadoc comments of
this method for further explanations.
OperatorChain
Constructor Summary | |
---|---|
Operator(OperatorDescription description)
Creates an unnamed operator. |
Method Summary | ||
---|---|---|
boolean |
acceptsInput(java.lang.Class<? extends IOObject> inputClass)
Returns true if this operator contains at least one InputPort which
accepts an input of the given class (loose checking). |
|
void |
addError(ProcessSetupError error)
|
|
void |
addError(java.lang.String message)
Deprecated. Use addError(ProcessSetupError) |
|
void |
addValue(Value value)
Adds an implementation of Value. |
|
void |
addWarning(java.lang.String message)
Deprecated. Use addError(ProcessSetupError) * |
|
IOObject[] |
apply()
Deprecated. use doWork() |
|
IOContainer |
apply(IOContainer input)
Deprecated. use execute() |
|
void |
assumePreconditionsSatisfied()
Assumes that all preconditions are satisfied. |
|
void |
checkAll()
Clears all errors, checks the operator and its children and propagates meta data, propgatates dirtyness and sorts execution order. |
|
void |
checkAllExcludingMetaData()
As check all, but does not check the meta data for performance reasons. |
|
int |
checkDeprecations()
Will count the number of deprecated operators, i.e. the operators which getDeprecationInfo() method does not return null. |
|
void |
checkForStop()
This method should be called within long running loops of an operator to check if the user has canceled the execution in the mean while. |
|
java.lang.Class<?>[] |
checkIO(java.lang.Class<?>[] input)
Deprecated. As of version 5.0, this method is no longer necessary. |
|
int |
checkProperties()
Will count an error if a non optional property has no default value and is not defined by user. |
|
void |
clear(int clearFlags)
Clears output and input ports. |
|
void |
clearErrorList()
Clears the list of errors. |
|
Operator |
cloneOperator(java.lang.String name,
boolean forParallelExecution)
Performs a deep clone on the most parts of this operator. |
|
protected void |
collectErrors(java.util.List<ProcessSetupError> errors)
|
|
java.lang.String |
createExperimentTree(int indent)
Deprecated. Use createProcessTree(int) instead |
|
protected java.lang.String |
createExperimentTree(int indent,
java.lang.String selfPrefix,
java.lang.String childPrefix,
Operator markOperator,
java.lang.String mark)
Deprecated. Use createProcessTree(int,String,String,Operator,String) instead |
|
static Operator |
createFromXML(org.w3c.dom.Element element,
Process targetProcess,
java.util.List<UnknownParameterInformation> unknownParameterInformation)
|
|
static Operator |
createFromXML(org.w3c.dom.Element element,
Process process,
java.util.List<UnknownParameterInformation> unknownParameterInformation,
ProgressListener l)
This will create an operator by interpreting the given XML element as being generated from the current RapidMiner version. |
|
static Operator |
createFromXML(org.w3c.dom.Element element,
Process process,
java.util.List<UnknownParameterInformation> unknownParameterInformation,
ProgressListener progressListener,
VersionNumber originatingVersion)
This will create an operator from a XML element describing this operator. |
|
java.lang.String |
createMarkedExperimentTree(int indent,
java.lang.String mark,
Operator markOperator)
Deprecated. Use createMarkedProcessTree(int,String,Operator) instead |
|
java.lang.String |
createMarkedProcessTree(int indent,
java.lang.String mark,
Operator markOperator)
Returns this operator's name and class. |
|
java.lang.String |
createProcessTree(int indent)
Returns this operator's name and class. |
|
protected java.lang.String |
createProcessTree(int indent,
java.lang.String selfPrefix,
java.lang.String childPrefix,
Operator markOperator,
java.lang.String mark)
Returns this operator's name and class. |
|
void |
disconnectPorts()
This method will disconnect all ports from as well the input ports as well as the outputports. |
|
void |
doWork()
Performs the actual work of the operator and must be implemented by subclasses. |
|
void |
execute()
Applies the operator. |
|
protected void |
fireUpdate(Operator operator)
Updates all observers with the given argument. |
|
void |
freeMemory()
Releases of any resources held by this operator due since its execution. |
|
boolean |
getAddOnlyAdditionalOutput()
Deprecated. |
|
int |
getApplyCount()
Returns the number of times this operator was already applied. |
|
OperatorVersion |
getCompatibilityLevel()
|
|
protected java.lang.Class<?>[] |
getDeliveredOutputClasses()
Returns the classes that are guaranteed to be returned by apply(). |
|
java.lang.String |
getDeprecationInfo()
Deprecated. Use getOperatorDescription().getDeprecationInfo() |
|
protected java.lang.Class<?>[] |
getDesiredInputClasses()
Returns the classes that are needed as input. |
|
org.w3c.dom.Document |
getDOMRepresentation()
This returns this operator with all its parameter settings as a Document |
|
java.nio.charset.Charset |
getEncoding()
Deprecated. This method is rubbish. Use the Encoding to add a custom encoding parameter to this operator. |
|
java.util.List<ProcessSetupError> |
getErrorList()
Returns a List of Strings containing error messages. |
|
ExecutionUnit |
getExecutionUnit()
Returns the ExecutionUnit that contains this operator. |
|
Process |
getExperiment()
Deprecated. Please use getProcess() instead |
|
OperatorVersion[] |
getIncompatibleVersionChanges()
Returns the versions of an operator after which its behavior incompatibly changed in ascending order. |
|
protected IOContainer |
getInput()
Deprecated. Use getInputPorts() |
|
protected
|
getInput(java.lang.Class<T> cls)
Deprecated. Use input ports |
|
protected
|
getInput(java.lang.Class<T> cls,
int nr)
Deprecated. use the input ports directly |
|
java.lang.Class<?>[] |
getInputClasses()
Deprecated. create input ports instead |
|
protected InputDescription |
getInputDescription(java.lang.Class<?> inputClass)
Deprecated. |
|
InputPorts |
getInputPorts()
This method returns the InputPorts object that gives access to all
defined InputPort s of this operator. |
|
protected IODescription |
getIODescription()
Deprecated. As of version 5.0, this method is no longer necessary. |
|
LoggingHandler |
getLog()
Returns the logging of the process if this operator is part of an process and the global logging service otherwise. |
|
java.util.logging.Logger |
getLogger()
|
|
java.lang.String |
getName()
Returns the name of the operator. |
|
int |
getNumberOfBreakpoints()
This returns the number of breakpoints: 0, 1 or 2. |
|
java.lang.String |
getOperatorClassName()
Returns the "class name" of this operator from the operator description of the operator. |
|
OperatorDescription |
getOperatorDescription()
Returns the operator description of this operator. |
|
java.lang.Class<?>[] |
getOutputClasses()
Deprecated. create output ports |
|
OutputPorts |
getOutputPorts()
This method returns the OutputPorts object that gives access to all
defined OutputPort s of this operator. |
|
java.lang.String |
getParameter(java.lang.String key)
Returns a single parameter retrieved from the Parameters of this
Operator. |
|
boolean |
getParameterAsBoolean(java.lang.String key)
Returns a single named parameter and casts it to boolean. |
|
char |
getParameterAsChar(java.lang.String key)
Returns a single named parameter and casts it to char. |
|
java.awt.Color |
getParameterAsColor(java.lang.String key)
Returns a single named parameter and casts it to Color. |
|
double |
getParameterAsDouble(java.lang.String key)
Returns a single named parameter and casts it to double. |
|
java.io.File |
getParameterAsFile(java.lang.String key)
Returns a single named parameter and casts it to File. |
|
java.io.File |
getParameterAsFile(java.lang.String key,
boolean createMissingDirectories)
Returns a single named parameter and casts it to File. |
|
java.io.InputStream |
getParameterAsInputStream(java.lang.String key)
Returns a single named parameter and tries to handle it as URL. |
|
int |
getParameterAsInt(java.lang.String key)
Returns a single named parameter and casts it to int. |
|
double[][] |
getParameterAsMatrix(java.lang.String key)
Returns a single named parameter and casts it to a double matrix. |
|
RepositoryLocation |
getParameterAsRepositoryLocation(java.lang.String key)
This method returns the parameter identified by key as a RepositoryLocation. |
|
java.lang.String |
getParameterAsString(java.lang.String key)
Returns a single named parameter and casts it to String. |
|
ParameterHandler |
getParameterHandler()
|
|
java.util.List<java.lang.String[]> |
getParameterList(java.lang.String key)
Returns a single named parameter and casts it to List. |
|
Parameters |
getParameters()
Returns a collection of all parameters of this operator. |
|
java.lang.String[] |
getParameterTupel(java.lang.String key)
Returns a Pair of Strings, the Strings are in the order of type definition of the subtypes. |
|
ParameterType |
getParameterType(java.lang.String name)
Returns the parameter type with the given name. |
|
java.util.List<ParameterType> |
getParameterTypes()
Returns a list of ParameterTypes describing the parameters of this operator. |
|
OperatorChain |
getParent()
Returns the operator containing the enclosing process or null if this is the root operator. |
|
PortOwner |
getPortOwner()
This returns the PortOwner of this operator. |
|
Process |
getProcess()
Returns the process of this operator by asking the parent operator. |
|
ResourceConsumptionEstimator |
getResourceConsumptionEstimator()
Subclasses can override this method if they are able to estimate the consumed resources (CPU time and memory), based on their input. |
|
Operator |
getRoot()
Returns the first ancestor that does not have a parent. |
|
long |
getStartTime()
Returns the system time when the operator was started. |
|
protected MDTransformer |
getTransformer()
This method returns the MDTransformer object of this operator. |
|
java.lang.String |
getUserDescription()
The user specified comment for this operator. |
|
Value |
getValue(java.lang.String key)
Returns the value of the Value with the given key. |
|
java.util.Collection<Value> |
getValues()
Returns all Values sorted by key. |
|
java.lang.String |
getXML(boolean hideDefault)
Same as getXML(hideDefault, false). |
|
java.lang.String |
getXML(boolean hideDefault,
boolean onlyCoreElements)
Returns the XML representation of this operator. |
|
java.lang.String |
getXML(java.lang.String indent,
boolean hideDefault)
Deprecated. indent is not used any more. Use getXML(boolean) . |
|
boolean |
hasBreakpoint()
Returns true iff this operator has a breakpoint at any possible position. |
|
boolean |
hasBreakpoint(int position)
Returns true iff a breakpoint is set at the given position |
|
protected boolean |
hasInput(java.lang.Class<? extends IOObject> cls)
Deprecated. use the input ports directly |
|
void |
inApplyLoop()
Should be called if this operator performs a loop (for the loop time resetting used for Value creation used by DataTables). |
|
boolean |
isDebugMode()
|
|
boolean |
isDirty()
Returns whether the results on the output ports of this operator are dirty. |
|
boolean |
isEnabled()
Returns true if this operator is enabled and the parent (if not null) is also enabled. |
|
boolean |
isExpanded()
Returns true if this operator should be painted expanded. |
|
boolean |
isParallel()
This method must return true if the operator performs parallel execution of child operators and false otherwise. |
|
boolean |
isParameterSet(java.lang.String key)
Returns true iff the parameter with the given name is set. |
|
boolean |
isRunning()
Returns if this operators execute() method is currently executed. |
|
void |
log(java.lang.String message)
Logs a status message. |
|
void |
log(java.lang.String message,
int level)
Logs a message with the given log level. |
|
void |
logError(java.lang.String message)
Logs an error message. |
|
void |
logNote(java.lang.String message)
Logs a note message. |
|
void |
logWarning(java.lang.String message)
Logs a warning message. |
|
protected Operator |
lookupOperator(java.lang.String operatorName)
Looks up an operator with the given name in the containing process. |
|
void |
makeDirty()
This method will flag this operator's results as dirty. |
|
protected void |
makeDirtyOnUpdate(Observable<? extends java.lang.Object> observable)
Observes the given Observable and sets this operators dirty flag to true upon any update. |
|
void |
notifyRenaming(java.lang.String oldName,
java.lang.String newName)
This method is called when the operator with "oldName" is renamed to "newName". |
|
protected void |
performAdditionalChecks()
This method is invoked during the validation checks. |
|
protected java.util.LinkedList<OutputPort> |
preAutoWire(java.util.LinkedList<OutputPort> readyOutputs)
This method is called before auto-wiring an operator. |
|
void |
processFinished()
Called at the end of the process. |
|
void |
processStarts()
Called when the process starts. |
|
boolean |
producesOutput(java.lang.Class<? extends IOObject> outputClass)
Returns true if this operator contains at least one OutputPort provided
that its input ports are satisfied. |
|
protected void |
propagateDirtyness()
|
|
void |
register(Process process,
java.lang.String name)
Deprecated. No longer necessary since the registering / unregistering will be performed during operator adding |
|
protected void |
registerOperator(Process process)
Registers this operator in the given process. |
|
void |
remove()
Removes this operator from its parent. |
|
void |
removeAndKeepConnections(java.util.List<Operator> keepConnectionsTo)
|
|
java.lang.String |
rename(java.lang.String newName)
This method unregisters the old name if this operator is already part of a Process . |
|
void |
resume()
Deprecated. Use Process.resume() |
|
void |
setBreakpoint(int position,
boolean on)
Sets or clears a breakpoint at the given position. |
|
void |
setCompatibilityLevel(OperatorVersion compatibilityLevel)
|
|
void |
setEnabled(boolean enabled)
Sets the activation mode. |
|
protected void |
setEnclosingProcess(ExecutionUnit parent)
|
|
void |
setExpanded(boolean expanded)
Sets the expansion mode which indicates if this operator is drawn expanded or not. |
|
protected void |
setInput(IOContainer input)
Deprecated. use the ports |
|
void |
setListParameter(java.lang.String key,
java.util.List<java.lang.String[]> list)
Sets the given parameter list to the Parameters object of this operator. |
|
void |
setPairParameter(java.lang.String key,
java.lang.String firstValue,
java.lang.String secondValue)
|
|
void |
setParameter(java.lang.String key,
java.lang.String value)
Sets the given single parameter to the Parameters object of this operator. |
|
void |
setParameters(Parameters parameters)
Sets all parameters of this operator. |
|
void |
setUserDescription(java.lang.String description)
Sets the user specified comment for this operator. |
|
boolean |
shouldAutoConnect(InputPort inputPort)
|
|
boolean |
shouldAutoConnect(OutputPort outputPort)
By default, all ports will be auto-connected by ExecutionUnit.autoWire(CompatibilityLevel, boolean, boolean) . |
|
void |
shouldStopStandaloneExecution()
This method will cause the execution of this operator to stop at the next call of checkForStop() in the executing thread. |
|
java.lang.String |
toString()
Returns the name. |
|
void |
transformMetaData()
If this method is called for perform the meta data transformation on this operator. |
|
protected void |
unregisterOperator(Process process)
Deletes this operator removing it from the name map of the process. |
|
void |
updateExecutionOrder()
|
|
void |
walk(Visitor<Operator> visitor)
Visitor pattern visiting all operators in subprocesses and the operator itself. |
|
void |
writeXML(java.io.Writer out,
boolean hideDefault)
This will report this operator with all its parameter settings to the given writer as XML. |
|
void |
writeXML(java.io.Writer out,
java.lang.String indent,
boolean hideDefault)
Deprecated. indent is not considered any more. Use writeXML(Writer, boolean) |
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 |
Constructor Detail |
---|
public Operator(OperatorDescription description)
Creates an unnamed operator. Subclasses must pass the given description object to this super-constructor (i.e. invoking super(OperatorDescription)). They might also add additional values for process logging.
NOTE: the preferred way for operator creation is using one of the factory
methods of OperatorService
.
Method Detail |
---|
protected void makeDirtyOnUpdate(Observable<? extends java.lang.Object> observable)
Observable
and sets this operators dirty flag to true upon any update.
public final OperatorDescription getOperatorDescription()
public final java.lang.String getOperatorClassName()
@Deprecated public Process getExperiment()
getProcess()
instead
public Process getProcess()
getProcess
in interface ConfigurationListener
getProcess
in interface PreviewListener
public LoggingHandler getLog()
public java.util.logging.Logger getLogger()
public void log(java.lang.String message, int level)
LoggingHandler
log
in interface LoggingHandler
public void log(java.lang.String message)
LoggingHandler
log
in interface LoggingHandler
public void logNote(java.lang.String message)
LoggingHandler
logNote
in interface LoggingHandler
public void logWarning(java.lang.String message)
LoggingHandler
logWarning
in interface LoggingHandler
public void logError(java.lang.String message)
LoggingHandler
logError
in interface LoggingHandler
public final java.lang.String getName()
public final java.lang.String rename(java.lang.String newName)
Process
. Afterwards,
the new name is set and registered in the process. Please note that the name might be changed
during registering in order to ensure that each operator name is unique in its process.
The new name will be returned.
public void setUserDescription(java.lang.String description)
public java.lang.String getUserDescription()
@Deprecated public final java.lang.String getDeprecationInfo()
public void removeAndKeepConnections(java.util.List<Operator> keepConnectionsTo)
public void remove()
@Deprecated public void register(Process process, java.lang.String name)
protected void registerOperator(Process process)
protected void unregisterOperator(Process process)
public void setEnabled(boolean enabled)
public void setExpanded(boolean expanded)
public boolean isExpanded()
public boolean isEnabled()
public boolean isParallel()
public int getApplyCount()
public Operator cloneOperator(java.lang.String name, boolean forParallelExecution)
name
- This parameter is not used at all.@Deprecated public IOObject[] apply() throws OperatorException
OperatorException
public void doWork() throws OperatorException
apply()
.
OperatorException
@Deprecated public java.lang.Class<?>[] getInputClasses()
getOutputClasses()
and
apply()
if this is necessary. This default behavior can be
changed by overriding getInputDescription(Class)
. Subclasses
which implement this method should not make use of parameters since this
method is invoked by getParameterTypes(). Therefore, parameters are not
fully available at this point of time and this might lead to exceptions.
Please use InputDescriptions instead.
@Deprecated public java.lang.Class<?>[] getOutputClasses()
Returns the classes that are guaranteed to be returned by
apply() as additional output. Please note that input objects
which should not be consumed must also be defined by this method (e.g.
an example set which is changed but not consumed in the case of a preprocessing
operator must be defined in both, the methods getInputClasses()
and
getOutputClasses()
). The default behavior for input consumation
is defined by getInputDescription(Class)
and can be changed by
overwriting this method. Objects which are not consumed (defined by changing
the implementation in getInputDescription(Class)
) must not be
defined as additional output in this method.
May deliver null or an empy array (no additional output is produced or guaranteed). Must return the class array of delivered output objects otherwise.
protected final java.lang.Class<?>[] getDesiredInputClasses()
getInputClasses()
.
protected final java.lang.Class<?>[] getDeliveredOutputClasses()
@Deprecated protected InputDescription getInputDescription(java.lang.Class<?> inputClass)
@Deprecated protected IODescription getIODescription()
@Deprecated public java.lang.Class<?>[] checkIO(java.lang.Class<?>[] input) throws IllegalInputException, WrongNumberOfInnerOperatorsException
IllegalInputException
WrongNumberOfInnerOperatorsException
protected void performAdditionalChecks()
public int checkProperties()
public int checkDeprecations()
getDeprecationInfo()
method does not return null. Returns
the total number of deprecations.
@Deprecated public final IOContainer apply(IOContainer input) throws OperatorException
execute()
OperatorException
public final void execute() throws OperatorException
doWork()
OperatorException
public final void checkForStop() throws ProcessStoppedException
ProcessStoppedException
to cancel the execution.
ProcessStoppedException
public final void shouldStopStandaloneExecution() throws ProcessStoppedException
ProcessStoppedException
@Deprecated public final void resume()
Process.resume()
@Deprecated public boolean getAddOnlyAdditionalOutput()
@Deprecated protected <T extends IOObject> T getInput(java.lang.Class<T> cls) throws MissingIOObjectException
MissingIOObjectException
@Deprecated protected <T extends IOObject> T getInput(java.lang.Class<T> cls, int nr) throws MissingIOObjectException
MissingIOObjectException
@Deprecated protected boolean hasInput(java.lang.Class<? extends IOObject> cls)
@Deprecated protected final IOContainer getInput()
getInputPorts()
getInput(Class)
. However, some
operator chains must handle their inner input and have to use the
IOContainer directly.
@Deprecated protected void setInput(IOContainer input)
public void processStarts() throws OperatorException
OperatorException
public void processFinished() throws OperatorException
OperatorException
public void setBreakpoint(int position, boolean on)
position
- One out of BREAKPOINT_BEFORE and BREAKPOINT_AFTERpublic boolean hasBreakpoint()
public boolean hasBreakpoint(int position)
position
- One out of BREAKPOINT_BEFORE and BREAKPOINT_AFTERpublic void inApplyLoop() throws ProcessStoppedException
checkForStop()
.
ProcessStoppedException
public void addValue(Value value)
public final Value getValue(java.lang.String key)
public java.util.Collection<Value> getValues()
public Parameters getParameters()
getParameters
in interface ConfigurationListener
getParameters
in interface PreviewListener
getParameters
in interface ParameterHandler
public ParameterHandler getParameterHandler()
getParameterHandler
in interface PreviewListener
public void setParameters(Parameters parameters)
setParameters
in interface ConfigurationListener
setParameters
in interface ParameterHandler
public void setParameter(java.lang.String key, java.lang.String value)
setListParameter(String, List)
should be used.
setParameter
in interface ParameterHandler
public void setListParameter(java.lang.String key, java.util.List<java.lang.String[]> list)
setParameter(String, String)
should be used.
setListParameter
in interface ParameterHandler
public void setPairParameter(java.lang.String key, java.lang.String firstValue, java.lang.String secondValue)
public java.lang.String getParameter(java.lang.String key) throws UndefinedParameterError
Parameters
of this
Operator.
getParameter
in interface ParameterHandler
UndefinedParameterError
public boolean isParameterSet(java.lang.String key)
isParameterSet
in interface ParameterHandler
public java.lang.String getParameterAsString(java.lang.String key) throws UndefinedParameterError
getParameterAsString
in interface ParameterHandler
UndefinedParameterError
public char getParameterAsChar(java.lang.String key) throws UndefinedParameterError
getParameterAsChar
in interface ParameterHandler
UndefinedParameterError
public int getParameterAsInt(java.lang.String key) throws UndefinedParameterError
getParameterAsInt
in interface ParameterHandler
UndefinedParameterError
public double getParameterAsDouble(java.lang.String key) throws UndefinedParameterError
getParameterAsDouble
in interface ParameterHandler
UndefinedParameterError
public boolean getParameterAsBoolean(java.lang.String key)
getParameterAsBoolean
in interface ParameterHandler
public java.util.List<java.lang.String[]> getParameterList(java.lang.String key) throws UndefinedParameterError
getParameterList
in interface ParameterHandler
UndefinedParameterError
public java.lang.String[] getParameterTupel(java.lang.String key) throws UndefinedParameterError
getParameterTupel
in interface ParameterHandler
UndefinedParameterError
public java.awt.Color getParameterAsColor(java.lang.String key) throws UndefinedParameterError
getParameterAsColor
in interface ParameterHandler
UndefinedParameterError
public java.io.InputStream getParameterAsInputStream(java.lang.String key) throws UndefinedParameterError, java.io.IOException
Process.resolveFileName(String)
.
getParameterAsInputStream
in interface ParameterHandler
UndefinedParameterError
java.io.IOException
public java.io.File getParameterAsFile(java.lang.String key) throws UndefinedParameterError
Process.resolveFileName(String)
.
getParameterAsFile
in interface ParameterHandler
UndefinedParameterError
public java.io.File getParameterAsFile(java.lang.String key, boolean createMissingDirectories) throws UndefinedParameterError
Process.resolveFileName(String)
.
getParameterAsFile
in interface ParameterHandler
UndefinedParameterError
public RepositoryLocation getParameterAsRepositoryLocation(java.lang.String key) throws UserError
UserError
public double[][] getParameterAsMatrix(java.lang.String key) throws UndefinedParameterError
getParameterAsMatrix
in interface ParameterHandler
UndefinedParameterError
public java.util.List<ParameterType> getParameterTypes()
getParameterTypes
in interface ParameterHandler
public ParameterType getParameterType(java.lang.String name)
@Deprecated public void writeXML(java.io.Writer out, java.lang.String indent, boolean hideDefault) throws java.io.IOException
writeXML(Writer, boolean)
java.io.IOException
public void writeXML(java.io.Writer out, boolean hideDefault) throws java.io.IOException
java.io.IOException
public org.w3c.dom.Document getDOMRepresentation() throws java.io.IOException
Document
java.io.IOException
@Deprecated public java.lang.String getXML(java.lang.String indent, boolean hideDefault)
getXML(boolean)
.
public java.lang.String getXML(boolean hideDefault)
public java.lang.String getXML(boolean hideDefault, boolean onlyCoreElements)
hideDefault
- if true, default parameters will be ignored when creating the xml representationonlyCoreElements
- if true, GUI and other additional information will be ignored.public static Operator createFromXML(org.w3c.dom.Element element, Process targetProcess, java.util.List<UnknownParameterInformation> unknownParameterInformation) throws XMLException
XMLException
public static Operator createFromXML(org.w3c.dom.Element element, Process process, java.util.List<UnknownParameterInformation> unknownParameterInformation, ProgressListener l) throws XMLException
XMLException
public static Operator createFromXML(org.w3c.dom.Element element, Process process, java.util.List<UnknownParameterInformation> unknownParameterInformation, ProgressListener progressListener, VersionNumber originatingVersion) throws XMLException
XMLImporter.VERSION_RM_5
for details.
XMLException
public void clearErrorList()
addError(String)
public void checkAll()
public void checkAllExcludingMetaData()
public void updateExecutionOrder()
public void addError(ProcessSetupError error)
@Deprecated public void addError(java.lang.String message)
addError(ProcessSetupError)
@Deprecated public void addWarning(java.lang.String message)
addError(ProcessSetupError)
*
public java.util.List<ProcessSetupError> getErrorList()
addError(String)
protected void collectErrors(java.util.List<ProcessSetupError> errors)
public long getStartTime()
public java.lang.String toString()
toString
in class java.lang.Object
@Deprecated public java.lang.String createExperimentTree(int indent)
createProcessTree(int)
instead
public java.lang.String createProcessTree(int indent)
@Deprecated public java.lang.String createMarkedExperimentTree(int indent, java.lang.String mark, Operator markOperator)
createMarkedProcessTree(int,String,Operator)
instead
public java.lang.String createMarkedProcessTree(int indent, java.lang.String mark, Operator markOperator)
@Deprecated protected java.lang.String createExperimentTree(int indent, java.lang.String selfPrefix, java.lang.String childPrefix, Operator markOperator, java.lang.String mark)
createProcessTree(int,String,String,Operator,String)
instead
protected java.lang.String createProcessTree(int indent, java.lang.String selfPrefix, java.lang.String childPrefix, Operator markOperator, java.lang.String mark)
@Deprecated public final java.nio.charset.Charset getEncoding()
Encoding
to add a custom encoding parameter to this operator.
public boolean isDebugMode()
public final OperatorChain getParent()
public final InputPorts getInputPorts()
InputPorts
object that gives access to all
defined InputPort
s of this operator. This object can be used to create
a new InputPort
for an operator using one of the Ports.createPort(String)
methods.
public final OutputPorts getOutputPorts()
OutputPorts
object that gives access to all
defined OutputPort
s of this operator. This object can be used to create
a new OutputPort
for an operator using one of the Ports.createPort(String)
methods.
protected final MDTransformer getTransformer()
MDTransformer
object of this operator. This object
will process all meta data of all ports of this operator according to the rules registered
to it.
This method can be used to get the transformer and register new Rules for MetaDataTransformation
for the ports using the MDTransformer.addRule(com.rapidminer.operator.ports.metadata.MDTransformationRule)
method or one of it's more specialized sisters.
public final ExecutionUnit getExecutionUnit()
protected final void setEnclosingProcess(ExecutionUnit parent)
public void clear(int clearFlags)
public void assumePreconditionsSatisfied()
public void disconnectPorts()
public void transformMetaData()
public boolean shouldAutoConnect(OutputPort outputPort)
ExecutionUnit.autoWire(CompatibilityLevel, boolean, boolean)
.
Optional outputs were handled up to version 4.4 by parameters. From 5.0 on,
optional outputs are computed iff the corresponding port is connected. For backward
compatibility, operators can check if we should auto-connect a port by overriding
this method (e.g. by checking a deprecated parameter).
TODO: Remove in later versions
public boolean shouldAutoConnect(InputPort inputPort)
shouldAutoConnect(OutputPort)
public Operator getRoot()
public void notifyRenaming(java.lang.String oldName, java.lang.String newName)
ParameterTypeInnerOperator
is an example for such an
dependency. This way it is possible to change the parameter's according to the renaming.
protected void fireUpdate(Operator operator)
AbstractObservable
fireUpdate
in class AbstractObservable<Operator>
public void makeDirty()
protected void propagateDirtyness()
public boolean isDirty()
public int getNumberOfBreakpoints()
public boolean acceptsInput(java.lang.Class<? extends IOObject> inputClass)
InputPort
which
accepts an input of the given class (loose checking).
public boolean producesOutput(java.lang.Class<? extends IOObject> outputClass)
OutputPort
provided
that its input ports are satisfied.
public PortOwner getPortOwner()
PortOwner
of this operator. See PortOwner
for more
details.
protected java.util.LinkedList<OutputPort> preAutoWire(java.util.LinkedList<OutputPort> readyOutputs) throws OperatorException
OperatorException
public void freeMemory()
protected Operator lookupOperator(java.lang.String operatorName)
Process.operatorNameMap
does not work for
parallel execution, however.
public boolean isRunning()
execute()
method is currently executed.
public void setCompatibilityLevel(OperatorVersion compatibilityLevel)
OperatorVersion
public OperatorVersion getCompatibilityLevel()
OperatorVersion
public OperatorVersion[] getIncompatibleVersionChanges()
OperatorVersion
for details.
public ResourceConsumptionEstimator getResourceConsumptionEstimator()
getResourceConsumptionEstimator
in interface ResourceConsumer
public void walk(Visitor<Operator> visitor)
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |