Changeset 754 for trunk


Ignore:
Timestamp:
Mar 14, 2016, 12:27:24 PM (9 years ago)
Author:
djay
Message:

Add the ZOO-Client API reference in the official documentation.

Location:
trunk/docs/client
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/client/howto.rst

    r725 r754  
    6464.. warning:: Using different versions of Hogan to compile and to use in a web application may lead to compatibility issue.
    6565
    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.
     66Everything is now ready to work with :ref:`ZOO-Client
     67<client-what>`. Read the :ref:`next section <client-example>` for an
     68example JavaScript application.
    6769
    68 Building ZOO-Client documentation
    69 ---------------------------------
     70Building ZOO-Client API documentation
     71-------------------------------------
    7072
    7173You may also build the ZOO-Client API documentation using `jsDoc
     
    7880
    7981This will build HTML documentation in a new directory named ``/out`` in
    80 your working directory.
     82your working directory. 
    8183
     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  
    55
    66ZOO-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
     7for interacting with `WPS
     8<http://www.opengeospatial.org/standards/wps/>`__ server from web
    89applications. It is helpful for sending requests to any WPS compliant
    910server (such as :ref:`kernel_index`) and to parse the output responses
     
    1516
    1617ZOO-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.
     18integrated in new or existing web platforms or
     19applications. ZOO-Client works by expanding the tags available in WPS
     20specific templates using values provided by a JavaScript hash or
     21object. It allows to build valid WPS requests and to send them to a
     22WPS server. It also provides functions to easily parse and reuse the
     23output XML responses. Read the :ref:`next section <client-howto>` to
     24get started.
     25
     26Please, refer to the `ZOO-Client API documentation
     27<http://www.zoo-project.org/jsDoc/index.html>`__ for accessing the
     28up-to-date documentation.
    2229
    2330
     
    2633
    2734ZOO-Client uses logic-less `Mustache <http://mustache.github.io/>`__
    28 templates for creating well-formed WPS requests. Templates are called
    29 *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.
     35templates 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
     38details about the functions using the templates.
    3239
    3340
     
    3744*GetCapabilities* requests are created using the following template:
    3845
    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
    4649
    4750
     
    5154*DescribeProcess* requests are created using the following template:
    5255
    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
    6058
    6159
     
    6563*Execute* requests are created using a more complex template, as shown bellow:
    6664
    67 ::
     65.. include:: ../../zoo-project/zoo-client/lib/tpl/payload_Execute.mustache
     66    :code: xml
    6867
    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.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png