source: branches/PublicaMundi_David-devel/docs/services/process-profiles.rst @ 696

Last change on this file since 696 was 696, checked in by djay, 9 years ago

Small fixes in the main documentation.

  • Property svn:keywords set to Date Author
File size: 6.3 KB
RevLine 
[659]1.. _process-profiles:
2   
3Process profiles registry
[696]4=========================
[659]5
6WPS Services belonging to the same Services provider often share the
7same inputs and outputs. In such a case, every :ref:`ZCFG
8<services-zcfg>` file would contain the same metadata information and
9this may be a waste of time to write them all.
10
[696]11:ref:`ZOO-Kernel <kernel_index>` is able to handle metadata
12inheritance from `rev. 607
13<http://www.zoo-project.org/trac/changeset/607>`__, and this solves
14the issue of writing many ZCFG with same input and output. A registry
15can be loaded (before any other ZCFG files) and contain a set of
16Process Profiles organized in hierarchic levels according to the
17following rules:
[659]18
19  * *Concept*: The higher level in the hierarchy. *Concepts* are basic text files containing an abstract description of a WPS Service.
20  * *Generic*: A *Generic* profile can make reference to *Concepts*. It defines inputs and outputs without data format or maximum size limitation.
21  * *Implementation*: An *Implementation* profile can inherit from a
22    generic profile and make reference to concepts. It contains all
23    the metadata information about a particular WPS Service (see
24    :ref:`ZCFG reference <services-zcfg>` for more information).
25
26Both *Generic* and *Implementation* process profiles are created  from :ref:`ZCFG <services-zcfg>` files and stored in the registry sub-directories
27according to their level (*Concept*, *Generic* or *Implementation*).
28
29To activate the registry, you have to add a ``registry`` key to the
30``[main]`` section of your ``main.cfg`` file, and set its value to the
31directory path used to store the profile ZCFG files.
32
33
34Generic Process Profile
35-----------------------
36
37A Generic Process Profile is a ZCFG file located in the ``generic``
38sub-directory, it defines `main metadata information
39<zcfg-reference.html#main-metadata-information>`__, inputs and outputs
40name, basic metadata and multiplicity. It can make reference to a
41concept by defining a ``concept`` key in the `main metadata
42information <zcfg-reference.html#main-metadata-information>`__ part.
43
44You can find below the `GO.zcfg` file, a typical Generic Process
45Profile for Generic Geographic Operation, taking one InputPolygon
46input parameter and returning a result named Result, it make reference
47to the ``GOC`` concept:
48
49.. code-block:: none
50   :linenos:
51   
52   [GO]
53    Title = Geographic Operation
54    Abstract = Geographic Operation on exactly one input, returning one output
55    concept = GOC
56    level = generic
57    statusSupported = true
58    storeSupported = true
59    <DataInputs>
60     [InputPolygon]
61      Title = the geographic data
62      Abstract = the geographic data to run geographipc operation
63      minOccurs = 1
64      maxOccurs = 1
65    </DataInputs>
66    <DataOutputs>
67     [Result]
68      Title = the resulting data
69      Abstract = the resulting data after processing the operation
70    </DataOutputs> 
71
72
73.. Note:: if you need to reference more than one concept, you should
74    separate their names with a comma (ie. concept = GO,GB),
75
76Process Implementation Profile
77------------------------------
78
79A Process Implementation Profile is similar to a `ZCFG file
80<zcfg-reference.html>`__ located in the `implementation`
81sub-directory, it defines (or inherit from its parent) all the
82properties of a `Generic Process Profile <#generic-process-profile>`__
83and specify `Data Format <zcfg-reference.html#type-of-data-nodes>`__
84for both inputs and outputs. It can make reference to a concept by
85defining a ``concept`` key in the `main metadata information
86<zcfg-reference.html#main-metadata-information>`__ part.
87
88You can find below the `VectorOperation.zcfg` file, a typical Process
89Implementation Profile for Vector Geographic Operation, it inherit
90from the `GP generic profile <#generic-process-profile>`__:
91
92.. code-block:: none
93   :linenos:
94   
95   [VectorOperation]
96    Title = Vector Geographic Operation
97    Abstract = Apply a Vector Geographic Operation on a features collection and return the resulting features collection
98    extend = GO
99    level = profile
100    <DataInputs>
101     [InputPolygon]
102      Title = the vector data
103      Abstract = the vector data to run geographic operation
104      <ComplexData>
105       <Default>
106        mimeType = text/xml
107        encoding = UTF-8
108        schema = http://fooa/gml/3.1.0/polygon.xsd
109       </Default>
110       <Supported>
111        mimeType = application/json
112        encoding = UTF-8
113        extension = js
114       </Supported>
115    </DataInputs>
116    <DataOutputs>
117     [Result]
118      Title = the resulting data
119      Abstract = the resulting geographic data after processing the operation
120      <ComplexData>
121       <Default>
122        mimeType = text/xml
123        encoding = UTF-8
124        schema = http://fooa/gml/3.1.0/polygon.xsd
125       </Default>
126       <Supported>
127        mimeType = application/json
128        encoding = UTF-8
129        extension = js
130       </Supported>
131      </ComplexData>
132    </DataOutputs> 
133
134
135ZCFG inheritance
136----------------------------------
137
138For the ZCFG files at the service level, you can inherit the metadata
139from a Process Implementation Profile available in the registry. As
140before, you simply need to add a ``extend`` key refering the ZCFG you
141want to inherit from and a ``level`` key taking the `ìmplementation``
142value to your main metadata informations.
143
144So, for example, the original `ConvexHull.zcfg
145<http://www.zoo-project.org/trac/browser/trunk/zoo-project/zoo-services/ogr/base-vect-ops/cgi-env/ConvexHull.zcfg?rev=491>`__
146may be rewritten as:
147
148.. code-block:: none
149   :linenos:
150   
151   [ConvexHull]
152    Title = Compute convex hull.
153    Abstract = Return a feature collection that represents the convex hull of each geometry from the input collection.
154    serviceProvider = ogr_service.zo
155    serviceType = C
156    extend = VectorOperation
157    level = implementation
158
159Now, suppose that your service is able to return the result in KML
160format, then you may write the following:
161
162.. code-block:: none
163   :linenos:
164   
165   [ConvexHull]
166    Title = Compute convex hull.
167    Abstract = Return a feature collection that represents the convex hull of each geometry from the input collection.
168    serviceProvider = ogr_service.zo
169    serviceType = C
170    extend = VectorOperation
171    level = implementation
172    <DataOutputs>
173     [Result]
174        <Supported>
175         mimeType = application/vnd.google-earth.kml+xml
176         encoding = utf-8
177        </Supported>
178    </DataOutputs>
[696]179
Note: See TracBrowser for help on using the repository browser.

Search

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