Changeset 754 for trunk/docs
- Timestamp:
- Mar 14, 2016, 12:27:24 PM (9 years ago)
- Location:
- trunk/docs/client
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/docs/client/howto.rst
r725 r754 64 64 .. warning:: Using different versions of Hogan to compile and to use in a web application may lead to compatibility issue. 65 65 66 Everything is now ready to work with :ref:`ZOO-Client <client-what>`. Read the :ref:`next section <client-example>` for an example JavaScript application. 66 Everything is now ready to work with :ref:`ZOO-Client 67 <client-what>`. Read the :ref:`next section <client-example>` for an 68 example JavaScript application. 67 69 68 Building ZOO-Client documentation69 --------------------------------- 70 Building ZOO-Client API documentation 71 ------------------------------------- 70 72 71 73 You may also build the ZOO-Client API documentation using `jsDoc … … 78 80 79 81 This will build HTML documentation in a new directory named ``/out`` in 80 your working directory. 82 your working directory. 81 83 84 .. note:: 85 Building the ZOO-Client API documentation is optional, please 86 refer to `the up-to-date ZOO-Client API Documentation 87 <http://www.zoo-project.org/jsDoc/index.html>`__ for the current 88 API version. 89 -
trunk/docs/client/what.rst
r725 r754 5 5 6 6 ZOO-Client is a client-side JavaScript API which provides simple methods 7 for interacting with `WPS <http://www.opengeospatial.org/standards/wps/>`__ server from web 7 for interacting with `WPS 8 <http://www.opengeospatial.org/standards/wps/>`__ server from web 8 9 applications. It is helpful for sending requests to any WPS compliant 9 10 server (such as :ref:`kernel_index`) and to parse the output responses … … 15 16 16 17 ZOO-Client relies on modern JavaScript libraries and can be seamlessly 17 integrated in new or existing web platforms or applications. ZOO-Client works by expanding the tags available in WPS specific 18 templates using values provided by a JavaScript hash or object. It 19 allows to build valid WPS requests and to send them to a WPS server. It 20 also provides functions to easily parse and reuse the output XML 21 responses. Read the :ref:`next section <client-howto>` to get started. 18 integrated in new or existing web platforms or 19 applications. ZOO-Client works by expanding the tags available in WPS 20 specific templates using values provided by a JavaScript hash or 21 object. It allows to build valid WPS requests and to send them to a 22 WPS server. It also provides functions to easily parse and reuse the 23 output XML responses. Read the :ref:`next section <client-howto>` to 24 get started. 25 26 Please, refer to the `ZOO-Client API documentation 27 <http://www.zoo-project.org/jsDoc/index.html>`__ for accessing the 28 up-to-date documentation. 22 29 23 30 … … 26 33 27 34 ZOO-Client uses logic-less `Mustache <http://mustache.github.io/>`__ 28 templates for creating well-formed WPS requests. Templates are called29 *logic-less* because they do not contain any *if* statements, *else* 30 clauses, or *for* loops, but only **tags**. Some tags are dynamically replaced by a 31 value or a series of values. 35 templates for creating well-formed WPS requests. Please, refer to the 36 `ZOO-Client API documentation 37 <http://www.zoo-project.org/jsDoc//module-wpsPayload.html>`__ for more 38 details about the functions using the templates. 32 39 33 40 … … 37 44 *GetCapabilities* requests are created using the following template: 38 45 39 :: 40 41 <wps:GetCapabilities xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 ../wpsGetCapabilities_request.xsd" language="{{language}}" service="WPS"> 42 <wps:AcceptVersions> 43 <ows:Version>1.0.0</ows:Version> 44 </wps:AcceptVersions> 45 </wps:GetCapabilities> 46 .. include:: ../../zoo-project/zoo-client/lib/tpl/payload_GetCapabilities.mustache 47 :code: xml 48 46 49 47 50 … … 51 54 *DescribeProcess* requests are created using the following template: 52 55 53 :: 54 55 <DescribeProcess xmlns="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 ../wpsDescribeProcess_request.xsd" service="WPS" version="1.0.0" language="{{language}}"> 56 {{#identifiers}} 57 <ows:Identifier>{{.}}</ows:Identifier> 58 {{/identifiers}} 59 </DescribeProcess> 56 .. include:: ../../zoo-project/zoo-client/lib/tpl/payload_DescribeProcess.mustache 57 :code: xml 60 58 61 59 … … 65 63 *Execute* requests are created using a more complex template, as shown bellow: 66 64 67 :: 65 .. include:: ../../zoo-project/zoo-client/lib/tpl/payload_Execute.mustache 66 :code: xml 68 67 69 <wps:Execute service="WPS" version="1.0.0" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0../wpsExecute_request.xsd" language="{{language}}">70 <!-- template-version: 0.21 -->71 <ows:Identifier>{{Identifier}}</ows:Identifier>72 <wps:DataInputs>73 {{#DataInputs}}74 {{#is_literal}}75 <wps:Input>76 <ows:Identifier>{{identifier}}</ows:Identifier>77 <wps:Data>78 <wps:LiteralData{{#dataType}} dataType="{{dataType}}"{{/dataType}}>{{value}}</wps:LiteralData>79 </wps:Data>80 </wps:Input>81 {{/is_literal}}82 {{#is_bbox}}83 <wps:Input>84 <ows:Identifier>{{identifier}}</ows:Identifier>85 <wps:Data>86 <wps:BoundingBoxData ows:crs="{{crs}}" ows:dimensions="{{dimension}}">87 <ows:LowerCorner>{{lowerCorner}}</ows:LowerCorner>88 <ows:UpperCorner>{{upperCorner}}</ows:UpperCorner>89 </wps:BoundingBoxData>90 </wps:Data>91 </wps:Input>92 {{/is_bbox}}93 {{#is_complex}}94 {{#is_reference}}95 {{#is_get}}96 <wps:Input>97 <ows:Identifier>{{identifier}}</ows:Identifier>98 <wps:Reference xlink:href="{{href}}"{{#schema}} schema="{{shema}}"{{/schema}}{{#mimeType}} mimeType="{{mimeType}}"{{/mimeType}}{{#encoding}} encoding="{{encoding}}"{{/encoding}}/>99 </wps:Input>100 {{/is_get}}101 {{#is_post}}102 <wps:Input>103 <ows:Identifier>{{identifier}}</ows:Identifier>104 <wps:Reference xlink:href="{{href}}" method="{{method}}">105 {{#headers}}106 <wps:Header key="{{key}}" value="{{value}}" />107 {{/headers}}108 <wps:Body>{{{value}}}</wps:Body>109 </wps:Reference>110 </wps:Input>111 {{/is_post}}112 {{/is_reference}}113 {{^is_reference}}114 <wps:Input>115 <ows:Identifier>{{identifier}}</ows:Identifier>116 <wps:Data>117 <wps:ComplexData{{#schema}} schema="{{shema}}"{{/schema}}{{#mimeType}} mimeType="{{mimeType}}"{{/mimeType}}{{#encoding}} encoding="{{encoding}}"{{/encoding}}>{{#is_XML}}118 {{{value}}}{{/is_XML}}{{^is_XML}}<![CDATA[{{{value}}}]]>{{/is_XML}}119 </wps:ComplexData>120 </wps:Data>121 </wps:Input>122 {{/is_reference}}123 {{/is_complex}}124 {{/DataInputs}}125 </wps:DataInputs>126 <wps:ResponseForm>127 {{#RawDataOutput}}128 {{#DataOutputs}}129 <wps:RawDataOutput mimeType="{{mimeType}}">130 <ows:Identifier>{{identifier}}</ows:Identifier>131 </wps:RawDataOutput>132 {{/DataOutputs}}133 {{/RawDataOutput}}134 {{^RawDataOutput}}135 <wps:ResponseDocument{{#storeExecuteResponse}} storeExecuteResponse="{{storeExecuteResponse}}"{{/storeExecuteResponse}}{{#lineage}} lineage="{{lineage}}"{{/lineage}}{{#status}} status="{{status}}"{{/status}}>136 {{#DataOutputs}}137 {{#is_literal}}138 <wps:Output{{#dataType}} dataType="{{dataType}}"{{/dataType}}{{#uom}} uom="{{uom}}"{{/uom}}>139 <ows:Identifier>{{identifier}}</ows:Identifier>140 </wps:Output>141 {{/is_literal}}142 {{^is_literal}}143 <wps:Output{{#asReference}} asReference="{{asReference}}"{{/asReference}}{{#schema}} schema="{{schema}}"{{/schema}}{{#mimeType}} mimeType="{{mimeType}}"{{/mimeType}}{{#encoding}} encoding="{{encoding}}"{{/encoding}}>144 <ows:Identifier>{{identifier}}</ows:Identifier>145 </wps:Output>146 {{/is_literal}}147 {{/DataOutputs}}148 </wps:ResponseDocument>149 {{/RawDataOutput}}150 </wps:ResponseForm>151 </wps:Execute>
Note: See TracChangeset
for help on using the changeset viewer.