|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.protocol.wps.client.process.ProcessExecution
public class ProcessExecution
Represents an execution context for a Process
that uses the ResponseDocument
output mode.
NOTE: This class is not thread-safe.
Process
,
RawProcessExecution
Field Summary | |
---|---|
protected WPSClient |
client
Associated WPS client instance. |
protected List<ExecutionInput> |
inputs
List of inputs, may be empty, but never null |
protected Process |
process
Associated process instance. |
Method Summary | |
---|---|
void |
addBBoxInput(String id,
String idCodeSpace,
double[] lower,
double[] upper,
String crs)
Adds a bounding box input parameter. |
void |
addBinaryInput(String id,
String idCodeSpace,
InputStream inputStream,
String mimeType,
String encoding)
Adds a binary-valued complex input parameter. |
void |
addBinaryInput(String id,
String idCodeSpace,
URL url,
boolean byRef,
String mimeType,
String encoding)
Adds a binary-valued complex input parameter. |
void |
addLiteralInput(String id,
String idCodeSpace,
String value,
String type,
String uom)
Adds a literal input parameter. |
void |
addOutput(String id,
String idCodeSpace,
String uom,
boolean asRef,
String mimeType,
String encoding,
String schema)
Adds the specified parameter to the list of explicitly requested output parameters. |
void |
addXMLInput(String id,
String idCodeSpace,
URL url,
boolean byRef,
String mimeType,
String encoding,
String schema)
Adds an XML-valued complex input parameter. |
void |
addXMLInput(String id,
String idCodeSpace,
XMLStreamReader reader,
String mimeType,
String encoding,
String schema)
Adds an XML-valued complex input parameter. |
ExecutionOutputs |
execute()
Executes the process and returns the outputs. |
void |
executeAsync()
Executes the process asynchronously. |
String |
getCreationTime()
Returns the creation time for the process execution as reported by the server. |
OWSExceptionReport |
getExceptionReport()
Returns the exception report. |
ExecutionOutputs |
getOutputs()
Returns the outputs of the process execution. |
Integer |
getPercentCompleted()
Returns the percentage of the process that has been completed. |
WPSConstants.ExecutionState |
getState()
Returns the current state of the execution. |
URL |
getStatusLocation()
Returns the web-accessible URL for retrieving the execute response. |
String |
getStatusMessage()
Returns the status message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final WPSClient client
protected final Process process
protected final List<ExecutionInput> inputs
null
Method Detail |
---|
public void addOutput(String id, String idCodeSpace, String uom, boolean asRef, String mimeType, String encoding, String schema)
Calling this method sets the ResponseForm
to ResponseDocument
.
id
- identifier of the output parameter, must not be null
idCodeSpace
- codespace of the parameter identifier, may be null
(for identifiers without codespace)uom
- requested unit of measure, may be null
(indicates that the default mime type from the
parameter description applies). This parameter only applies for literal outputs.asRef
- if true, the output should be returned by the process as a reference, otherwise it will be embedded in
the response documentmimeType
- requested mime type, may be null
(indicates that the default mime type from the parameter
description applies)encoding
- requested encoding, may be null
(indicates that the default encoding from the parameter
description applies)schema
- requested schema, may be null
(indicates that the default schema from the parameter
description applies)public ExecutionOutputs execute() throws OWSExceptionReport, IOException, XMLStreamException
null
IOException
- if a communication/network problem occured
OWSException
- if the server replied with an exception
XMLStreamException
OWSExceptionReport
public void executeAsync() throws OWSExceptionReport, IOException, XMLStreamException
This method issues the Execute
request against the server and returns immediately.
IOException
- if a communication/network problem occured
OWSException
- if the server replied with an exception
XMLStreamException
OWSExceptionReport
public ExecutionOutputs getOutputs() throws OWSExceptionReport
null
if the current state is not
WPSConstants.ExecutionState.SUCCEEDED
OWSExceptionReport
- if the server replied with an exceptionpublic WPSConstants.ExecutionState getState() throws OWSExceptionReport, IOException, XMLStreamException
null
if the execution has not been started yet
OWSExceptionReport
- if the server replied with an exception
IOException
- if a communication/network problem occured
XMLStreamException
public String getStatusMessage()
null
if the execution has not been started yet or no status message
availablepublic URL getStatusLocation()
For asynchronous operation, this URL may provide access to a dynamic document that's changing until the process is finished.
null
if the execution has not been started yet or no status location
is availablepublic Integer getPercentCompleted()
null
if the execution has not been started yet
or no completion percentage provided by the processpublic String getCreationTime()
null
if the execution has not been started yetpublic OWSExceptionReport getExceptionReport()
NOTE: An exception report is only available if state is WPSConstants.ExecutionState.FAILED
.
null
otherwisepublic void addLiteralInput(String id, String idCodeSpace, String value, String type, String uom)
id
- identifier of the input parameter, must not be null
idCodeSpace
- codespace of the parameter identifier, may be null
(for identifiers without codespace)value
- value of the literal input, must not be null
type
- data type in which the value should be considered, may be null
(this means it matches the
data type as defined by the process description)uom
- unit of measure of the value, may be null
(this means it matches the data type as defined
by the process description)public void addBBoxInput(String id, String idCodeSpace, double[] lower, double[] upper, String crs)
id
- identifier of the input parameter, must not be null
idCodeSpace
- codespace of the parameter identifier, may be null
(for identifiers without codespace)lower
- coordinates of the lower point, must not be null
upper
- coordinates of the upper point, must not be null
and length must match lower pointcrs
- coordinate system, may be null
(indicates that the default crs from the parameter
description applies)public void addXMLInput(String id, String idCodeSpace, URL url, boolean byRef, String mimeType, String encoding, String schema)
id
- identifier of the input parameter, must not be null
idCodeSpace
- codespace of the parameter identifier, may be null
(for identifiers without codespace)url
- URL
reference to the xml resource, must not be null
byRef
- if true, the parameter will be passed by reference to the server, otherwise it will be nested in the
Execute request. If true, the url needs to be web-accessible (e.g. not a file URL)mimeType
- mime type, may be null
(indicates that the default mime type from the parameter
description applies)encoding
- encoding, may be null
(indicates that the default encoding from the parameter description
applies)schema
- schema, may be null
(indicates that the default schema from the parameter description
applies)public void addXMLInput(String id, String idCodeSpace, XMLStreamReader reader, String mimeType, String encoding, String schema)
id
- identifier of the input parameter, must not be null
idCodeSpace
- codespace of the parameter identifier, may be null
(for identifiers without codespace)reader
- XMLStreamReader
to the xml data, must not be null
and point to the START_ELEMENT
eventmimeType
- mime type, may be null
(indicates that the default mime type from the parameter
description applies)encoding
- encoding, may be null
(indicates that the default encoding from the parameter description
applies)schema
- schema, may be null
(indicates that the default schema from the parameter description
applies)public void addBinaryInput(String id, String idCodeSpace, URL url, boolean byRef, String mimeType, String encoding)
id
- identifier of the input parameter, must not be null
idCodeSpace
- codespace of the parameter identifier, may be null
(for identifiers without codespace)url
- URL
reference to the binary resource, must not be null
(and must not be
web-accessible)byRef
- if true, the parameter will be passed by reference to the server, otherwise it will be nested in the
Execute request. If true, the url needs to be web-accessible (e.g. not a file URL)mimeType
- mime type, may be null
(indicates that the default mime type from the parameter
description applies)encoding
- encoding, may be null
(indicates that the default encoding from the parameter description
applies)public void addBinaryInput(String id, String idCodeSpace, InputStream inputStream, String mimeType, String encoding)
id
- identifier of the input parameter, must not be null
idCodeSpace
- codespace of the parameter identifier, may be null
(for identifiers without codespace)inputStream
- input stream to the binary data, must not be null
mimeType
- mime type, may be null
(indicates that the default mime type from the parameter
description applies)encoding
- encoding, may be null
(indicates that the default encoding from the parameter description
applies)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |