|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||
See:
Description
| Interface Summary | |
|---|---|
| Process | An operation applied to some given data to achieve whatever analyze or model transformation. |
| ProcessDescriptor | Description of a process algorithm and its input/output parameters. |
| ProcessingRegistry | A collection of ProcessDescriptors identified by name. |
| ProcessListener | Receives general indications of process progress and events indicating start, completion or failure. |
| Class Summary | |
|---|---|
| ProcessEvent | Event sent by a running process to its listeners. |
| ProgressController | Monitors the progress of some lengthly operation, and allows cancellation. |
| Exception Summary | |
|---|---|
| ProcessException | Thrown when a process failed. |
Operation applied to some given data to achieve whatever analyze or model transformation. The interfaces are abstract enough to handle more than GIS data. Anything can be used here for whatever purpose that can be seen as a process.
This package can be seen as an integration of ISO 19115 org.opengis.metadata.lineage
package with the java.util.concurrent package, completed by the ISO 19111
org.opengis.parameter package. The integration is done as below:
ProcessDescriptor extends the ISO 19115
Processing interface.Process extends the JDK Callable
interface, and thus can be given to an executor
service for execution in a background thread.Process input and output parameters are stored in
ISO 19111 ParameterValueGroup objects.ProcessStep element assigned to the
ProcessDescriptor.PROCESS_STEP parameter.
The following example creates a process for a task named "MyProcess" (the available
process names are implementation-dependent), sets a few parameters and launches the process
with progress reports sent to the console:
ExecutorService executor = Executors.newFixedThreadPool(nThreads);
ProcessingRegistry registry = ...; // Implementation-dependent
ProcessDescriptor desc = registry.getDescriptor("MyProcess");
ParameterValueGroup param = desc.getInputDescriptor().createValue();
param.parameter("someParam1").setValue(myValue1);
param.parameter("someParam2").setValue(myValue2);
// etc. for all other parameter values...
Process process = desc.create(param);
process.addListener(new ProgressPrinter());
Future<ParameterValueGroup> task = executor.submit(process);
doSomeOtherTasksWhileTheProcessRunInBackground();
ParameterValueGroup output = task.get();
Processing,
ExecutorService
| utility/geotk-utility (download) |
|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||