|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rapidminer.tools.AbstractObservable<Process>
com.rapidminer.Process
public class Process
This class was introduced to avoid confusing handling of operator maps and other stuff when a new process definition is created. It is also necessary for file name resolving and breakpoint handling.
If you want to use RapidMiner from your own application the best way is often to create a process definition from
scratch (by adding the complete operator tree to the process' root operator) or from a file (for example created with
the GUI beforehand) and start it by invoking the run() method.
Observers can listen to changes of the associated file, repository location, and context.
TODO: Add reasonable class comment
| Field Summary | |
|---|---|
static int |
PROCESS_STATE_PAUSED
|
static int |
PROCESS_STATE_RUNNING
|
static int |
PROCESS_STATE_STOPPED
|
static int |
PROCESS_STATE_UNKNOWN
|
| Constructor Summary | |
|---|---|
Process()
Constructs an process consisting only of a SimpleOperatorChain. |
|
Process(java.io.File file)
|
|
Process(java.io.File file,
ProgressListener progressListener)
Creates a new process from the given process file. |
|
Process(java.io.InputStream in)
Reads an process configuration from the given stream. |
|
Process(java.io.Reader in)
Reads an process configuration from the given reader. |
|
Process(java.lang.String xmlString)
Reads an process configuration from an XML String. |
|
Process(java.lang.String xml,
Process process)
Creates a new process from the given XML copying state information not covered by the XML from the parameter process. |
|
Process(java.net.URL url)
Reads an process configuration from the given URL. |
|
| Method Summary | |
|---|---|
void |
addBreakpointListener(BreakpointListener listener)
Removes a breakpoint listener. |
void |
addDataTable(DataTable table)
Adds the given data table. |
void |
addLoggingListener(LoggingListener loggingListener)
Adds the given logging listener. |
void |
addProcessSetupListener(ProcessSetupListener listener)
|
void |
addReportStream(ReportStream stream)
This method adds a new report stream with the given name |
void |
applyContextMacros()
|
boolean |
checkExperiment(IOContainer inputContainer)
Deprecated. Use checkProcess(IOContainer) instead |
boolean |
checkProcess(IOContainer inputContainer)
Checks for correct number of inner operators, properties, and io. |
void |
clearDataTable(java.lang.String name)
Clears a single data table, i.e. removes all entries. |
void |
clearMacros()
Clears all macros. |
void |
clearReportStreams()
|
void |
clearStorage()
Clears all macros. |
void |
clearUnknownParameters()
Clears the information about unknown parameter types which occurred during process creation (from streams or files). |
java.lang.Object |
clone()
|
boolean |
dataTableExists(java.lang.String name)
Returns true if a data table object with the given name exists. |
void |
deleteDataTable(java.lang.String name)
Deletes a single data table. |
void |
fireExecutionOrderChanged(ExecutionUnit unit)
|
void |
fireOperatorAdded(Operator operator)
|
void |
fireOperatorChanged(Operator operator)
|
void |
fireOperatorRemoved(Operator operator,
int oldIndex,
int oldIndexAmongEnabled)
|
void |
fireResumeEvent()
Fires the event that the process was resumed. |
java.util.Collection<java.lang.String> |
getAllOperatorNames()
Returns a Set view of all operator names (i.e. |
java.util.Collection<Operator> |
getAllOperators()
Returns a Collection view of all operators. |
Annotations |
getAnnotations()
|
ProcessContext |
getContext()
|
Operator |
getCurrentOperator()
Returns the operator that is currently being executed. |
DataTable |
getDataTable(java.lang.String name)
Returns the data table associated with the given name. |
java.util.Collection<DataTable> |
getDataTables()
Returns all data tables. |
DebugMode |
getDebugMode()
|
static java.nio.charset.Charset |
getEncoding(java.lang.String encoding)
|
ExecutionMode |
getExecutionMode()
|
java.io.File |
getExperimentFile()
Deprecated. Use getProcessFile() instead |
int |
getExperimentState()
Deprecated. Use getProcessState() instead |
java.lang.String |
getImportMessage()
Returns some user readable messages generated during import by XMLImporter. |
LoggingHandler |
getLog()
|
java.util.logging.Logger |
getLogger()
|
MacroHandler |
getMacroHandler()
Returns the macro handler. |
Operator |
getOperator(java.lang.String name)
Returns the operator with the given name. |
java.io.File |
getProcessFile()
Deprecated. Use getProcessLocation() |
ProcessLocation |
getProcessLocation()
|
int |
getProcessState()
|
ReportStream |
getReportStream(java.lang.String name)
Returns the reportStream with given name |
RepositoryAccessor |
getRepositoryAccessor()
|
RepositoryLocation |
getRepositoryLocation()
|
ProcessRootOperator |
getRootOperator()
Delivers the current root operator. |
java.util.List<UnknownParameterInformation> |
getUnknownParameters()
Delivers the information about unknown parameter types which occurred during process creation (from streams or files). |
boolean |
hasSaveDestination()
Returns true iff either a file or a repository location is defined. |
boolean |
isProcessConverted()
This returns true if the process has been imported and ImportRules have been applied during importing. |
protected void |
loadInitialData()
Loads results from the repository if specified in the ProcessContext. |
protected java.util.logging.Logger |
makeLogger()
|
java.lang.String |
makeRelativeRepositoryLocation(RepositoryLocation loc)
Turns loc into a repository location relative to getRepositoryLocation(). |
void |
notifyRenaming(java.lang.String oldName,
java.lang.String newName)
|
void |
pause()
Stops the process as soon as possible. |
void |
pause(Operator operator,
IOContainer iocontainer,
int breakpointType)
Pauses the process at a breakpoint. |
void |
readProcess(java.io.Reader in)
Reads the process setup from the given input stream. |
void |
readProcess(java.io.Reader in,
ProgressListener progressListener)
|
java.lang.String |
registerName(java.lang.String name,
Operator operator)
Returns a "name (i)" if name is already in use. |
void |
removeBreakpointListener(BreakpointListener listener)
Adds a breakpoint listener. |
void |
removeLoggingListener(LoggingListener loggingListener)
Removes the given logging listener. |
void |
removeProcessSetupListener(ProcessSetupListener listener)
|
void |
removeReportStream(java.lang.String name)
Removes this reportStream from process. |
java.io.File |
resolveFileName(java.lang.String name)
Resolves the given filename against the directory containing the process file. |
RepositoryLocation |
resolveRepositoryLocation(java.lang.String loc)
Resolves a repository location relative to getRepositoryLocation(). |
void |
resume()
Resumes the process after it has been paused. |
IOObject |
retrieve(java.lang.String name,
boolean remove)
Retrieves the stored object. |
IOContainer |
run()
Starts the process with no input. |
IOContainer |
run(int logVerbosity)
Starts the process with the given log verbosity. |
IOContainer |
run(IOContainer input)
Starts the process with the given input. |
IOContainer |
run(IOContainer input,
boolean unused)
Deprecated. |
IOContainer |
run(IOContainer input,
int logVerbosity)
Starts the process with the given input. |
IOContainer |
run(IOContainer input,
int logVerbosity,
boolean cleanUp)
Deprecated. |
IOContainer |
run(IOContainer input,
int logVerbosity,
boolean cleanUp,
java.util.Map<java.lang.String,java.lang.String> macroMap)
Deprecated. |
IOContainer |
run(IOContainer input,
int logVerbosity,
java.util.Map<java.lang.String,java.lang.String> macroMap)
Starts the process with the given input. |
void |
save()
Saves the process to the process file. |
void |
save(java.io.File file)
Saves the process to the given process file. |
protected void |
saveResults()
Stores the results in the repository if specified in the ProcessContext. |
void |
setContext(ProcessContext context)
|
void |
setCurrentOperator(Operator operator)
Returns the operator that is currently being executed. |
void |
setDebugMode(DebugMode mode)
|
void |
setExecutionMode(ExecutionMode mode)
|
void |
setExperimentFile(java.io.File file)
Deprecated. Please use setProcessFile(File) instead. |
void |
setExperimentState(int state)
Deprecated. Use setProcessState(int) instead |
void |
setImportMessage(java.lang.String importMessage)
|
void |
setProcessConverted(boolean isProcessConverted)
This sets whether the process is converted. |
void |
setProcessFile(java.io.File file)
Sets the process file. |
void |
setProcessLocation(ProcessLocation processLocation)
|
void |
setRepositoryAccessor(RepositoryAccessor repositoryAccessor)
|
void |
setRootOperator(ProcessRootOperator root)
Sets the current root operator. |
boolean |
shouldPause()
Returns true iff the process should be stopped. |
boolean |
shouldStop()
Returns true iff the process should be stopped. |
void |
stop()
Stops the process as soon as possible. |
void |
store(java.lang.String name,
IOObject object)
Returns the macro handler. |
java.lang.String |
toString()
|
void |
unregisterName(java.lang.String name)
This method is used for unregistering a name from the operator name map. |
void |
updateNotify()
Can be called by GUI components if visual representation or any other state not known to the process itself has changed. |
| Methods inherited from class com.rapidminer.tools.AbstractObservable |
|---|
addObserver, addObserverAsFirst, fireUpdate, fireUpdate, removeObserver |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int PROCESS_STATE_UNKNOWN
public static final int PROCESS_STATE_STOPPED
public static final int PROCESS_STATE_PAUSED
public static final int PROCESS_STATE_RUNNING
| Constructor Detail |
|---|
public Process()
public Process(java.io.File file)
throws java.io.IOException,
XMLException
java.io.IOException
XMLException
public Process(java.io.File file,
ProgressListener progressListener)
throws java.io.IOException,
XMLException
java.io.IOException
XMLException
public Process(java.lang.String xml,
Process process)
throws java.io.IOException,
XMLException
java.io.IOException
XMLException
public Process(java.lang.String xmlString)
throws java.io.IOException,
XMLException
java.io.IOException
XMLException
public Process(java.io.Reader in)
throws java.io.IOException,
XMLException
java.io.IOException
XMLException
public Process(java.io.InputStream in)
throws java.io.IOException,
XMLException
java.io.IOException
XMLException
public Process(java.net.URL url)
throws java.io.IOException,
XMLException
java.io.IOException
XMLException| Method Detail |
|---|
protected java.util.logging.Logger makeLogger()
public java.lang.Object clone()
clone in class java.lang.Object@Deprecated public void setExperimentState(int state)
setProcessState(int) instead
@Deprecated public int getExperimentState()
getProcessState() instead
public int getProcessState()
public LoggingHandler getLog()
public java.util.logging.Logger getLogger()
public MacroHandler getMacroHandler()
public void clearMacros()
public void store(java.lang.String name,
IOObject object)
public IOObject retrieve(java.lang.String name,
boolean remove)
public void clearStorage()
public void addLoggingListener(LoggingListener loggingListener)
public void removeLoggingListener(LoggingListener loggingListener)
public boolean dataTableExists(java.lang.String name)
public void addDataTable(DataTable table)
public void clearDataTable(java.lang.String name)
public void deleteDataTable(java.lang.String name)
public DataTable getDataTable(java.lang.String name)
public java.util.Collection<DataTable> getDataTables()
public void addReportStream(ReportStream stream)
public ReportStream getReportStream(java.lang.String name)
public void removeReportStream(java.lang.String name)
name - of the report stream given in the ReportGenerator operatorpublic void clearReportStreams()
public void setRootOperator(ProcessRootOperator root)
public ProcessRootOperator getRootOperator()
public Operator getOperator(java.lang.String name)
public Operator getCurrentOperator()
public java.util.Collection<Operator> getAllOperators()
public java.util.Collection<java.lang.String> getAllOperatorNames()
public void setCurrentOperator(Operator operator)
public void pause(Operator operator,
IOContainer iocontainer,
int breakpointType)
public void resume()
public void stop()
public void pause()
public boolean shouldStop()
public boolean shouldPause()
public void addBreakpointListener(BreakpointListener listener)
public void removeBreakpointListener(BreakpointListener listener)
public void fireResumeEvent()
public java.util.List<UnknownParameterInformation> getUnknownParameters()
public void clearUnknownParameters()
@Deprecated public boolean checkExperiment(IOContainer inputContainer)
checkProcess(IOContainer) instead
public boolean checkProcess(IOContainer inputContainer)
protected void loadInitialData()
throws UserError
ProcessContext.
UserError
protected void saveResults()
throws UserError
ProcessContext.
UserErrorpublic void applyContextMacros()
public final IOContainer run()
throws OperatorException
OperatorException
public final IOContainer run(int logVerbosity)
throws OperatorException
OperatorException
public final IOContainer run(IOContainer input)
throws OperatorException
OperatorException
public final IOContainer run(IOContainer input,
int logVerbosity)
throws OperatorException
OperatorException
@Deprecated
public final IOContainer run(IOContainer input,
boolean unused)
throws OperatorException
OperatorException
@Deprecated
public final IOContainer run(IOContainer input,
int logVerbosity,
boolean cleanUp)
throws OperatorException
OperatorException
@Deprecated
public final IOContainer run(IOContainer input,
int logVerbosity,
boolean cleanUp,
java.util.Map<java.lang.String,java.lang.String> macroMap)
throws OperatorException
OperatorException
public final IOContainer run(IOContainer input,
int logVerbosity,
java.util.Map<java.lang.String,java.lang.String> macroMap)
throws OperatorException
OperatorExceptionpublic static java.nio.charset.Charset getEncoding(java.lang.String encoding)
public void save()
throws java.io.IOException
java.io.IOException
public void save(java.io.File file)
throws java.io.IOException
java.io.IOExceptionpublic java.io.File resolveFileName(java.lang.String name)
public void readProcess(java.io.Reader in)
throws XMLException,
java.io.IOException
XMLException
java.io.IOException
public void readProcess(java.io.Reader in,
ProgressListener progressListener)
throws XMLException,
java.io.IOException
XMLException
java.io.IOException
public java.lang.String registerName(java.lang.String name,
Operator operator)
public void unregisterName(java.lang.String name)
public void notifyRenaming(java.lang.String oldName,
java.lang.String newName)
public java.lang.String toString()
toString in class java.lang.Objectpublic void addProcessSetupListener(ProcessSetupListener listener)
public void removeProcessSetupListener(ProcessSetupListener listener)
public void fireOperatorAdded(Operator operator)
public void fireOperatorChanged(Operator operator)
public void fireOperatorRemoved(Operator operator,
int oldIndex,
int oldIndexAmongEnabled)
public void fireExecutionOrderChanged(ExecutionUnit unit)
public ExecutionMode getExecutionMode()
public void setExecutionMode(ExecutionMode mode)
public DebugMode getDebugMode()
public void setDebugMode(DebugMode mode)
public RepositoryLocation resolveRepositoryLocation(java.lang.String loc)
throws UserError,
MalformedRepositoryLocationException
getRepositoryLocation().
UserError
MalformedRepositoryLocationExceptionpublic java.lang.String makeRelativeRepositoryLocation(RepositoryLocation loc)
getRepositoryLocation().
public void setContext(ProcessContext context)
public ProcessContext getContext()
public void setImportMessage(java.lang.String importMessage)
public boolean isProcessConverted()
public void setProcessConverted(boolean isProcessConverted)
public java.lang.String getImportMessage()
XMLImporter.
public boolean hasSaveDestination()
@Deprecated public java.io.File getExperimentFile()
getProcessFile() instead
@Deprecated public java.io.File getProcessFile()
getProcessLocation()
@Deprecated public void setExperimentFile(java.io.File file)
setProcessFile(File) instead.
public void setProcessFile(java.io.File file)
public void setProcessLocation(ProcessLocation processLocation)
public ProcessLocation getProcessLocation()
public RepositoryLocation getRepositoryLocation()
public void updateNotify()
public RepositoryAccessor getRepositoryAccessor()
public void setRepositoryAccessor(RepositoryAccessor repositoryAccessor)
public Annotations getAnnotations()
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||