Changes between Version 6 and Version 7 of ZooWebSite/ZooServices/ZCFGReference
- Timestamp:
- Jan 16, 2011, 5:46:33 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ZooWebSite/ZooServices/ZCFGReference
v6 v7 1 = .zcfgReference =1 = ZOO Configuration File Reference = 2 2 3 .zcfg is the ZOO Service configuration file which describes the service and being parsed by ZOO Kernel. You can use the generic example bellow to compose .zcfg files, and get working examples on the ZOO Trac.3 The ZOO Service configuration file (.zcfg) describes the service and will be parsed by ZOO Kernel to know how to handle it. You can use the generic example bellow to compose your own .zcfg files, and take a look at working examples on the ZOO-Project SVN source tree. 4 4 5 5 A ZOO Configuration file is divided in three distinct sections : … … 13 13 == Main metadata informations == 14 14 15 The fist part in a ZOO Configuration containing the metadata informations relatives to the service. Note that the "name of your service" have to be the exact same name as the function you defined in you service code. 15 The fist part in a ZOO Configuration contains the metadata informations relatives to the service. Note that the "name of your service", between bracket on the first line, have to be the exact same name as the function you defined in you service code. 16 17 You can see bellow a description of the main metadata informations: 16 18 {{{ 17 19 #!Lineno … … 22 24 storeSupported = true/false 23 25 statusSupported = true/false 24 serviceType = the programming language used to implement the service (C/ Python/Java/PHP/Fortran/Javascript)25 serviceProvider = Name of your service provider (.zo)26 serviceType = the programming language used to implement the service (C/Fortran/Python/Java/PHP/Javascript) 27 serviceProvider = name of your services provider (shared library/Python Module/Java Class/PHP Script/JavaScript script) 26 28 <MetaData> 27 29 title = Metadata title of your service … … 31 33 == List of Inputs == 32 34 33 The list of inputs your service can handle, it contains metadata informations of each servicesand it is a {{{<DataInputs>}}} node.35 The list of inputs contains metadata information of each defined input and it is a {{{<DataInputs>}}} node. 34 36 35 A t ipical list of inputs ({{{<DataInputs>}}}) look like the following:37 A typical list of inputs ({{{<DataInputs>}}}) look like the following: 36 38 {{{ 37 39 #!Lineno … … 52 54 }}} 53 55 56 Note that you can add {{{<MetaData>}}} node as in the main metadata information. 57 54 58 == List of Outputs == 55 59 60 The list of outputs is similar to a list of inputs except it is designed as a {{{<DataOutputs>}}} node. 61 62 A typical {{{<DataOutputs>}}} node look like the following: 56 63 {{{ 57 64 #!Lineno … … 69 76 70 77 You can define your data as: 71 * LiteralData72 * BoundingBoxData73 * ComplexData78 * [#LiteralDatanode LiteralData] 79 * [#BoundingBoxDatanode BoundingBoxData] 80 * [#ComplexDatanode ComplexData] 74 81 75 === LiteralData node === 82 Each Type Of Data node have at least one {{{<Default>}}} and one {{{<Supported>}}} node. Even if one of those are empty it has to be present as an opening and closing tag. 76 83 77 A tipical {{{<LiteralData>}}} node look like the following: 84 === !LiteralData node === 78 85 86 A {{{<LiteralData>}}} node get one {{{<Default>}}}, one or more {{{<Supported>}}} node depending on the number of Unity Of Mesures (UOM) and a {{{dataType}}} property. The {{{dataType}}} property define the type of literal data, a string, an interger and so on ([http://www.w3.org/TR/xmlschema-2/#built-in-datatypes complete list] of supported data types). 87 88 For input {{{<LiteralData>}}} nodes, you can add value to the {{{<Default>}}} properties to define a default value for this input. This means that when your Service will be run even if the input wasn't defined, this default value will be set as the current value for this input. 89 90 A typical {{{<LiteralData>}}} node look like the following: 79 91 {{{ 80 92 #!Lineno 81 93 <LiteralData> 82 DataType = float94 dataType = float 83 95 <Default> 84 96 uom = meters 85 value = 1086 97 </Default> 87 98 <Supported> … … 91 102 }}} 92 103 93 === BoundingBoxData node ===104 === !BoundingBoxData node === 94 105 95 A {{{<BoundingBoxData>}}} node contains one {{{<Defautl>}}} node defining the default Coordinate Reference Systems (CRM) and same number of {{{<Supported>}}} nodes as number of CRM your service support (note that you can also use a list of supported CRS separated them by coma in only one {{{<Supported>}}} node.106 A {{{<BoundingBoxData>}}} node contains one {{{<Defautl>}}} node getting a CRS property defining the default Coordinate Reference Systems (CRS) and one or more {{{<Supported>}}} nodes depending on the number of CRS your service support (note that you can also use a list of supported CRS separated them by coma in only one {{{<Supported>}}} node). 96 107 97 108 A tipical {{{<BoundingBoxData>}}} node, for two supported CRM ([http://www.epsg-registry.org/indicio/query?request=GetRepositoryItem&id=urn:ogc:def:crs:EPSG::4326 EPSG:4326] and [http://www.epsg-registry.org/indicio/query?request=GetRepositoryItem&id=urn:ogc:def:crs:EPSG::3785 EPSG:3785] ), look like the following: … … 112 123 }}} 113 124 114 === ComplexData node === 125 === !ComplexData node === 126 127 A ComplexData node get a {{{<Default>}}} and one or more {{{<Supported>}}} nodes depending on the number of supported format. A format is this set of properties : {{{mimeType}}}, {{{encoding}}} and optionaly {{{schema}}}. 128 129 For output ComplexData nodes, you can add the {{{extension}}} property to define what extension to use to name the file when storing the result is required. Obviously, you'll have to add the extension to each supported format. You can also add the {{{asReference}}} property for each input to define if the output should be stored on server side per default. Note, that the client can always modify this behavior setting {{{asReference}}} attribute to {{{true}}} or {{{false}}} for this output in the {{{ResponseDocument}}}. 130 131 You can see above a sample ComplexData node for default {{{application/json}}} and {{{text/xml}}} mimeTypes support: 115 132 {{{ 116 133 #!Lineno