source: branches/PublicaMundi_David-devel/docs/_build/html/_sources/services/process-profiles.txt @ 659

Last change on this file since 659 was 659, checked in by nbozon, 9 years ago

Massive update of zoo docs

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

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