Mercurial > dive4elements > gnv-client
comparison doc/config-manual/model_of_transitions.tex @ 913:2d3c95787578
Added description for Configuration of InputValue of States
doc/trunk@1047 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Tue, 04 May 2010 09:43:31 +0000 |
parents | 3ca45a124985 |
children | 4c701fd2b3bb |
comparison
equal
deleted
inserted
replaced
912:3ca45a124985 | 913:2d3c95787578 |
---|---|
119 \item ttl: The Time to Live: The Time using Milliseconds an Artifact, created using this | 119 \item ttl: The Time to Live: The Time using Milliseconds an Artifact, created using this |
120 factory, can live without any Userinteraction. | 120 factory, can live without any Userinteraction. |
121 \item artifact: The Name of the Class of the Artifact which should be created. | 121 \item artifact: The Name of the Class of the Artifact which should be created. |
122 \end{itemize} | 122 \end{itemize} |
123 | 123 |
124 // TODO: List of Artifacts which currently used in this Configuration? | |
125 | |
126 The next listing shows the dependencies between the FIS and the Name | 124 The next listing shows the dependencies between the FIS and the Name |
127 of the Artifactfactory which belongs to it. | 125 of the Artifactfactory which belongs to it. |
128 | 126 |
129 \begin{itemize} | 127 \begin{itemize} |
130 \item Marnet: fis\_marnet | 128 \item Marnet: fis\_marnet |
235 <state id="timeseries_parameter" description="timeseries_parameter" state="de.intevation.gnv.state.DefaultState"> | 233 <state id="timeseries_parameter" description="timeseries_parameter" state="de.intevation.gnv.state.DefaultState"> |
236 <queryID>timeseries_parameter</queryID> | 234 <queryID>timeseries_parameter</queryID> |
237 <dataname>parameterid</dataname> | 235 <dataname>parameterid</dataname> |
238 <data-multiselect>true</data-multiselect> | 236 <data-multiselect>true</data-multiselect> |
239 <inputvalues> | 237 <inputvalues> |
240 <inputvalue name="featureid" type="Integer" multiselect="false"/> | 238 ... |
241 <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/> | |
242 <inputvalue name="parameterid" type="Integer" multiselect="true" usedinquery="0"/> | |
243 </inputvalues> | 239 </inputvalues> |
244 </state> | 240 </state> |
245 \end{lstlisting} | 241 \end{lstlisting} |
246 | 242 |
247 At this moment the following Attributes of an Artifact-Factory are configurabel. | 243 At this moment the following Attributes of an Artifact-Factory are configurabel. |
252 displayed in this state. //TODO: Reference to queries.properties | 248 displayed in this state. //TODO: Reference to queries.properties |
253 \item dataname: The ID of the Data which will be displaied in this State. | 249 \item dataname: The ID of the Data which will be displaied in this State. |
254 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. |
255 \item data-multiselect: true it is possible to select 1 or more Items. | 251 \item data-multiselect: true it is possible to select 1 or more Items. |
256 false ist is possible to select only one Item. | 252 false ist is possible to select only one Item. |
257 \item inputvalues: The Values which can be "feed" //TODO: How to explain this | 253 \item inputvalues: The Values which can be "feed" to this State and which |
258 to this State. | 254 will be used as Values in SQL-statements. |
259 \end{itemize} | 255 \end{itemize} |
256 | |
257 \paragraph{Input Values of a State} | |
258 At Section /state/inputvalues it is possible to add Definitions for InputValues. | |
259 Those values have two meanings for the State. | |
260 | |
261 \begin{itemize} | |
262 \item They were used to fill the SQL-Statements to fetch the Data | |
263 (Each entry replace one ore more "?" ) | |
264 \item They were used to validate the Inputdata which is "feed" to | |
265 the FIS in the current State | |
266 \end{itemize} | |
267 | |
268 WARNING: The Order of the InputValues is significant at which position the Value will | |
269 be put into the SQL-Statement. | |
270 | |
271 It is possible to add one InputValue twice or more often to put its value at | |
272 different positions of the SQl-Statement. | |
273 | |
274 \begin{lstlisting} | |
275 <inputvalues> | |
276 <inputvalue name="featureid" type="Integer" multiselect="false" usedinquery="1"/> | |
277 <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/> | |
278 <inputvalue name="parameterid" type="Integer" multiselect="true" usedinquery="0"/> | |
279 </inputvalues> | |
280 \end{lstlisting} | |
281 | |
282 \begin{itemize} | |
283 \item name: Name of the Value that could be feed or should be used in SQl-statment. | |
284 The name must fit to one dataname configured in this State or one other | |
285 State which was visited before. | |
286 \item type: The type of the Value. This is required for the Validation | |
287 of the Value. | |
288 This might be String, Integer, Double, Date, Point, LineString, | |
289 Polygon, Coordinate, Geometry and AttributeName. | |
290 \item multiselect: true if more than on Value can be feed or put into the SQl-statement. | |
291 false if one on Value will be accepted. | |
292 \item usedinquery: Number how often the value should be put into the SQL-Statement: | |
293 0: Value will not out into the Statement. | |
294 1: Value will put once into the Staement, | |
295 2 or more: Value will be put as often as configured | |
296 into the SQL-Statement (this is useful if | |
297 Inner-Selects are used) | |
298 \end{itemize} | |
299 | |
300 The next part will explain the usage of inputvalues. | |
301 | |
302 This SQL-statment is configured to use in the State above. | |
303 | |
304 \begin{lstlisting} | |
305 SELECT DISTINCT | |
306 p.PARAMETERID KEY, | |
307 p.GERMANNAME || ' ['|| p.UNIT ||']' VALUE, | |
308 p.GERMANNAME | |
309 FROM MEDIAN.PARAMETER P, | |
310 MEDIAN.TIMESERIES TS, | |
311 MEDIAN.TIMESERIESVALUE TSV, | |
312 MEDIAN.MEASUREMENT M, | |
313 MEDIAN.TIMESERIESPOINT TSP | |
314 WHERE M.FEATUREID = TSP.FEATUREID AND | |
315 M.MEASUREMENTID = TSV.MEASUREMENTID AND | |
316 TS.TIMESERIESID = TSV.TIMESERIESID AND | |
317 P.PARAMETERID = TS.PARAMETERID AND | |
318 TSP.FEATUREID = ? | |
319 ORDER BY P.GERMANNAME | |
320 \end{lstlisting} | |
321 | |
322 If there are put the Inputvalues in it it will look like this | |
323 if we assume that the inputvalues has got the following values: | |
324 \begin{itemize} | |
325 \item featureid: 4 (Marnet) | |
326 \item fisname: fis\_marnet | |
327 \item parameterid: not set because it's the value that should be | |
328 chosen in this state. | |
329 \end{itemize} | |
330 | |
331 \begin{lstlisting} | |
332 SELECT DISTINCT | |
333 p.PARAMETERID KEY, | |
334 p.GERMANNAME || ' ['|| p.UNIT ||']' VALUE, | |
335 p.GERMANNAME | |
336 FROM MEDIAN.PARAMETER P, | |
337 MEDIAN.TIMESERIES TS, | |
338 MEDIAN.TIMESERIESVALUE TSV, | |
339 MEDIAN.MEASUREMENT M, | |
340 MEDIAN.TIMESERIESPOINT TSP | |
341 WHERE M.FEATUREID = TSP.FEATUREID AND | |
342 M.MEASUREMENTID = TSV.MEASUREMENTID AND | |
343 TS.TIMESERIESID = TSV.TIMESERIESID AND | |
344 P.PARAMETERID = TS.PARAMETERID AND | |
345 TSP.FEATUREID = 4 | |
346 ORDER BY P.GERMANNAME | |
347 \end{lstlisting} | |
348 | |
349 The value of featureid will be inserted into the Query because | |
350 the Attribute usedinquery is set to "1". | |
351 | |
352 The values of the inputvalues fisname and parameterid will be | |
353 excluded because the Attribute usedinquery is set to "0" | |
354 | |
355 | |
356 If the Attribute usedinquery of the inputvalue featureid is set to "2" | |
357 this might happen. | |
358 | |
359 \begin{lstlisting} | |
360 <inputvalues> | |
361 <inputvalue name="featureid" type="Integer" multiselect="false" usedinquery="2"/> | |
362 <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/> | |
363 <inputvalue name="parameterid" type="Integer" multiselect="true" usedinquery="0"/> | |
364 </inputvalues> | |
365 \end{lstlisting} | |
366 | |
367 | |
368 \begin{lstlisting} | |
369 SELECT DISTINCT | |
370 ... | |
371 TSP.FEATUREID = ? AND | |
372 TSP.FEATUREID = ? | |
373 ORDER BY P.GERMANNAME | |
374 \end{lstlisting} | |
375 | |
376 This SQL-statement will be modified to | |
377 | |
378 \begin{lstlisting} | |
379 SELECT DISTINCT | |
380 ... | |
381 TSP.FEATUREID = 4 AND | |
382 TSP.FEATUREID = 4 | |
383 ORDER BY P.GERMANNAME | |
384 \end{lstlisting} | |
385 | |
386 | |
387 If the Attribute usedinquery of the inputvalue fisname additionally is set to "1" | |
388 this might happen. | |
389 | |
390 \begin{lstlisting} | |
391 <inputvalues> | |
392 <inputvalue name="featureid" type="Integer" multiselect="false" usedinquery="2"/> | |
393 <inputvalue name="fisname" type="String" multiselect="false" usedinquery="1"/> | |
394 <inputvalue name="parameterid" type="Integer" multiselect="true" usedinquery="0"/> | |
395 </inputvalues> | |
396 \end{lstlisting} | |
397 | |
398 | |
399 \begin{lstlisting} | |
400 SELECT DISTINCT | |
401 ... | |
402 TSP.FEATUREID = ? AND | |
403 TSP.FEATUREID = ? AND | |
404 NOCOLUMNINDB = ? | |
405 ORDER BY P.GERMANNAME | |
406 \end{lstlisting} | |
407 | |
408 This SQL-statement will be modified to | |
409 | |
410 \begin{lstlisting} | |
411 SELECT DISTINCT | |
412 ... | |
413 TSP.FEATUREID = 4 AND | |
414 TSP.FEATUREID = 4 AND | |
415 NOCOLUMNINDB = 'fis\_marnet' | |
416 ORDER BY P.GERMANNAME | |
417 \end{lstlisting} | |
260 | 418 |
261 | 419 |
262 \paragraph{Transitions} | 420 \paragraph{Transitions} |
263 | 421 |
264 To move between two States it is necessary to configure dependencies between | 422 To move between two States it is necessary to configure dependencies between |