comparison doc/config-manual/model_of_transitions.tex @ 941:7a8f9eb9fb04

Do some Documentstyling. Added Typewriter-Style to mark XML-Elements and other technical Items. doc/trunk@1084 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Mon, 10 May 2010 12:53:17 +0000
parents 14df4bcabc3c
children c53a39cb7809
comparison
equal deleted inserted replaced
940:14df4bcabc3c 941:7a8f9eb9fb04
18 \end{enumerate} 18 \end{enumerate}
19 19
20 %% TODO: Add a Screenshot of the GNV WebClient marking GUI elements for FIS, 20 %% TODO: Add a Screenshot of the GNV WebClient marking GUI elements for FIS,
21 %% product, states and transitions 21 %% product, states and transitions
22 22
23 Main entry point for the configuration is the file \verb+ conf/conf.xml + 23 Main entry point for the configuration is the file {\tt conf/conf.xml }
24 defining the list of FIS and the according products based on the different 24 defining the list of FIS and the according products based on the different
25 datamodels in the datawarehouse. The provided datamodels are: 25 datamodels in the datawarehouse. The provided datamodels are:
26 26
27 \begin{enumerate} 27 \begin{enumerate}
28 \item ESRI ArcMarineBSH with following subtypes 28 \item ESRI ArcMarineBSH with following subtypes
35 \item ESRI ArcS57, 35 \item ESRI ArcS57,
36 \item CONTIS 36 \item CONTIS
37 \end{enumerate} 37 \end{enumerate}
38 38
39 Each product configuration consists of a datamodel specific configuration 39 Each product configuration consists of a datamodel specific configuration
40 organized in a product specific folder in \verb+ conf/products+ \footnote{The 40 organized in a product specific folder in {\tt conf/products} \footnote{The
41 special case of a "Horizontales Schnittprofil" is configured in 41 special case of a {\tt Horizontales Schnittprofil} is configured in
42 conf/horizontalprofile/conf\_mesh\_cross.xml }. The directory layout looks 42 {\tt conf/horizontalprofile/conf\_mesh\_cross.xml} }. The directory layout looks
43 like this: 43 like this:
44 44
45 \begin{verbatim} 45 \begin{verbatim}
46 products/ 46 products/
47 |-- horizontalcrosssection 47 |-- horizontalcrosssection
64 `-- conf_timeseriespoint.xml 64 `-- conf_timeseriespoint.xml
65 \end{verbatim} 65 \end{verbatim}
66 66
67 The subtypes of the ArcMarineBSH based datamodel are configured in the files below: 67 The subtypes of the ArcMarineBSH based datamodel are configured in the files below:
68 \begin{itemize} 68 \begin{itemize}
69 \item TimeSeriesPoints: conf\_timeseriespoint.xml 69 \item TimeSeriesPoints: {\tt conf\_timeseriespoint.xml}
70 \item Mesh: conf\_mesh.xml 70 \item Mesh: {\tt conf\_mesh.xml}
71 \item InstantaneousPoints: conf\_instantaneouspoint.xml 71 \item InstantaneousPoints: {\tt conf\_instantaneouspoint.xml}
72 \end{itemize} 72 \end{itemize}
73 73
74 Within each of these files, the steps for gathering the values for the 74 Within each of these files, the steps for gathering the values for the
75 parameterisation are configured by defining states, transitions and outputs 75 parameterisation are configured by defining states, transitions and outputs
76 (c.f. \ref{ref:config-a-product}). The definition of states, transitions and 76 (c.f. \ref{ref:config-a-product}). The definition of states, transitions and
77 outputs reference the actual SQL-statements via an identifier. The SQL-statements 77 outputs reference the actual SQL-statements via an identifier. The SQL-statements
78 are gathered in the file \verb+conf/queries.properties+. 78 are gathered in the file {\tt conf/queries.properties}.
79 79
80 80
81 \subsection{Explaining the background of the XML configuration} 81 \subsection{Explaining the background of the XML configuration}
82 82
83 It is possible to configure the GNV in many ways. 83 It is possible to configure the GNV in many ways.
86 a diagram or generate an CSV-export. 86 a diagram or generate an CSV-export.
87 87
88 The configuration of the provided FIS are divided in three main parts. 88 The configuration of the provided FIS are divided in three main parts.
89 89
90 \begin{itemize} 90 \begin{itemize}
91 \item Configuration of the list of FIS via artifact-factories 91 \item Configuration of the list of FIS via {\tt artifact-factories}
92 \item Configuration of main artifacts which will be instantiated if an 92 \item Configuration of main {\tt artifacts} which will be instantiated if an
93 artifact-factory was called. 93 {\tt artifact-factory} was called.
94 \item Configuration of the different artifacts which provides products which can be 94 \item Configuration of the different {\tt artifacts} which provides products which can be
95 served by the FIS. 95 served by the FIS.
96 \end{itemize} 96 \end{itemize}
97 97
98 \subsubsection{Configuration of a FIS} 98 \subsubsection{Configuration of a FIS}
99 The point of entry into the system is to configure an artifact-factory. 99 The point of entry into the system is to configure an {\tt artifact-factory}.
100 Each artifact-factory represents one FIS. 100 Each {\tt artifact-factory} represents one FIS.
101 It is possible to configure several artifact-factories. 101 It is possible to configure several {\tt artifact-factories}.
102 The artifact-factories will be configured in the section 102 The {\tt artifact-factories} will be configured in the section
103 /artifact-database/artifact-factories of the configurationfile. 103 {\tt /artifact-database/artifact-factories} of the configurationfile.
104 104
105 \begin{lstlisting} 105 \begin{lstlisting}
106 <artifact-factory name='fis_NEWFISNAME' 106 <artifact-factory name='fis_NEWFISNAME'
107 description='Factory to create an artifact to be used with the FIS NEWFISNAME' 107 description='Factory to create an artifact to be used with the FIS NEWFISNAME'
108 ttl='3600000' 108 ttl='3600000'
109 artifact='de.intevation.artifactdatabase.ProxyArtifact'> 109 artifact='de.intevation.artifactdatabase.ProxyArtifact'>
110 de.intevation.gnv.artifacts.GNVProductArtifactFactory 110 de.intevation.gnv.artifacts.GNVProductArtifactFactory
111 </artifact-factory> 111 </artifact-factory>
112 \end{lstlisting} 112 \end{lstlisting}
113 113
114 At this moment the following attributes of an artifact-factory are configurable. 114 At this moment the following attributes of an {\tt artifact-factory} are configurable.
115 \begin{itemize} 115 \begin{itemize}
116 \item name: The name of the artifact. Must be unique in one artifact-server 116 \item {\tt name}: The name of the {\tt artifact}. Must be unique in one {\tt artifact-server}
117 \item description: Short description which job the artifact-factory has to do. 117 \item {\tt description}: Short description which job the {\tt artifact-factory} has to do.
118 \item ttl: The time to live: The time using milliseconds an artifact, created using this 118 \item {\tt ttl}: The time to live: The time using milliseconds an {\tt artifact}, created using this
119 factory, can live without any user-interaction. 119 factory, can live without any user-interaction.
120 \item artifact: The name of the class of the artifact which should be created. 120 \item {\tt artifact}: The name of the class of the {\tt artifact} which should be created.
121 \end{itemize} 121 \end{itemize}
122 122
123 The next listing shows the dependencies between the FIS and the name 123 The next listing shows the dependencies between the FIS and the name
124 of the artifact-factory which belongs to it. 124 of the {\tt artifact-factory} which belongs to it.
125 125
126 \begin{itemize} 126 \begin{itemize}
127 \item Marnet: fis\_marnet 127 \item Marnet: {\tt fis\_marnet}
128 \item IMIS: fis\_imis 128 \item IMIS: {\tt fis\_imis}
129 \item STAUN: fis\_staun 129 \item STAUN: {\tt fis\_staun}
130 \item Modeldata fis\_modeldata 130 \item Modeldata {\tt fis\_modeldata}
131 \item Iceclimatology: fis\_eisklimatologie 131 \item Iceclimatology: {\tt fis\_eisklimatologie}
132 \item Ice Station Report: fis\_icestations 132 \item Ice Station Report: {\tt fis\_icestations}
133 \item SST: fis\_sst 133 \item SST: {\tt fis\_sst}
134 \item Delphin: fis\_delphin 134 \item Delphin: {\tt fis\_delphin}
135 \item Thermosalinograph: fis\_thermosalinograph 135 \item Thermosalinograph: {\tt fis\_thermosalinograph}
136 \item Chemusurvey: fis\_chemusurvey 136 \item Chemusurvey: {\tt fis\_chemusurvey}
137 \item GTS: fis\_gts 137 \item GTS: {\tt fis\_gts}
138 \item CTD: fis\_bsh\_ctd 138 \item CTD: {\tt fis\_bsh\_ctd}
139 \item XBT: fis\_bsh\_xbt 139 \item XBT: {\tt fis\_bsh\_xbt}
140 \item SeaCat: fis\_seacat 140 \item SeaCat: {\tt fis\_seacat}
141 \item Sea State: fis\_seastate 141 \item Sea State: {\tt fis\_seastate}
142 \item Current Meter: fis\_currentmeter 142 \item Current Meter: {\tt fis\_currentmeter}
143 \item Nauthis: fis\_nauthis 143 \item Nauthis: {\tt fis\_nauthis}
144 \item Contis: fis\_contis 144 \item Contis: {\tt fis\_contis}
145 \item Marine Features: fis\_marinefeatures 145 \item Marine Features: {\tt fis\_marinefeatures}
146 \end{itemize} 146 \end{itemize}
147 147
148 \subsubsection{Configuration of main Artifact} 148 \subsubsection{Configuration of main Artifact}
149 For each artifact-factory it is necessary to configure one artifact which will be 149 For each {\tt artifact-factory} it is necessary to configure one {\tt artifact} which will be
150 created using the factory. 150 created using the factory.
151 This artifact is the representation of the specific FIS. 151 This {\tt artifact} is the representation of the specific FIS.
152 It contains the configuration which products will be served for this FIS. 152 It contains the configuration which products will be served for this FIS.
153 153
154 The artifacts are configured in the section /artifact-database/artifacts of 154 The {\tt artifacts} are configured in the section {\tt /artifact-database/artifacts} of
155 the configurationfile. 155 the configurationfile.
156 156
157 \begin{lstlisting} 157 \begin{lstlisting}
158 <artifact name='fis_NEWFISNAME'> 158 <artifact name='fis_NEWFISNAME'>
159 <products> 159 <products>
160 ... 160 ...
161 </products> 161 </products>
162 </artifact> 162 </artifact>
163 \end{lstlisting} 163 \end{lstlisting}
164 164
165 The key is to use the same name for the artifact as used for the artifact-factory. 165 The key is to use the same name for the {\tt artifact} as used for the {\tt artifact-factory}.
166 The name has to be unique. 166 The name has to be unique.
167 In the section /artifact/products it is possible to define several products as 167 In the section {\tt /artifact/products} it is possible to define several products as
168 explained in the next section. 168 explained in the next section.
169 169
170 \paragraph{Products to an FIS} 170 \paragraph{Products to an FIS}
171 One FIS can provide several products. 171 One FIS can provide several products.
172 To do this it is required to configure them as shown below in the section 172 To do this it is required to configure them as shown below in the section
173 /artifact/products 173 {\tt /artifact/products}
174 174
175 \begin{lstlisting} 175 \begin{lstlisting}
176 <product name= "timeSeries"> 176 <product name= "timeSeries">
177 <artifact-factory name="timeSeries" 177 <artifact-factory name="timeSeries"
178 description="Artiefactfactory for Instantiating the Artifact for TimeSeries on TimeSeriesPoints" 178 description="Artiefactfactory for Instantiating the Artifact for TimeSeries on TimeSeriesPoints"
187 value="fis\_marnet"/> 187 value="fis\_marnet"/>
188 </parameters> 188 </parameters>
189 </product> 189 </product>
190 \end{lstlisting} 190 \end{lstlisting}
191 191
192 Each product is also represented by an artifact. To create this artifact we have to 192 Each {\tt product} is also represented by an {\tt artifact}. To create this {\tt artifact} we have to
193 use an artifact-factory which is configured in each product 193 use an {\tt artifact-factory} which is configured in each product
194 (/product/artifact-factory). 194 ({\tt /product/artifact-factory}).
195 195
196 Each product can have several parameters /product/parameters/parameters. 196 Each product can have several parameters ({\tt /product/parameters/parameters}).
197 The parameter named sourceid and fisname are required parameters. 197 The {\tt parameter} named {\tt sourceid} and {\tt fisname} are required parameters.
198 198
199 The parameter fisname contains the key to the name of the FIS. The key must be 199 The parameter {\tt fisname} contains the key to the name of the FIS. The key must be
200 unique. 200 unique.
201 The parameter sourceid contains the key to identify the FIS in the 201 The parameter {\tt sourceid} contains the key to identify the FIS in the
202 datawarehouse. (MEDIAN.SOURCEINFO) 202 datawarehouse. ({\tt MEDIAN.SOURCEINFO})
203 203
204 204
205 \subsubsection{Configuration of an Product} 205 \subsubsection{Configuration of an Product}
206 \label{ref:config-a-product} 206 \label{ref:config-a-product}
207 The products of the different FIS are also modeled as artifact-objects. 207 The {\tt products} of the different FIS are also modeled as artifact-objects.
208 The different products which are currently available are stored in separate 208 The different products which are currently available are stored in separate
209 files in the folder project. 209 files in the folder {\tt project}.
210 210
211 In those files the workflow of each product is configured. Each step which is 211 In those files the workflow of each product is configured. Each step which is
212 required to model a new diagram is represented using a state in the 212 required to model a new diagram is represented using a {\tt state} in the
213 configurationfile. 213 configurationfile.
214 214
215 To move between those states it is required to model transitions which define 215 To move between those {\tt states} it is required to model {\tt transitions} which define
216 between which states it is possible to move and which conditions must be 216 between which states it is possible to move and which conditions must be
217 fulfilled. 217 fulfilled.
218 218
219 The last step is called output-state. This state is responsible to generate the 219 The last step is called {\tt output-state}. This state is responsible to generate the
220 output for the different formats which can be served from the product (Diagram, 220 output for the different formats which can be served from the product ({\tt Diagram,
221 CSV, ODV, WMS,...). 221 CSV, ODV, WMS,..}.).
222 222
223 \paragraph{States} 223 \paragraph{States}
224 A state is one step which is required to fetch the data for generating e.g. an 224 A {\tt state} is one step which is required to fetch the data for generating e.g. an
225 diagram. 225 diagram.
226 226
227 For example in each product it is possible to choose one or more parameters. 227 For example in each product it is possible to choose one or more parameters.
228 228
229 To configure a state you have to use a XML-fragment as shown below: 229 To configure a state you have to use a XML-fragment as shown below:
237 ... 237 ...
238 </inputvalues> 238 </inputvalues>
239 </state> 239 </state>
240 \end{lstlisting} 240 \end{lstlisting}
241 241
242 At this moment the following attributes of an state are configurable. 242 At this moment the following attributes of an {\tt state} are configurable.
243 \begin{itemize} 243 \begin{itemize}
244 \item id: The name of the artifact. Must be unique in one artifact-server 244 \item {\tt id}: The name of the artifact. Must be unique in one artifact-server
245 \item description: Short description which job the artifact-factory has to do. 245 \item {\tt description}: Short description which job the artifact-factory has to do.
246 \item queryID: The id of the query which should be used to fetch the data 246 \item {\tt queryID}: The id of the query which should be used to fetch the data
247 displayed in this state. All queries are defined in the file 247 displayed in this state. All queries are defined in the file
248 conf/queries.properties 248 conf/queries.properties
249 \item dataname: The id of the data which will be displayed in this state. 249 \item {\tt dataname}: The id of the data which will be displayed in this state.
250 The id will be use to localize the description of the data. 250 The id will be use to localize the description of the data.
251 The localization is located in module gnv-artifacts in folder 251 The localization is located in module gnv-artifacts in folder
252 src/main/resources. 252 src/main/resources.
253 \item data-multiselect: true it is possible to select 1 or more items. 253 \item {\tt data-multiselect}: {\tt true} it is possible to select 1 or more items.
254 false it is possible to select only one item. 254 {\tt false} it is possible to select only one item.
255 \item inputvalues: The values which can be "feed" to this state and which 255 \item {\tt inputvalues}: The values which can be "feed" to this state and which
256 will be used as values in SQL-statements. 256 will be used as values in SQL-statements.
257 \end{itemize} 257 \end{itemize}
258 258
259 \paragraph{Input Values of a State} 259 \paragraph{Input Values of a State}
260 At section /state/inputvalues it is possible to add definitions for inputvalues. 260 At section {\tt /state/inputvalues} it is possible to add definitions for inputvalues.
261 Those values have two meanings for the state. 261 Those values have two meanings for the {\tt state}.
262 262
263 \begin{itemize} 263 \begin{itemize}
264 \item They were used to fill the SQL-statements to fetch the data. 264 \item They were used to fill the SQL-statements to fetch the data.
265 (Each entry replace one ore more "?" ) 265 (Each entry replace one ore more "?" )
266 \item They were used to validate the inputdata which is "feed" to 266 \item They were used to validate the inputdata which is "feed" to
280 <inputvalue name="parameterid" type="Integer" multiselect="true" usedinquery="0"/> 280 <inputvalue name="parameterid" type="Integer" multiselect="true" usedinquery="0"/>
281 </inputvalues> 281 </inputvalues>
282 \end{lstlisting} 282 \end{lstlisting}
283 283
284 \begin{itemize} 284 \begin{itemize}
285 \item name: Name of the value that could be feed or should be used in SQL-statment. 285 \item {\tt name}: Name of the value that could be feed or should be used in SQL-statment.
286 The name must fit to one dataname configured in this state or one other 286 The name must fit to one dataname configured in this state or one other
287 state which was visited before. 287 state which was visited before.
288 \item type: The type of the value. This is required for the validation 288 \item {\tt type}: The type of the value. This is required for the validation
289 of the value. 289 of the value.
290 This might be String, Integer, Double, Date, Point, LineString, 290 This might be String, Integer, Double, Date, Point, LineString,
291 Polygon, Coordinate, Geometry and AttributeName. 291 Polygon, Coordinate, Geometry and AttributeName.
292 Coordinate is a format which accepts geographical coordinates in 292 Coordinate is a format which accepts geographical coordinates in
293 the following Syntax: 56n30 6e20 293 the following Syntax: 56n30 6e20
294 AttributeName marks a stringvalue which will be used in 294 AttributeName marks a stringvalue which will be used in
295 SQL-statement without surrounding with "'" in the statement. 295 SQL-statement without surrounding with "'" in the statement.
296 Usage is e.g. for determining the Axis (i or j) in the workflow 296 Usage is e.g. for determining the Axis (i or j) in the workflow
297 of Horizontalprofiles. 297 of Horizontalprofiles.
298 \item multiselect: true if more than on value can be feed or put into the SQL-statement. 298 \item {\tt multiselect}: true if more than on value can be feed or put into the SQL-statement.
299 false if one on value will be accepted. 299 false if one on value will be accepted.
300 \item usedinquery: Number how often the value should be put into the SQL-statement: 300 \item {\tt usedinquery}: Number how often the value should be put into the SQL-statement:
301 0: Value will not out into the statement. 301 0: Value will not out into the statement.
302 1: Value will put once into the statement, 302 1: Value will put once into the statement,
303 2 or more: Value will be put as often as configured 303 2 or more: Value will be put as often as configured
304 into the SQL-statement (this is useful if 304 into the SQL-statement (this is useful if
305 inner-selects are used) 305 inner-selects are used)
330 ORDER BY P.GERMANNAME 330 ORDER BY P.GERMANNAME
331 \end{lstlisting} 331 \end{lstlisting}
332 332
333 If there are put the inputvalues in it it will look like this 333 If there are put the inputvalues in it it will look like this
334 if we assume that the inputvalues has got the following values 334 if we assume that the inputvalues has got the following values
335 which where feed by choosing this FIS (fisname) and the Station 335 which where feed by choosing this FIS ({\tt fisname}) and the Station
336 (featureid: Arkona Basin Buoy ): 336 ({\tt featureid}: Arkona Basin Buoy ):
337 \begin{itemize} 337 \begin{itemize}
338 \item featureid: 100011 (Marnet ==> Arkona Basin Buoy) 338 \item {\tt featureid}: 100011 (Marnet ==> Arkona Basin Buoy)
339 \item fisname: fis\_marnet 339 \item {\tt fisname}: fis\_marnet
340 \item parameterid: not set because it's the value that should be 340 \item {\tt parameterid}: not set because it's the value that should be
341 chosen in this state. 341 chosen in this state.
342 \end{itemize} 342 \end{itemize}
343 343
344 \begin{lstlisting} 344 \begin{lstlisting}
345 SELECT DISTINCT 345 SELECT DISTINCT
357 P.PARAMETERID = TS.PARAMETERID AND 357 P.PARAMETERID = TS.PARAMETERID AND
358 TSP.FEATUREID = 100011 358 TSP.FEATUREID = 100011
359 ORDER BY P.GERMANNAME 359 ORDER BY P.GERMANNAME
360 \end{lstlisting} 360 \end{lstlisting}
361 361
362 The value of featureid will be inserted into the query because 362 The value of {\tt featureid} will be inserted into the query because
363 the attribute usedinquery is set to "1". 363 the attribute {\tt usedinquery} is set to "1".
364 364
365 The values of the inputvalues fisname and parameterid will be 365 The values of the inputvalues {\tt fisname} and {\tt parameterid} will be
366 excluded because the attribute usedinquery is set to "0" 366 excluded because the attribute {\tt usedinquery} is set to "0"
367 367
368 368
369 If the attribute usedinquery of the inputvalue featureid is set to "2" 369 If the attribute {\tt usedinquery} of the inputvalue {\tt featureid} is set to "2"
370 this might happen. 370 this might happen.
371 371
372 \begin{lstlisting} 372 \begin{lstlisting}
373 <inputvalues> 373 <inputvalues>
374 <inputvalue name="featureid" type="Integer" multiselect="false" usedinquery="2"/> 374 <inputvalue name="featureid" type="Integer" multiselect="false" usedinquery="2"/>
408 <inputvalue name="measurementid" type="Integer" multiselect="true" usedinquery="0"/> 408 <inputvalue name="measurementid" type="Integer" multiselect="true" usedinquery="0"/>
409 </inputvalues> 409 </inputvalues>
410 \end{lstlisting} 410 \end{lstlisting}
411 411
412 \begin{itemize} 412 \begin{itemize}
413 \item featureid: 100011 (Marnet ==> Arkona Basin Buoy) 413 \item {\tt featureid}: 100011 (Marnet ==> Arkona Basin Buoy)
414 \item fisname: fis\_marnet 414 \item {\tt fisname}: fis\_marnet
415 \item parameterid: 2 (Salzgehalt [pSal]) 415 \item {\tt parameterid}: 2 (Salzgehalt [pSal])
416 \item measurementid: not set because it's the value that should be 416 \item {\tt measurementid}: not set because it's the value that should be
417 chosen in this state. 417 chosen in this state.
418 \end{itemize} 418 \end{itemize}
419 419
420 \begin{lstlisting} 420 \begin{lstlisting}
421 SELECT DISTINCT 421 SELECT DISTINCT
458 458
459 \paragraph{Transitions} 459 \paragraph{Transitions}
460 460
461 To move between two states it is necessary to configure dependencies between 461 To move between two states it is necessary to configure dependencies between
462 the different states. 462 the different states.
463 This dependencies are called transitions. 463 This dependencies are called {\tt transitions}.
464 464
465 There are different kinds of transitions which can be used. 465 There are different kinds of {\tt transitions} which can be used.
466 \begin{itemize} 466 \begin{itemize}
467 \item Transitions which only link two states 467 \item Transitions which only link two states
468 \item Transition which link two states with a additional condition. 468 \item Transition which link two states with a additional condition.
469 (e.g. If a region was selected in the Regionfilter or not ) 469 (e.g. If a region was selected in the Regionfilter or not )
470 \end{itemize} 470 \end{itemize}
477 <condition inputvalue="areaid" value="n/n" operator="equal"/> 477 <condition inputvalue="areaid" value="n/n" operator="equal"/>
478 </transition> 478 </transition>
479 \end{lstlisting} 479 \end{lstlisting}
480 480
481 \begin{itemize} 481 \begin{itemize}
482 \item from: The id of the state which you have to come from 482 \item {\tt from}: The {\tt id} of the {\tt state} which you have to come from
483 \item to: The id of the state which can be reached. 483 \item {\tt to}: The {\tt id} of the {\tt state} which can be reached.
484 \item condition: The condition which have to be fulfilled. 484 \item {\tt condition}: The condition which have to be fulfilled.
485 \end{itemize} 485 \end{itemize}
486 486
487 At this moment only EQUAL and NOTEQUAL are supported as condition for an 487 At this moment only {\tt EQUAL} and {\tt NOTEQUAL} are supported as
488 ValueCompareTransition. 488 {\tt condition} for an {\tt ValueCompare\-Transition}.
489 489
490 \paragraph{Outputstate} 490 \paragraph{Outputstate}
491 491
492 The outputstate is an special state which was created to define 492 The {\tt outputstate} is an special {\tt state} which was created to define
493 the different possibilities of outputs for each product. 493 the different possibilities of outputs for each product.
494 An outputstate is handled as an state which is described above. 494 An {\tt outputstate} is handled as an {\tt state} which is described above.
495 Additionally you are able to configure which kind of outputs should 495 Additionally you are able to configure which kind of outputs should
496 be provided. 496 be provided.
497 497
498 There are several outputstates. Each one is designed to create 498 There are several {\tt outputstates}. Each one is designed to create
499 the output for one special product. 499 the output for one special product.
500 500
501 \begin{itemize} 501 \begin{itemize}
502 \item TimeSeries: TimeSeriesOutputState 502 \item TimeSeries: {\tt TimeSeriesOutputState}
503 \item Horizontalprofile: HorizontalProfileOutputState 503 \item Horizontalprofile: {\tt HorizontalProfileOutputState}
504 \item Horizontalprofile on Meshes: HorizontalProfileMeshOutputState 504 \item Horizontalprofile on Meshes: {\tt HorizontalProfileMeshOutputState}
505 \item Verticalcrosssection:VerticalCrossSectionOutputState 505 \item Verticalcrosssection: {\tt VerticalCrossSectionOutputState}
506 \item Verticalprofiles: VerticalProfileOutputState 506 \item Verticalprofiles: {\tt VerticalProfileOutputState}
507 \item Horizontalcrosssections: HorizontalCrossSectionMeshOutputState 507 \item Horizontalcrosssections: {\tt HorizontalCrossSectionMeshOutputState}
508 \item Layer: LayerOutputState 508 \item Layer: {\tt LayerOutputState}
509 \end{itemize} 509 \end{itemize}
510 510
511 All these outputstates are implemented in package de.intevation.gnv.state 511 All these outputstates are implemented in {\tt package de.intevation.gnv.state}
512 and its subpackages. 512 and its {\tt sub\-packages}.
513 513
514 You have to put the fullqualified name of the outputstate to the attribute state 514 You have to put the fullqualified name of the {\tt outputstate} to the attribute
515 as shown below. 515 {\tt state} as shown below.
516 516
517 You can configure an outputstate as shown below: 517 You can configure an {\tt outputstate} as shown below:
518 518
519 \begin{lstlisting} 519 \begin{lstlisting}
520 <state id="timeseries_calculate_results" description="timeseries_interval" state="de.intevation.gnv.state.timeseries.TimeSeriesOutputState"> 520 <state id="timeseries_calculate_results" description="timeseries_interval" state="de.intevation.gnv.state.timeseries.TimeSeriesOutputState">
521 <queryID>timeseries_chart_data</queryID> 521 <queryID>timeseries_chart_data</queryID>
522 ... 522 ...
526 </outputsMode> 526 </outputsMode>
527 </outputsModes> 527 </outputsModes>
528 </state> 528 </state>
529 \end{lstlisting} 529 \end{lstlisting}
530 530
531 At section /state/outputsModes it is possible to add one ore more outputmodes 531 At section {\tt /state/outputsModes} it is possible to add one ore more
532 to one state as shown in the next paragraph. 532 {\tt outputmodes} to one state as shown in the next paragraph.
533 533
534 \paragraph{OutputModes} 534 \paragraph{OutputModes}
535 535
536 It is possible to configure several outputmodes in one outputstate. 536 It is possible to configure several {\tt outputmodes} in one {\tt outputstate}.
537 Inserting or deleting the configuration of an special 537 Inserting or deleting the configuration of an special
538 outputmode will cause that the pending item will be shown or hidden 538 {\tt outputmode} will cause that the pending item will be shown or hidden
539 in the GUI. 539 in the {\tt GUI}.
540 540
541 WARNING: IT MIGHT BE POSSIBLE THAT ONE OR MORE OUTPUTMODES ARE NOT 541 WARNING: IT MIGHT BE POSSIBLE THAT ONE OR MORE OUTPUTMODES ARE NOT
542 SUPPORTED BY AN PRODUCT. IN THAT CASE IT IS NECESSARY TO 542 SUPPORTED BY AN PRODUCT. IN THAT CASE IT IS NECESSARY TO
543 IMPLEMENT THE REQUIRED FUNCTIONALITY BEFORE IT IS POSSIBLE 543 IMPLEMENT THE REQUIRED FUNCTIONALITY BEFORE IT IS POSSIBLE
544 TO OFFER THIS OUTPUTMODE. 544 TO OFFER THIS OUTPUTMODE.
545 545
546 Currently the following outputmodes are supported: 546 Currently the following {\tt outputmodes} are supported:
547 547
548 \begin{itemize} 548 \begin{itemize}
549 \item chart 549 \item {\tt chart}
550 \item histogram 550 \item {\tt histogram}
551 \item csv 551 \item {\tt csv}
552 \item odv 552 \item {\tt odv}
553 \item statistics 553 \item {\tt statistics}
554 \item wms 554 \item {\tt wms}
555 \item shapefile 555 \item {\tt shapefile}
556 \end{itemize} 556 \end{itemize}
557 557
558 The following example shows how to configure an outputmode chart: 558 The following example shows how to configure an {\tt outputmode chart}:
559 559
560 \begin{lstlisting} 560 \begin{lstlisting}
561 <outputsMode name="chart" description="Chartrepresentation of the Values" mime-type="image/png"> 561 <outputsMode name="chart" description="Chartrepresentation of the Values" mime-type="image/png">
562 <parameters> 562 <parameters>
563 <inputvalue name="width" type="Integer" value="600"/> 563 <inputvalue name="width" type="Integer" value="600"/>
573 \end{lstlisting} 573 \end{lstlisting}
574 574
575 // TODO add simple OutputMode e.g. for CSV?? 575 // TODO add simple OutputMode e.g. for CSV??
576 576
577 \begin{itemize} 577 \begin{itemize}
578 \item name: The name of the mode. This must not be changed because it is used 578 \item {\tt name}: The name of the mode. This must not be changed because it
579 by the program. 579 is used by the program.
580 \item description: a short description of this outputmode. 580 \item {\tt description}: a short description of this outputmode.
581 \item parameters: one ore more parameters which will be shown in the GUI e.g. 581 \item {\tt parameters}: one ore more parameters which will be shown in the
582 for changing the size of an chart. 582 GUI e.g. for changing the size of an chart.
583 \item exportModes: one or more formats which can be served. 583 \item {\tt exportModes} : one or more formats which can be served.
584 \end{itemize} 584 \end{itemize}
585 585
586 586
587 \subsection{Adding a new FIS} 587 \subsection{Adding a new FIS}
588 In this section it will be explained which steps has to be done to integrate a 588 In this section it will be explained which steps has to be done to integrate a
589 new FIS into the artifact-server. This will be done using the configuration for 589 new FIS into the {\tt artifact-server}. This will be done using the configuration for
590 an FIS which use data from MEDIAN.TIMESERIES section of the datawarehouse e.g. 590 an FIS which use data from {\tt MEDIAN.TIMESERIES} section of the datawarehouse e.g.
591 MARNET or STAUN 591 MARNET or STAUN
592 592
593 Pay attention that for publishing the changes to the artifact-server you will 593 Pay attention that for publishing the changes to the {\tt artifact-server} you will
594 have to restart it. 594 have to restart it.
595 595
596 \subsubsection{Adding a new Artifact-factory} 596 \subsubsection{Adding a new Artifact-factory}
597 First step is to add a new artifact-factory to the configuration conf/conf.xml 597 First step is to add a new {\tt artifact-factory} to the configuration conf/conf.xml
598 To do this you have to add a new XML-fragment into the section 598 To do this you have to add a new XML-fragment into the section
599 /factories/artifact-factories which look like that: 599 /factories/artifact-factories which look like that:
600 600
601 \begin{lstlisting} 601 \begin{lstlisting}
602 <artifact-factory name='fis\_NEWFISNAME' 602 <artifact-factory name='fis\_NEWFISNAME'
605 artifact='de.intevation.artifactdatabase.ProxyArtifact'> 605 artifact='de.intevation.artifactdatabase.ProxyArtifact'>
606 de.intevation.gnv.artifacts.GNVProductArtifactFactory 606 de.intevation.gnv.artifacts.GNVProductArtifactFactory
607 </artifact-factory> 607 </artifact-factory>
608 \end{lstlisting} 608 \end{lstlisting}
609 609
610 In this XML-fragment you only have to replace the placeholder NEWFISNAME with a 610 In this XML-fragment you only have to replace the placeholder {\tt NEWFISNAME}
611 unique short name for the new FIS. 611 with a unique short name for the new FIS.
612 612
613 \paragraph{Example} 613 \paragraph{Example}
614 This example shows how to add an FIS and which effects it took to the 614 This example shows how to add an FIS and which effects it took to the
615 REST-Server. 615 REST-Server.
616 616
617 At first we add the following artifact-factory into the file conf/conf.xml 617 At first we add the following {\tt artifact-factory} into the file
618 in section /artifact-database/artifact-factories which add a new 618 {\tt conf/conf.xml} in section {\tt /artifact-database/artifact-factories}
619 FIS called justanewfis to the server: 619 which add a new FIS called {\tt justanewfis} to the server:
620 620
621 \begin{lstlisting} 621 \begin{lstlisting}
622 <artifact-factory name='fis\_justanewfis' 622 <artifact-factory name='fis\_justanewfis'
623 description='Factory to create an artifact to be used with the FIS NEWFISNAME' 623 description='Factory to create an artifact to be used with the FIS NEWFISNAME'
624 ttl='3600000' 624 ttl='3600000'
625 artifact='de.intevation.artifactdatabase.ProxyArtifact'> 625 artifact='de.intevation.artifactdatabase.ProxyArtifact'>
626 de.intevation.gnv.artifacts.GNVProductArtifactFactory 626 de.intevation.gnv.artifacts.GNVProductArtifactFactory
627 </artifact-factory> 627 </artifact-factory>
628 \end{lstlisting} 628 \end{lstlisting}
629 629
630 Then we restart the artifact-database executing the following command: 630 Then we restart the {\tt artifact-database} executing the following command:
631 631
632 \begin{lstlisting} 632 \begin{lstlisting}
633 /etc/init.d/artifactdb restart 633 /etc/init.d/artifactdb restart
634 \end{lstlisting} 634 \end{lstlisting}
635 635
638 638
639 \begin{lstlisting} 639 \begin{lstlisting}
640 curl http://localhost:8181/factories | xmllint --format - | grep fis\_justanewfis 640 curl http://localhost:8181/factories | xmllint --format - | grep fis\_justanewfis
641 \end{lstlisting} 641 \end{lstlisting}
642 642
643 If the FIS was added the new artifact-factory will be found in the generated 643 If the FIS was added the new {\tt artifact-factory} will be found in the generated
644 XML-output and it will be shown. 644 XML-output and it will be shown.
645 Otherwise no XML-output will be shown. 645 Otherwise no XML-output will be shown.
646 646
647 \subsubsection{Adding a new Artifact for Artifact-factory} 647 \subsubsection{Adding a new Artifact for Artifact-factory}
648 The next step is to define the artifact itself. 648 The next step is to define the artifact itself.
649 For this it is necessary to add an XML-fragment into the section /artifacts of 649 For this it is necessary to add an XML-fragment into the section
650 the main configurationfile /conf/conf.xml 650 {\tt /artifacts} of the main configurationfile {\tt /conf/conf.xml}.
651
651 \begin{lstlisting} 652 \begin{lstlisting}
652 <artifact name='fis\_NEWFISNAME'> 653 <artifact name='fis\_NEWFISNAME'>
653 <products> 654 <products>
654 ... 655 ...
655 </products> 656 </products>
656 </artifact> 657 </artifact>
657 \end{lstlisting} 658 \end{lstlisting}
658 659
659 In this XML-fragment it is also required to replace the placeholder NEWFISNAME 660 In this XML-fragment it is also required to replace the placeholder {\tt NEWFISNAME}
660 with the name which was used to configure the artifact-factory. 661 with the name which was used to configure the {\tt artifact-factory}.
661 662
662 Now the artifact-server can handle an additional FIS without any products yet. 663 Now the {\tt artifact-server} can handle an additional FIS without any products yet.
663 664
664 To prevent needless configuration-work it is useful way to clone an artifact 665 To prevent needless configuration-work it is useful way to clone an artifact
665 which handle the same kind of work as the new FIS. 666 which handle the same kind of work as the new FIS.
666 667
667 668
668 \paragraph{Example} 669 \paragraph{Example}
669 Now we will configure an artifact to the FIS justanewfis. 670 Now we will configure an artifact to the FIS justanewfis.
670 671
671 For this we have to add the following XML-fragment to the file conf/conf.xml 672 For this we have to add the following XML-fragment to the file
672 in section /artifact-database/artifacts: 673 {\tt conf/conf.xml} in section {\tt /artifact-database/artifacts}:
673 674
674 \begin{lstlisting} 675 \begin{lstlisting}
675 <artifact name='fis\_justanewfis'> 676 <artifact name='fis\_justanewfis'>
676 <products> 677 <products>
677 </products> 678 </products>
693 694
694 \subsubsection{Adding removing Products to the specific Artifact} 695 \subsubsection{Adding removing Products to the specific Artifact}
695 Now it is time to configure the different products which the FIS should be able 696 Now it is time to configure the different products which the FIS should be able
696 to provide. 697 to provide.
697 To do this it is necessary to copy the XML-fragments of the products into the 698 To do this it is necessary to copy the XML-fragments of the products into the
698 XML-element <products> of the previously integrated artifact. 699 XML-element {\tt products} of the previously integrated artifact.
699 \begin{lstlisting} 700 \begin{lstlisting}
700 <artifact name='fis\_NEWFISNAME'> 701 <artifact name='fis\_NEWFISNAME'>
701 <products> 702 <products>
702 <product name= "timeSeries"> 703 <product name= "timeSeries">
703 <artifact-factory name="timeSeries" 704 <artifact-factory name="timeSeries"
729 </product> 730 </product>
730 </products> 731 </products>
731 </artifact> 732 </artifact>
732 \end{lstlisting} 733 \end{lstlisting}
733 734
734 In this XML-fragment you have to replace the placeholders NEWFISNAME as before 735 In this XML-fragment you have to replace the placeholders {\tt NEWFISNAME}
735 and VALUEOFSOURCEID with the value for the new FIS as defined in the table 736 as before and {\tt VALUEOFSOURCEID} with the value for the new FIS as defined
736 MEDIAN.SOURCEINFO. 737 in the table {\tt MEDIAN.SOURCEINFO}.
737 738
738 \paragraph{Example} 739 \paragraph{Example}
739 Now we will add a product to the new FIS. 740 Now we will add a product to the new FIS.
740 To let the products work we will choose a product which 741 To let the products work we will choose a product which
741 will contain the sourceid of an existing FIS (e.g 4 Marnet). 742 will contain the sourceid of an existing FIS (e.g 4 Marnet).
767 If we call 768 If we call
768 \begin{lstlisting} 769 \begin{lstlisting}
769 curl -d "@sample-documents/create-artifact.xml" http://localhost:8181/create | xmllint --format - 770 curl -d "@sample-documents/create-artifact.xml" http://localhost:8181/create | xmllint --format -
770 \end{lstlisting} 771 \end{lstlisting}
771 772
772 the product timeSeries should be available for the FIS justanewfis. 773 the product {\tt timeSeries} should be available for the FIS {\tt justanewfis}.
773 774
774 Now we should be able to choose the product. 775 Now we should be able to choose the product.
775 This product should work and you should be able to generate even the defined 776 This product should work and you should be able to generate even the defined
776 outputformats. 777 outputformats.
777 778
778 \subsection{Adding a new Product} 779 \subsection{Adding a new Product}
779 To add a new product to the system it is necessary that the required 780 To add a new product to the system it is necessary that the required
780 artifact representation is implemented in the sourcecode. 781 artifact representation is implemented in the {\tt sourcecode}.
781 Without doing that step it is not possible to create a new product. 782 Without doing that step it is not possible to create a new product.
782 783
783 All products are configured in separate files that will be included into the 784 All products are configured in separate files that will be included into the
784 main configuration using Xlink-references. 785 main configuration using Xlink-references.
785 786
786 First step is to create a new file in the folder products and there in the 787 First step is to create a new file in the folder {\tt products} and there in the
787 sub-folder where the product belongs to (timeseries,verticalprofile, 788 sub-folder where the product belongs to ({\tt timeseries,verticalprofile,
788 horizontalprofile,horizontalcrosssection,layer,...) 789 horizontalprofile,horizontal\-crosssection,layer,...})
789 790
790 Then you have tor reference this file in the file /conf/conf.xml in the section 791 Then you have tor reference this file in the file {\tt /conf/conf.xml} in the
791 /artifacts using the following XML-fragment. 792 section {\tt/artifacts} using the following XML-fragment.
792 793
793 \begin{lstlisting} 794 \begin{lstlisting}
794 <artifact name="timeSeries" 795 <artifact name="timeSeries"
795 xmlns:xlink="http://www.w3.org/1999/xlink" 796 xmlns:xlink="http://www.w3.org/1999/xlink"
796 xlink:href="${artifacts.config.dir}/products/PATHTOFILE" /> 797 xlink:href="${artifacts.config.dir}/products/PATHTOFILE" />
797 \end{lstlisting} 798 \end{lstlisting}
798 799
799 The placeholder PATHTOFILE has to be replaced with the relative path and the 800 The placeholder {\tt PATHTOFILE} has to be replaced with the relative path and
800 name of the file starting in the folder products. 801 the name of the file starting in the folder products.
801 802
802 Then it is possible to add the product to a FIS as explained in the next section. 803 Then it is possible to add the product to a FIS as explained in the next section.
803 Please note that the defined name of the artifact-factory has to match to the 804 Please note that the defined name of the {\tt artifact-factory} has to match to the
804 name of the added products which is also designed as an artifact. 805 name of the added products which is also designed as an artifact.
805 806
806 \subsection{Adding a additional Product to a FIS} 807 \subsection{Adding a additional Product to a FIS}
807 To add a additional product to a FIS you only have to add the XML-fragment which 808 To add a additional product to a FIS you only have to add the XML-fragment which
808 represents the product to the artifact-configuration of the FIS in section 809 represents the product to the artifact-configuration of the FIS in section
809 /artifacts/artifact/products. 810 {\tt /artifacts/artifact/products}.
810 811
811 \begin{lstlisting} 812 \begin{lstlisting}
812 <product name= "timeSeries"> 813 <product name= "timeSeries">
813 <artifact-factory name="timeSeries" 814 <artifact-factory name="timeSeries"
814 description="Artifactfactory for instantiating the artifact for TimeSeries on TimeSeriesPoints" 815 description="Artifactfactory for instantiating the artifact for TimeSeries on TimeSeriesPoints"

http://dive4elements.wald.intevation.org