com.rapidminer.operator
Class ProcessRootOperator

java.lang.Object
  extended by com.rapidminer.operator.Operator
      extended by com.rapidminer.operator.OperatorChain
          extended by com.rapidminer.operator.ProcessRootOperator
All Implemented Interfaces:
ConfigurationListener, PreviewListener, ParameterHandler, LoggingHandler

public final class ProcessRootOperator
extends OperatorChain

Each process must contain exactly one operator of this class and it must be the root operator of the process. The only purpose of this operator is to provide some parameters that have global relevance.

Author:
Ingo Mierswa Exp $

Field Summary
static java.lang.String PARAMETER_DELETE_TEMP_FILES
           
static java.lang.String PARAMETER_ENCODING
           
static java.lang.String PARAMETER_LOGFILE
           
static java.lang.String PARAMETER_LOGVERBOSITY
           
static java.lang.String PARAMETER_NOTIFICATION_EMAIL
           
static java.lang.String PARAMETER_PROCESS_DURATION_FOR_MAIL
           
static java.lang.String PARAMETER_RANDOM_SEED
           
static java.lang.String PARAMETER_RESULTFILE
           
static java.lang.String PARAMETER_SEND_MAIL
           
static int PARAMETER_SEND_MAIL_ALWAYS
           
static int PARAMETER_SEND_MAIL_FOR_LONG
           
static int PARAMETER_SEND_MAIL_NEVER
           
static java.lang.String[] PARAMETER_SEND_MAIL_OPTIONS
           
static java.lang.String PARAMETER_TEMP_DIR
           
static java.lang.String PROPERTY_RAPIDMINER_GENERAL_RANDOMSEED
          The property name for "The default random seed (-1: random random seed).
 
Constructor Summary
ProcessRootOperator(OperatorDescription description)
          Creates a new process operator without reference to an process.
ProcessRootOperator(OperatorDescription description, Process process)
          Creates a new process operator which directly references to the given process.
 
Method Summary
 void addProcessListener(ProcessListener l)
          Adds an process listener to the list of listeners.
 void clearListeners()
          Clears all process listeners.
 boolean getAddOnlyAdditionalOutput()
          Since the apply methods of the inner operators already add additional output, the handle additional output method should simply return a new container which is build from the additional output objects.
 InnerOperatorCondition getInnerOperatorCondition()
          Returns a simple chain condition.
 java.lang.Class<?>[] getInputClasses()
          Returns the classes that are needed as input.
 int getMaxNumberOfInnerOperators()
          Returns the highest possible value for the maximum number of innner operators.
 int getMinNumberOfInnerOperators()
          Returns 0 for the minimum number of innner operators.
 java.lang.Class<?>[] getOutputClasses()
          Returns the classes that are guaranteed to be returned by apply() as additional output.
 java.util.List<ParameterType> getParameterTypes()
          Returns a list of ParameterTypes describing the parameters of this operator.
 Process getProcess()
          Returns the process of this operator if available.
 void processFinished()
          Called at the end of the process.
protected  void processFinishedOperator(Operator op)
          Counts the step and notifies all process listeners.
protected  void processStartedOperator(Operator op)
          Counts the step and notifies all process listeners.
 void processStarts()
          Called at the beginning of the process.
 void removeProcessListener(ProcessListener l)
          Removes an process listener from the list of listeners.
 void sendEmail(IOContainer results, java.lang.Throwable e)
          This method can be used to send an email after the process has finished.
 void setProcess(Process process)
          Sets the process.
 boolean shouldReturnInnerOutput()
          Returns true since this operator chain should just return the output of the last inner operator.
 
Methods inherited from class com.rapidminer.operator.OperatorChain
addAddListener, addOperator, addOperator, apply, checkDeprecations, checkIO, checkNumberOfInnerOperators, checkProperties, clearErrorList, cloneOperator, createExperimentTree, createProcessTree, getAllInnerOperators, getIndexOfOperator, getInnerOperatorForName, getInnerOperatorsXML, getNumberOfAllOperators, getNumberOfOperators, getOperator, getOperatorFromAll, getOperators, performAdditionalChecks, registerOperator, removeAddListener, removeOperator, shouldAddNonConsumedInput, unregisterOperator
 
Methods inherited from class com.rapidminer.operator.Operator
addError, addValue, addWarning, apply, checkForStop, createExperimentTree, createFromXML, createMarkedExperimentTree, createMarkedProcessTree, createProcessTree, getApplyCount, getDeliveredOutputClasses, getDeprecationInfo, getDesiredInputClasses, getEncoding, getErrorList, getExperiment, getInput, getInput, getInput, getInputDescription, getIOContainerForInApplyLoopBreakpoint, getIODescription, getLog, getName, getOperatorClassName, getOperatorDescription, getParameter, getParameterAsBoolean, getParameterAsColor, getParameterAsDouble, getParameterAsFile, getParameterAsFile, getParameterAsInputStream, getParameterAsInt, getParameterAsMatrix, getParameterAsString, getParameterList, getParameters, getParameterType, getParent, getStartTime, getStatus, getUserDescription, getValue, getValues, getXML, hasBreakpoint, hasBreakpoint, hasInput, inApplyLoop, isDebugMode, isEnabled, isExpanded, isParallel, isParameterSet, log, logError, logNote, logWarning, register, remove, rename, resume, setApplyCount, setBreakpoint, setEnabled, setExpanded, setInput, setListParameter, setOperatorParameters, setParameter, setParameters, setParent, setUserDescription, toString, writeXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROPERTY_RAPIDMINER_GENERAL_RANDOMSEED

