OpenLayers.WPSClient

High level API for interaction with Web Processing Services (WPS).  An OpenLayers.WPSClient instance is used to create OpenLayers.WPSProcess instances for servers known to the WPSClient.  The WPSClient also caches DescribeProcess responses to reduce the number of requests sent to servers when processes are created.

Summary
OpenLayers.WPSClientHigh level API for interaction with Web Processing Services (WPS).
Properties
servers{Object} Service metadata, keyed by a local identifier.
version{String} The default WPS version to use if none is configured.
lazy{Boolean} Should the DescribeProcess be deferred until a process is fully configured? 
events{OpenLayers.Events}
Constructor
OpenLayers.WPSClient
Functions
executeShortcut to execute a process with a single function call.
getProcessCreates an OpenLayers.WPSProcess.
describeProcess
destroy

Properties

servers

{Object} Service metadata, keyed by a local identifier.

Properties

url{String} the url of the server
version{String} WPS version of the server
processDescription{Object} Cache of raw DescribeProcess responses, keyed by process identifier.

version

{String} The default WPS version to use if none is configured.  Default is ‘1.0.0’.

lazy

{Boolean} Should the DescribeProcess be deferred until a process is fully configured?  Default is false.

events

{OpenLayers.Events}

Supported event types

describeprocessFires when the process description is available.  Listeners receive an object with a ‘raw’ property holding the raw DescribeProcess response, and an ‘identifier’ property holding the process identifier of the described process.

Constructor

OpenLayers.WPSClient

Parameters

options{Object} Object whose properties will be set on the instance.

Avaliable options

servers{Object} Mandatory.  Service metadata, keyed by a local identifier.  Can either be a string with the service url or an object literal with additional metadata:
servers: {
    local: '/geoserver/wps'
}, {
    opengeo: {
        url: 'http://demo.opengeo.org/geoserver/wps',
        version: '1.0.0'
    }
}
lazy{Boolean} Optional.  Set to true if DescribeProcess should not be requested until a process is fully configured.  Default is false.

Functions

execute

execute: function(options)

Shortcut to execute a process with a single function call.  This is equivalent to using getProcess and then calling execute on the process.

Parameters

options{Object} Options for the execute operation.

Available options

server{String} Mandatory.  One of the local identifiers of the configured servers.
process{String} Mandatory.  A process identifier known to the server.
inputs{Object} The inputs for the process, keyed by input identifier.  For spatial data inputs, the value of an input is usually an OpenLayers.Geometry, an OpenLayers.Feature.Vector or an array of geometries or features.
output{String} The identifier of an output to parse.  Optional.  If not provided, the first output will be parsed.
success{Function} Callback to call when the process is complete.  This function is called with an outputs object as argument, which will have a property with the identifier of the requested output (e.g.  ‘result’).  For processes that generate spatial output, the value will either be a single OpenLayers.Feature.Vector or an array of features.
scope{Object} Optional scope for the success callback.

getProcess

getProcess: function(serverID,
processID)

Creates an OpenLayers.WPSProcess.

Parameters

serverID{String} Local identifier from the servers that this instance was constructed with.
processID{String} Process identifier known to the server.

Returns

{OpenLayers.WPSProcess}

describeProcess

describeProcess: function(serverID,
processID,
callback,
scope)

Parameters

serverID{String} Identifier of the server
processID{String} Identifier of the requested process
callback{Function} Callback to call when the description is available
scope{Object} Optional execution scope for the callback function

destroy

destroy: function()
execute: function(options)
Shortcut to execute a process with a single function call.
getProcess: function(serverID,
processID)
Creates an OpenLayers.WPSProcess.
Representation of a WPS process.
describeProcess: function(serverID,
processID,
callback,
scope)
destroy: function()
A Geometry is a description of a geographic object.
Vector features use the OpenLayers.Geometry classes as geometry description.
Close