org.deegree.protocol.wps.client.process
Class RawProcessExecution

java.lang.Object
  extended by org.deegree.protocol.wps.client.process.RawProcessExecution

public class RawProcessExecution
extends Object

Represents an execution context for a Process that uses the RawOutput mode.

NOTE: This class is not thread-safe.

Version:
$Revision: 31699 $, $Date: 2011-08-31 13:29:54 +0200 (Wed, 31 Aug 2011) $
Author:
Andrei Ionita, Markus Schneider, last edited by: $Author: mschneider $
See Also:
Process, ProcessExecution

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 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.
 ComplexOutput executeComplexOutput(String id, String idCodeSpace, String mimeType, String encoding, String schema)
          Executes the process and returns the specified complex output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

client

protected final WPSClient client
Associated WPS client instance.


process

protected final Process process
Associated process instance.


inputs

protected final List<ExecutionInput> inputs
List of inputs, may be empty, but never null

Method Detail

executeComplexOutput

public ComplexOutput executeComplexOutput(String id,
                                          String idCodeSpace,
                                          String mimeType,
                                          String encoding,
                                          String schema)
                                   throws OWSExceptionReport,
                                          IOException,
                                          XMLStreamException
Executes the process and returns the specified complex output.

Parameters:
id - identifier of the output parameter to be returned, must not be null
idCodeSpace - codespace of the parameter identifier, may be null (for identifiers without codespace)
mimeType - mimeType of the format, may be null
encoding - encoding of the format, may be null
schema - schema of the format, in case it is an XML format
Returns:
requested process output, never null
Throws:
OWSExceptionReport - if the server replied with an exception
IOException - if a communication/network problem occured
XMLStreamException

addLiteralInput

public void addLiteralInput(String id,
                            String idCodeSpace,
                            String value,
                            String type,
                            String uom)
Adds a literal input parameter.

Parameters:
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)

addBBoxInput

public void addBBoxInput(String id,
                         String idCodeSpace,
                         double[] lower,
                         double[] upper,
                         String crs)
Adds a bounding box input parameter.

Parameters:
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 point
crs - coordinate system, may be null (indicates that the default crs from the parameter description applies)

addXMLInput

public void addXMLInput(String id,
                        String idCodeSpace,
                        URL url,
                        boolean byRef,
                        String mimeType,
                        String encoding,
                        String schema)
Adds an XML-valued complex input parameter.

Parameters:
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)

addXMLInput

public void addXMLInput(String id,
                        String idCodeSpace,
                        XMLStreamReader reader,
                        String mimeType,
                        String encoding,
                        String schema)
Adds an XML-valued complex input parameter.

Parameters:
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 event
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)

addBinaryInput

public void addBinaryInput(String id,
                           String idCodeSpace,
                           URL url,
                           boolean byRef,
                           String mimeType,
                           String encoding)
Adds a binary-valued complex input parameter.

Parameters:
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)

addBinaryInput

public void addBinaryInput(String id,
                           String idCodeSpace,
                           InputStream inputStream,
                           String mimeType,
                           String encoding)
Adds a binary-valued complex input parameter.

Parameters:
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)


Copyright © 2011. All Rights Reserved.