Mercurial > dive4elements > gnv-client
comparison doc/config-manual/model_of_transitions.tex @ 940:14df4bcabc3c
Fixed some Mistakes
doc/trunk@1083 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Mon, 10 May 2010 10:43:01 +0000 |
parents | c2ce233cd9cf |
children | 7a8f9eb9fb04 |
comparison
equal
deleted
inserted
replaced
939:2fc4999cf922 | 940:14df4bcabc3c |
---|---|
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. |
84 It is possible to add or remove FIS, add or remove Products from a FIS or | 84 It is possible to add or remove FIS, add or remove products from a FIS or |
85 to manipulate the steps which must be gone until a product can be create | 85 to manipulate the steps which must be gone until a product can be create |
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 Artifactfactories | 91 \item Configuration of the list of FIS via artifact-factories |
92 \item Configuration of main Artifacts which will be instantiated if an | 92 \item Configuration of main artifacts which will be instantiated if an |
93 Artifactfactory was called. | 93 artifact-factory was called. |
94 \item Configuration of the different Artifacts which provides Products which can be | 94 \item Configuration of the different 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 Artifactfactory. | 99 The point of entry into the system is to configure an artifact-factory. |
100 Each Artifactfactory represents one FIS. | 100 Each artifact-factory represents one FIS. |
101 It is possible to configure several Artifactfactories. | 101 It is possible to configure several artifact-factories. |
102 The Artifactfactories will be configured in the Section | 102 The artifact-factories will be configured in the section |
103 /artifact-database/artifact-factories of the Configurationfile. | 103 /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 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 name: The name of the artifact. Must be unique in one artifact-server |
117 \item description: Short description which Job the Artifactfactory has to do. | 117 \item description: Short description which job the artifact-factory has to do. |
118 \item ttl: The Time to Live: The Time using Milliseconds an Artifact, created using this | 118 \item ttl: The time to live: The time using milliseconds an 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 artifact: The name of the class of the 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 Artifactfactory which belongs to it. | 124 of the artifact-factory which belongs to it. |
125 | 125 |
126 \begin{itemize} | 126 \begin{itemize} |
127 \item Marnet: fis\_marnet | 127 \item Marnet: fis\_marnet |
128 \item IMIS: fis\_imis | 128 \item IMIS: fis\_imis |
129 \item STAUN: fis\_staun | 129 \item STAUN: fis\_staun |
135 \item Thermosalinograph: fis\_thermosalinograph | 135 \item Thermosalinograph: fis\_thermosalinograph |
136 \item Chemusurvey: fis\_chemusurvey | 136 \item Chemusurvey: fis\_chemusurvey |
137 \item GTS: fis\_gts | 137 \item GTS: fis\_gts |
138 \item CTD: fis\_bsh\_ctd | 138 \item CTD: fis\_bsh\_ctd |
139 \item XBT: fis\_bsh\_xbt | 139 \item XBT: fis\_bsh\_xbt |
140 \item SeaCat: is\_seacat | 140 \item SeaCat: fis\_seacat |
141 \item Sea State: fis\_seastate | 141 \item Sea State: fis\_seastate |
142 \item Current Meter: fis\_currentmeter | 142 \item Current Meter: fis\_currentmeter |
143 \item Nauthis: fis\_nauthis | 143 \item Nauthis: fis\_nauthis |
144 \item Contis: fis\_contis | 144 \item Contis: fis\_contis |
145 \item Marine Features: fis\_marinefeatures | 145 \item Marine Features: 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 artifact-factory it is necessary to configure one 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 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 artifacts are configured in the section /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 Artifactfactory. | 165 The key is to use the same name for the artifact as used for the 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 /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 /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" |
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 product is also represented by an artifact. To create this artifact we have to |
193 use an Artifact-Factory which is configured in each product | 193 use an artifact-factory which is configured in each product |
194 (/product/artifact-factory). | 194 (/product/artifact-factory). |
195 | 195 |
196 Each Product can have several parameters /product/parameters/parameters. | 196 Each product can have several parameters /product/parameters/parameters. |
197 The Parameter named sourceid and fisname are required Parameters. | 197 The parameter named sourceid and 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 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 sourceid contains the key to identify the FIS in the |
202 DataWareHouse. (MEDIAN.SOURCEINFO) | 202 datawarehouse. (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 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 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 state in the |
213 Configuration-File. | 213 configurationfile. |
214 | 214 |
215 To move between those States it is required to model Transitions which define | 215 To move between those states it is required to model 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 OutputState. This State is responsible to generate the | 219 The last step is called 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 (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 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: |
230 | 230 |
231 \begin{lstlisting} | 231 \begin{lstlisting} |
232 <state id="timeseries_parameter" description="timeseries_parameter" state="de.intevation.gnv.state.DefaultState"> | 232 <state id="timeseries_parameter" description="timeseries_parameter" state="de.intevation.gnv.state.DefaultState"> |
233 <queryID>timeseries_parameter</queryID> | 233 <queryID>timeseries_parameter</queryID> |
234 <dataname>parameterid</dataname> | 234 <dataname>parameterid</dataname> |
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 Artifact-Factory are configurable. | 242 At this moment the following attributes of an 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 id: The name of the artifact. Must be unique in one artifact-server |
245 \item description: Short description which Job the Artifactfactory has to do. | 245 \item 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 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 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 data-multiselect: true it is possible to select 1 or more items. |
254 false it is possible to select only one Item. | 254 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 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 /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 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 |
267 the FIS in the current State | 267 the FIS in the current state. |
268 \end{itemize} | 268 \end{itemize} |
269 | 269 |
270 WARNING: The Order of the InputValues is significant at which position the Value will | 270 WARNING: The order of the inputvalues is significant at which position the value will |
271 be put into the SQL-Statement. | 271 be put into the SQL-statement. |
272 | 272 |
273 It is possible to add one InputValue twice or more often to put its value at | 273 It is possible to add one inputvalue twice or more often to put its value at |
274 different positions of the SQL-statement. | 274 different positions of the SQL-statement. |
275 | 275 |
276 \begin{lstlisting} | 276 \begin{lstlisting} |
277 <inputvalues> | 277 <inputvalues> |
278 <inputvalue name="featureid" type="Integer" multiselect="false" usedinquery="1"/> | 278 <inputvalue name="featureid" type="Integer" multiselect="false" usedinquery="1"/> |
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 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 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 Coodinates 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 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 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) |
306 \end{itemize} | 306 \end{itemize} |
307 | 307 |
308 The next part will explain the usage of inputvalues. | 308 The next part will explain the usage of inputvalues. |
309 | 309 |
310 This SQL-statement is configured to use in the State above, which will fetch | 310 This SQL-statement is configured to use in the state above, which will fetch |
311 all ParameterIDs with the according german name which are reffered to the given | 311 all parameter-ids with the according german name which are reffered to the given |
312 TimeSeriesPoint (e.g.Arkona Basin Buoy FeatureID = 100011 ) | 312 TimeSeriesPoint (e.g.Arkona Basin Buoy FeatureID = 100011 ) |
313 | 313 |
314 | 314 |
315 \begin{lstlisting} | 315 \begin{lstlisting} |
316 SELECT DISTINCT | 316 SELECT DISTINCT |
328 P.PARAMETERID = TS.PARAMETERID AND | 328 P.PARAMETERID = TS.PARAMETERID AND |
329 TSP.FEATUREID = ? | 329 TSP.FEATUREID = ? |
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 (fisname) and the Station |
336 (featureid: Arkona Basin Buoy ): | 336 (featureid: Arkona Basin Buoy ): |
337 \begin{itemize} | 337 \begin{itemize} |
338 \item featureid: 100011 (Marnet ==> Arkona Basin Buoy) | 338 \item featureid: 100011 (Marnet ==> Arkona Basin Buoy) |
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 featureid will be inserted into the query because |
363 the Attribute usedinquery is set to "1". | 363 the attribute usedinquery is set to "1". |
364 | 364 |
365 The values of the inputvalues fisname and parameterid will be | 365 The values of the inputvalues fisname and parameterid will be |
366 excluded because the Attribute usedinquery is set to "0" | 366 excluded because the attribute 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 usedinquery of the inputvalue 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"/> |
394 TSP.FEATUREID = 100011 | 394 TSP.FEATUREID = 100011 |
395 ORDER BY P.GERMANNAME | 395 ORDER BY P.GERMANNAME |
396 \end{lstlisting} | 396 \end{lstlisting} |
397 | 397 |
398 | 398 |
399 At the next Step of the Workflow it is nessesary to determine all depths where | 399 At the next step of the workflow it is nessesary to determine all depths where |
400 the choosen parameters are meaured. | 400 the choosen parameters are measured. |
401 To do this we might have the following InputValues: | 401 To do this we might have the following inputvalues: |
402 | 402 |
403 \begin{lstlisting} | 403 \begin{lstlisting} |
404 <inputvalues> | 404 <inputvalues> |
405 <inputvalue name="featureid" type="Integer" multiselect="false" usedinquery="2"/> | 405 <inputvalue name="featureid" type="Integer" multiselect="false" usedinquery="2"/> |
406 <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/> | 406 <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/> |
456 \end{lstlisting} | 456 \end{lstlisting} |
457 | 457 |
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 transitions. |
464 | 464 |
465 There are different Kind of Transitions which can be used. | 465 There are different kinds of 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} |
471 | 471 |
472 The listing below shows a Transition with an additional Condition. | 472 The listing below shows a transition with an additional condition. |
473 \begin{lstlisting} | 473 \begin{lstlisting} |
474 <transition transition="de.intevation.gnv.transition.ValueCompareTransition"> | 474 <transition transition="de.intevation.gnv.transition.ValueCompareTransition"> |
475 <from state="timeseries_area"/> | 475 <from state="timeseries_area"/> |
476 <to state="timeseries_without_geom"/> | 476 <to state="timeseries_without_geom"/> |
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 from: The id of the state which you have to come from |
483 \item to: The ID of the State which can be reached. | 483 \item to: The id of the state which can be reached. |
484 \item condition: The Condition which have to be fulfilled. | 484 \item 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 EQUAL and NOTEQUAL are supported as condition for an |
488 ValueCompareTransition. | 488 ValueCompareTransition. |
489 | 489 |
490 \paragraph{Outputstate} | 490 \paragraph{Outputstate} |
491 | 491 |
492 The OutputState is an special State which was created to define | 492 The outputstate is an special 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 outputstate is handled as an 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 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: TimeSeriesOutputState |
503 \item Horizontalprofile: HorizontalProfileOutputState | 503 \item Horizontalprofile: HorizontalProfileOutputState |
504 \item Horizontalprofile on Meshes: HorizontalProfileMeshOutputState | 504 \item Horizontalprofile on Meshes: HorizontalProfileMeshOutputState |
506 \item Verticalprofiles: VerticalProfileOutputState | 506 \item Verticalprofiles: VerticalProfileOutputState |
507 \item Horizontalcrosssections: HorizontalCrossSectionMeshOutputState | 507 \item Horizontalcrosssections: HorizontalCrossSectionMeshOutputState |
508 \item Layer: LayerOutputState | 508 \item Layer: 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 package de.intevation.gnv.state |
512 and its subpackages. | 512 and its subpackages. |
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 outputstate to the attribute state |
515 as shown below. | 515 as shown below. |
516 | 516 |
517 You can configure an OutputState as shown below: | 517 You can configure an 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 /state/outputsModes it is possible to add one ore more outputmodes |
532 to one State as shown in the next Paragraph. | 532 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 outputmodes in one 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 outputmode will cause that the pending item will be shown or hidden |
539 in the GUI. | 539 in the 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 outputmodes are supported: |
547 | 547 |
548 \begin{itemize} | 548 \begin{itemize} |
549 \item chart | 549 \item chart |
550 \item histogram | 550 \item histogram |
551 \item csv | 551 \item csv |
553 \item statistics | 553 \item statistics |
554 \item wms | 554 \item wms |
555 \item shapefile | 555 \item shapefile |
556 \end{itemize} | 556 \end{itemize} |
557 | 557 |
558 The following Example shows the Configuration for the OutputMode Chart. | 558 The following example shows how to configure an 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 name: The name of the mode. This must not be changed because it is used |
579 by the Program. | 579 by the program. |
580 \item description: a short description of this OutputMode. | 580 \item 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 parameters: one ore more parameters which will be shown in the GUI e.g. |
582 for changing the Size of an Chart. | 582 for changing the size of an chart. |
583 \item exportModes: one or more formats which can be served. | 583 \item 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 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 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 artifact-server you will |
594 have to restart it. | 594 have to restart it. |
595 | 595 |
596 \subsubsection{Adding a new Artifactfactory} | 596 \subsubsection{Adding a new Artifact-factory} |
597 First step is to add a new Artifactfactory to the Configuration conf/conf.xml | 597 First step is to add a new 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' |
603 description='Factory to create an artifact to be used with the FIS NEWFISNAME' | 603 description='Factory to create an artifact to be used with the 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 NEWFISNAME with a |
611 unique short Name for the new FIS. | 611 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 Artifactfactory into the file conf/conf.xml | 617 At first we add the following artifact-factory into the file conf/conf.xml |
618 in Section /artifact-database/artifact-factories which add a new | 618 in section /artifact-database/artifact-factories which add a new |
619 FIS called justanewfis to the Server: | 619 FIS called 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 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 Artifactfactory will be found in the generated | 643 If the FIS was added the new 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 Artifactfactory} | 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 /artifacts of |
650 the main Configuration-File /conf/conf.xml | 650 the main configurationfile /conf/conf.xml |
651 \begin{lstlisting} | 651 \begin{lstlisting} |
652 <artifact name='fis\_NEWFISNAME'> | 652 <artifact name='fis\_NEWFISNAME'> |
653 <products> | 653 <products> |
654 ... | 654 ... |
655 </products> | 655 </products> |
656 </artifact> | 656 </artifact> |
657 \end{lstlisting} | 657 \end{lstlisting} |
658 | 658 |
659 In this XML- Fragment it is also required to replace the placeholder NEWFISNAME | 659 In this XML-fragment it is also required to replace the placeholder NEWFISNAME |
660 with the name which was used to configure the Artifact-Factory. | 660 with the name which was used to configure the artifact-factory. |
661 | 661 |
662 Now the ArtifactServer can handle an additional FIS without any Products yet. | 662 Now the artifact-server can handle an additional FIS without any products yet. |
663 | 663 |
664 To prevent needless Configuration-Work it is useful way to clone an Artifact | 664 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. | 665 which handle the same kind of work as the new FIS. |
666 | 666 |
667 | 667 |
668 \paragraph{Example} | 668 \paragraph{Example} |
669 Now we will configure an Artifact to the FIS justanewfis. | 669 Now we will configure an artifact to the FIS justanewfis. |
670 | 670 |
671 For this we have to add the following XML-Fragment to the File conf/conf.xml | 671 For this we have to add the following XML-fragment to the file conf/conf.xml |
672 in Section /artifact-database/artifacts: | 672 in section /artifact-database/artifacts: |
673 | 673 |
674 \begin{lstlisting} | 674 \begin{lstlisting} |
675 <artifact name='fis\_justanewfis'> | 675 <artifact name='fis\_justanewfis'> |
676 <products> | 676 <products> |
677 </products> | 677 </products> |
678 </artifact> | 678 </artifact> |
679 \end{lstlisting} | 679 \end{lstlisting} |
680 | 680 |
681 Restart the Artifact-Database: | 681 Restart the artifact-database: |
682 | 682 |
683 \begin{lstlisting} | 683 \begin{lstlisting} |
684 /etc/init.d/artifactdb restart | 684 /etc/init.d/artifactdb restart |
685 \end{lstlisting} | 685 \end{lstlisting} |
686 | 686 |
687 Now we should be able to choose the Artifact. | 687 Now we should be able to choose the artifact. |
688 | 688 |
689 The Listbox with products will be empty. | 689 The Listbox with products will be empty. |
690 \begin{lstlisting} | 690 \begin{lstlisting} |
691 curl -d "@sample-documents/create-artifact.xml" http://localhost:8181/create | xmllint --format - | 691 curl -d "@sample-documents/create-artifact.xml" http://localhost:8181/create | xmllint --format - |
692 \end{lstlisting} | 692 \end{lstlisting} |
693 | 693 |
694 \subsubsection{Adding removing Products to the specific Artifact} | 694 \subsubsection{Adding removing Products to the specific Artifact} |
695 Now it is Time to configure the different Products which the FIS should be able | 695 Now it is time to configure the different products which the FIS should be able |
696 to provide. | 696 to provide. |
697 To do this it is necessary to Copy the XML-Fragments of the products into the | 697 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. | 698 XML-element <products> of the previously integrated artifact. |
699 \begin{lstlisting} | 699 \begin{lstlisting} |
700 <artifact name='fis\_NEWFISNAME'> | 700 <artifact name='fis\_NEWFISNAME'> |
701 <products> | 701 <products> |
702 <product name= "timeSeries"> | 702 <product name= "timeSeries"> |
703 <artifact-factory name="timeSeries" | 703 <artifact-factory name="timeSeries" |
704 description="Artiefactfactory for Instantiating the Artifact for TimeSeries on TimeSeriesPoints" | 704 description="Artifactfactory for instantiating the artifact for TimeSeries on TimeSeriesPoints" |
705 ttl="300000" | 705 ttl="300000" |
706 artifact="de.intevation.gnv.timeseries.TimeSeriesArtifact"> | 706 artifact="de.intevation.gnv.timeseries.TimeSeriesArtifact"> |
707 de.intevation.gnv.artifacts.GNVArtifactFactory | 707 de.intevation.gnv.artifacts.GNVArtifactFactory |
708 </artifact-factory> | 708 </artifact-factory> |
709 <parameters> | 709 <parameters> |
713 value="fis\_NEWFISNAME"/> | 713 value="fis\_NEWFISNAME"/> |
714 </parameters> | 714 </parameters> |
715 </product> | 715 </product> |
716 <product name= "verticalProfile"> | 716 <product name= "verticalProfile"> |
717 <artifact-factory name="verticalProfile" | 717 <artifact-factory name="verticalProfile" |
718 description="Artiefactfactory for Instantiating the Artifact for Verticalprofiles on TimeSeriesPoints" | 718 description="Artifactfactory for instantiating the artifact for Verticalprofiles on TimeSeriesPoints" |
719 ttl="300000" | 719 ttl="300000" |
720 artifact="de.intevation.gnv.profile.vertical.VerticalProfileArtifact"> | 720 artifact="de.intevation.gnv.profile.vertical.VerticalProfileArtifact"> |
721 de.intevation.gnv.artifacts.GNVArtifactFactory | 721 de.intevation.gnv.artifacts.GNVArtifactFactory |
722 </artifact-factory> | 722 </artifact-factory> |
723 <parameters> | 723 <parameters> |
729 </product> | 729 </product> |
730 </products> | 730 </products> |
731 </artifact> | 731 </artifact> |
732 \end{lstlisting} | 732 \end{lstlisting} |
733 | 733 |
734 In this XML-Fragment you have to replace the placeholders NEWFISNAME as before | 734 In this XML-fragment you have to replace the placeholders NEWFISNAME as before |
735 and VALUEOFSOURCEID with the value for the new FIS as defined in the Table | 735 and VALUEOFSOURCEID with the value for the new FIS as defined in the table |
736 MEDIAN.SOURCEINFO. | 736 MEDIAN.SOURCEINFO. |
737 | 737 |
738 \paragraph{Example} | 738 \paragraph{Example} |
739 Now we will add a Product to the new FIS. | 739 Now we will add a product to the new FIS. |
740 To let the Products work we will choose a Product which | 740 To let the products work we will choose a product which |
741 will contain the sourceid of an existing FIS (e.g 4 Marnet). | 741 will contain the sourceid of an existing FIS (e.g 4 Marnet). |
742 | 742 |
743 At first add the following XML-Fragment to the new Artifact. | 743 At first add the following XML-fragment to the new artifact. |
744 \begin{lstlisting} | 744 \begin{lstlisting} |
745 <product name= "timeSeries"> | 745 <product name= "timeSeries"> |
746 <artifact-factory name="timeSeries" | 746 <artifact-factory name="timeSeries" |
747 description="Artiefactfactory for Instantiating the Artifact for TimeSeries on TimeSeriesPoints" | 747 description="Artifactfactory for instantiating the artifact for TimeSeries on TimeSeriesPoints" |
748 ttl="300000" | 748 ttl="300000" |
749 artifact="de.intevation.gnv.timeseries.TimeSeriesArtifact"> | 749 artifact="de.intevation.gnv.timeseries.TimeSeriesArtifact"> |
750 de.intevation.gnv.artifacts.GNVArtifactFactory | 750 de.intevation.gnv.artifacts.GNVArtifactFactory |
751 </artifact-factory> | 751 </artifact-factory> |
752 <parameters> | 752 <parameters> |
756 value="fis\_justanewfis"/> | 756 value="fis\_justanewfis"/> |
757 </parameters> | 757 </parameters> |
758 </product> | 758 </product> |
759 \end{lstlisting} | 759 \end{lstlisting} |
760 | 760 |
761 Restart the Artifact-Database: | 761 Restart the artifact-database: |
762 | 762 |
763 \begin{lstlisting} | 763 \begin{lstlisting} |
764 /etc/init.d/artifactdb restart | 764 /etc/init.d/artifactdb restart |
765 \end{lstlisting} | 765 \end{lstlisting} |
766 | 766 |
767 If we call | 767 If we call |
768 \begin{lstlisting} | 768 \begin{lstlisting} |
769 curl -d "@sample-documents/create-artifact.xml" http://localhost:8181/create | xmllint --format - | 769 curl -d "@sample-documents/create-artifact.xml" http://localhost:8181/create | xmllint --format - |
770 \end{lstlisting} | 770 \end{lstlisting} |
771 | 771 |
772 The Product timeSeries should be available for the FIS justanewfis. | 772 the product timeSeries should be available for the FIS justanewfis. |
773 | 773 |
774 Now we should be able to choose the Product. | 774 Now we should be able to choose the product. |
775 This Product should work and you should be able to generate even the defined | 775 This product should work and you should be able to generate even the defined |
776 Outputformats. | 776 outputformats. |
777 | 777 |
778 \subsection{Adding a new Product} | 778 \subsection{Adding a new Product} |
779 To add a new Product to the System it is necessary that the required | 779 To add a new product to the system it is necessary that the required |
780 Artifact representation is Implemented in the SourceCode. | 780 artifact representation is implemented in the sourcecode. |
781 Without doing that step it is not possible to create a new Product. | 781 Without doing that step it is not possible to create a new product. |
782 | 782 |
783 All Products are configured in separate Files that will be included into the | 783 All products are configured in separate files that will be included into the |
784 main configuration using Xlink-References. | 784 main configuration using Xlink-references. |
785 | 785 |
786 First Step is to create a new File in the Folder products and there in the | 786 First step is to create a new file in the folder products and there in the |
787 sub-folder where the Product belongs to (timeseries,verticalprofile, | 787 sub-folder where the product belongs to (timeseries,verticalprofile, |
788 horizontalprofile,horizontalcrosssection,layer,...) | 788 horizontalprofile,horizontalcrosssection,layer,...) |
789 | 789 |
790 Then you have tor reference this File in the File /conf/conf.xml in the Section | 790 Then you have tor reference this file in the file /conf/conf.xml in the section |
791 /artifacts using the following XML-Fragment. | 791 /artifacts using the following XML-fragment. |
792 | 792 |
793 \begin{lstlisting} | 793 \begin{lstlisting} |
794 <artifact name="timeSeries" | 794 <artifact name="timeSeries" |
795 xmlns:xlink="http://www.w3.org/1999/xlink" | 795 xmlns:xlink="http://www.w3.org/1999/xlink" |
796 xlink:href="${artifacts.config.dir}/products/PATHTOFILE" /> | 796 xlink:href="${artifacts.config.dir}/products/PATHTOFILE" /> |
797 \end{lstlisting} | 797 \end{lstlisting} |
798 | 798 |
799 The placeholder PATHTOFILE has to be replaced with the relative Path and the | 799 The placeholder PATHTOFILE has to be replaced with the relative path and the |
800 Name of the File starting in the Folder products. | 800 name of the file starting in the folder products. |
801 | 801 |
802 Then it is possible to add the product to a FIS as explained in the next section. | 802 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 ArtifactFactory has to match to the | 803 Please note that the defined name of the artifact-factory has to match to the |
804 Name of the added Products which is also designed as an Artifact. | 804 name of the added products which is also designed as an artifact. |
805 | 805 |
806 \subsection{Adding a additional Product to a FIS} | 806 \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 | 807 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 | 808 represents the product to the artifact-configuration of the FIS in section |
809 /artifacts/artifact/products. | 809 /artifacts/artifact/products. |
810 | 810 |
811 \begin{lstlisting} | 811 \begin{lstlisting} |
812 <product name= "timeSeries"> | 812 <product name= "timeSeries"> |
813 <artifact-factory name="timeSeries" | 813 <artifact-factory name="timeSeries" |
814 description="Artiefactfactory for Instantiating the Artifact for TimeSeries on TimeSeriesPoints" | 814 description="Artifactfactory for instantiating the artifact for TimeSeries on TimeSeriesPoints" |
815 ttl="300000" | 815 ttl="300000" |
816 artifact="de.intevation.gnv.timeseries.TimeSeriesArtifact"> | 816 artifact="de.intevation.gnv.timeseries.TimeSeriesArtifact"> |
817 de.intevation.gnv.artifacts.GNVArtifactFactory | 817 de.intevation.gnv.artifacts.GNVArtifactFactory |
818 </artifact-factory> | 818 </artifact-factory> |
819 <parameters> | 819 <parameters> |