public static final java.lang.String PROPERTY_RAPIDMINER_GENERAL_RANDOMSEED
The property name for "The default random seed (-1: random random seed)."

See Also:
Constant Field Values

PARAMETER_ENCODING

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

PARAMETER_LOGVERBOSITY

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

PARAMETER_LOGFILE

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

PARAMETER_RESULTFILE

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

PARAMETER_TEMP_DIR

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

PARAMETER_DELETE_TEMP_FILES

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

PARAMETER_RANDOM_SEED

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

PARAMETER_SEND_MAIL

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

PARAMETER_SEND_MAIL_OPTIONS

public static final java.lang.String[] PARAMETER_SEND_MAIL_OPTIONS

PARAMETER_SEND_MAIL_ALWAYS

public static final int PARAMETER_SEND_MAIL_ALWAYS
See Also:
Constant Field Values

PARAMETER_SEND_MAIL_NEVER

public static final int PARAMETER_SEND_MAIL_NEVER
See Also:
Constant Field Values

PARAMETER_SEND_MAIL_FOR_LONG

public static final int PARAMETER_SEND_MAIL_FOR_LONG
See Also:
Constant Field Values

PARAMETER_PROCESS_DURATION_FOR_MAIL

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

PARAMETER_NOTIFICATION_EMAIL

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

ProcessRootOperator

public ProcessRootOperator(OperatorDescription description)
Creates a new process operator without reference to an process.


ProcessRootOperator

public ProcessRootOperator(OperatorDescription description,
                           Process process)
Creates a new process operator which directly references to the given process.

Method Detail

setProcess

public void setProcess(Process process)
Sets the process.


getProcess

public Process getProcess()
Returns the process of this operator if available. Overwrites the method from the superclass.

Specified by:
getProcess in interface ConfigurationListener
Specified by:
getProcess in interface PreviewListener
Overrides:
getProcess in class Operator

shouldReturnInnerOutput

public boolean shouldReturnInnerOutput()
Returns true since this operator chain should just return the output of the last inner operator.

Overrides:
shouldReturnInnerOutput in class OperatorChain

getInnerOperatorCondition

public InnerOperatorCondition getInnerOperatorCondition()
Returns a simple chain condition.

Specified by:
getInnerOperatorCondition in class OperatorChain

getAddOnlyAdditionalOutput

public boolean getAddOnlyAdditionalOutput()
Since the apply methods of the inner operators already add additional output, the handle additional output method should simply return a new container which is build from the additional output objects. Therefore this method returns true.

Overrides:
getAddOnlyAdditionalOutput in class Operator

getMaxNumberOfInnerOperators

public int getMaxNumberOfInnerOperators()
Returns the highest possible value for the maximum number of innner operators.

Specified by:
getMaxNumberOfInnerOperators in class OperatorChain

getMinNumberOfInnerOperators

public int getMinNumberOfInnerOperators()
Returns 0 for the minimum number of innner operators.

Specified by:
getMinNumberOfInnerOperators in class OperatorChain

addProcessListener

public void addProcessListener(ProcessListener l)
Adds an process listener to the list of listeners.


removeProcessListener

public void removeProcessListener(ProcessListener l)
Removes an process listener from the list of listeners.


clearListeners

public void clearListeners()
Clears all process listeners.


processStarts

public void processStarts()
                   throws OperatorException
Called at the beginning of the process. Notifies all listeners and the children operators (super method).

Overrides:
processStarts in class OperatorChain
Throws:
OperatorException

processStartedOperator

protected void processStartedOperator(Operator op)
Counts the step and notifies all process listeners.


processFinishedOperator

protected void processFinishedOperator(Operator op)
Counts the step and notifies all process listeners.


processFinished

public void processFinished()
                     throws OperatorException
Called at the end of the process. Notifies all listeners and the children operators (super method).

Overrides:
processFinished in class OperatorChain
Throws:
OperatorException

sendEmail

public void sendEmail(IOContainer results,
                      java.lang.Throwable e)
               throws UndefinedParameterError
This method can be used to send an email after the process has finished. Currently only a working sendmail server is supported.

Throws:
UndefinedParameterError

getInputClasses

public java.lang.Class<?>[] getInputClasses()
Description copied from class: Operator
Returns the classes that are needed as input. May be null or an empty (no desired input). As default, all delivered input objects are consumed and must be also delivered as output in both Operator.getOutputClasses() and Operator.apply() if this is necessary. This default behavior can be changed by overriding Operator.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.

Specified by:
getInputClasses in class Operator

getOutputClasses

public java.lang.Class<?>[] getOutputClasses()
Description copied from class: Operator

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 Operator.getInputClasses() and Operator.getOutputClasses()). The default behavior for input consumation is defined by Operator.getInputDescription(Class) and can be changed by overwriting this method. Objects which are not consumed (defined by changing the implementation in Operator.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.

Specified by:
getOutputClasses in class Operator

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.

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


Copyright © 2001-2009 by Rapid-I