openlayers/openlayers — pull request #632 by ahocevar (2012-08-11 18:17:21+00:00)
Title: WPS Client

This pull request suggests a WPS client for easy interaction with WPS processes. It currently supports processes that take literal values and/or one or multiple features or geometries as input. By issuing DescribeProcess requests asynchronously, the WPS client gets information about the requested process to decide the correct input and output MIME type. Chaining of processes is also supported.

The pull request adds three new types:

* **OpenLayers.WPSClient** manages servers, caches DescribeProcess responses and creates *OpenLayers.WPSProcess* instances.
* **OpenLayers.WPSProcess** represents a process. To get information about its underlying process, it issues DescribeProcess requests. It can chain other processes as inputs. Finally, it issues Execute requests, and calls a callback with the process results.
* **OpenLayers.WPSProcess.ChainLink** is a lightweight handle type to use a process output as chained input to another process. Instances of this are not created directly, but by the *OpenLayers.WPSProcess*`.output()` method.

When compared to using *OpenLayers.Format.WPSDescribeProcess* and *OpenLayers.Format.WPSExecute* directly, advantages of using *OpenLayers.WPSClient* and *OpenLayers.WPSProcess* are simpler process configuration (no need to configure mime types) and no need to issue requests manually.

The design of these new components is open enough to add support for more mime types and inputs with a multiplicity other than 1 in the future. For now, it really only focusses on geometry related processing and process chaining.

Tests pass in Safari 5 and Firefox 14. Thanks for any review.