Mercurial > dive4elements > river
comparison flys-artifacts/doc/conf/meta-data.xml @ 3938:c0cab28ba1ea
merged flys-artifacts
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:15:03 +0200 |
parents | 608e127fc0f5 |
children | f68d6dcaea94 |
comparison
equal
deleted
inserted
replaced
3865:436eec3be6ff | 3938:c0cab28ba1ea |
---|---|
1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
2 <dc:template xmlns:dc="http://www.intevation.org/2011/Datacage"> | |
3 <datacage> | |
4 <dc:macro name="load-system"> | |
5 <dc:context connection="system"> | |
6 <dc:statement> | |
7 SELECT id AS river_id, name as river_name FROM rivers | |
8 WHERE lower(name) LIKE lower(${river}) | |
9 </dc:statement> | |
10 <dc:elements> | |
11 <dc:comment> | |
12 Base-data macros (mostly data imported from wst-files) | |
13 </dc:comment> | |
14 <dc:macro name="basedata_0"> | |
15 <dc:comment comment=" BASEDATA ---------------------------"/> | |
16 <basedata> | |
17 <dc:context> | |
18 <dc:statement> | |
19 SELECT id AS prot_id, | |
20 description AS prot_description | |
21 FROM wsts WHERE kind = 0 AND river_id = ${river_id} | |
22 </dc:statement> | |
23 <dc:elements> | |
24 <basedata> | |
25 <dc:attribute name="name" value="${prot_description}"/> | |
26 <dc:context> | |
27 <dc:statement> | |
28 SELECT id AS prot_column_id, | |
29 name AS prot_column_name, | |
30 position AS prot_rel_pos, | |
31 description AS info | |
32 FROM wst_columns WHERE wst_id = ${prot_id} | |
33 ORDER by position | |
34 </dc:statement> | |
35 <dc:elements> | |
36 <column> | |
37 <dc:attribute name="name" value="${prot_column_name}"/> | |
38 <dc:attribute name="ids" value="base_data-wstv-${prot_rel_pos}-${prot_id}"/> | |
39 <dc:attribute name="factory" value="staticwkms"/> | |
40 <dc:attribute name="info" value="${info}"/> | |
41 </column> | |
42 </dc:elements> | |
43 </dc:context> | |
44 </basedata> | |
45 </dc:elements> | |
46 </dc:context> | |
47 </basedata> | |
48 </dc:macro> | |
49 <dc:macro name="basedata_0_wq"> | |
50 <dc:comment comment=" BASEDATA ---------------------------"/> | |
51 <basedata> | |
52 <dc:context> | |
53 <dc:statement> | |
54 SELECT id AS prot_id, | |
55 description AS prot_description | |
56 FROM wsts WHERE kind = 0 AND river_id = ${river_id} | |
57 </dc:statement> | |
58 <dc:elements> | |
59 <basedata> | |
60 <dc:attribute name="name" value="${prot_description}"/> | |
61 <dc:context> | |
62 <dc:statement> | |
63 SELECT id AS prot_column_id, | |
64 name AS prot_column_name, | |
65 position AS prot_rel_pos, | |
66 description AS info | |
67 FROM wst_columns WHERE wst_id = ${prot_id} | |
68 ORDER by position | |
69 </dc:statement> | |
70 <dc:elements> | |
71 <column> | |
72 <dc:attribute name="name" value="${prot_column_name}"/> | |
73 <dc:attribute name="ids" value="base_data-wstv-${prot_rel_pos}-${prot_id}"/> | |
74 <dc:attribute name="factory" value="wqinterpol"/> | |
75 <dc:attribute name="info" value="${info}"/> | |
76 </column> | |
77 </dc:elements> | |
78 </dc:context> | |
79 </basedata> | |
80 </dc:elements> | |
81 </dc:context> | |
82 </basedata> | |
83 </dc:macro> | |
84 | |
85 <dc:macro name="basedata_1_additionals"> | |
86 <dc:comment comment=".ZUS -------------------------------"/> | |
87 <additionals> | |
88 <dc:context> | |
89 <dc:statement> | |
90 SELECT id AS prot_id, | |
91 description AS prot_description | |
92 FROM wsts WHERE kind = 1 AND river_id = ${river_id} | |
93 </dc:statement> | |
94 <dc:elements> | |
95 <additional> | |
96 <dc:attribute name="name" value="${prot_description}"/> | |
97 <dc:context> | |
98 <dc:statement> | |
99 SELECT id AS prot_column_id, | |
100 name AS prot_column_name, | |
101 position AS prot_rel_pos, | |
102 description AS info | |
103 FROM wst_columns WHERE wst_id = ${prot_id} | |
104 ORDER by position | |
105 </dc:statement> | |
106 <dc:elements> | |
107 <column> | |
108 <dc:attribute name="name" value="${prot_column_name}"/> | |
109 <dc:attribute name="ids" value="additionals-wstv-${prot_rel_pos}-${prot_id}"/> | |
110 <dc:attribute name="factory" value="staticwkms"/> | |
111 <dc:attribute name="info" value="${info}"/> | |
112 </column> | |
113 </dc:elements> | |
114 </dc:context> | |
115 </additional> | |
116 </dc:elements> | |
117 </dc:context> | |
118 </additionals> | |
119 </dc:macro> | |
120 | |
121 <dc:macro name="basedata_1_additionals-relative_point"> | |
122 <dc:comment comment=".ZUS -------------------------------"/> | |
123 <additionals> | |
124 <dc:context> | |
125 <dc:statement> | |
126 SELECT id AS prot_id, | |
127 description AS prot_description | |
128 FROM wsts WHERE kind = 1 AND river_id = ${river_id} | |
129 </dc:statement> | |
130 <dc:elements> | |
131 <relativepoint> | |
132 <dc:attribute name="name" value="${prot_description}"/> | |
133 <dc:context> | |
134 <dc:statement> | |
135 SELECT id AS prot_column_id, | |
136 name AS prot_column_name, | |
137 position AS prot_rel_pos, | |
138 description AS info | |
139 FROM wst_columns WHERE wst_id = ${prot_id} | |
140 ORDER by position | |
141 </dc:statement> | |
142 <dc:elements> | |
143 <column> | |
144 <dc:attribute name="name" value="${prot_column_name}"/> | |
145 <dc:attribute name="ids" value="additionals-wstv-${prot_rel_pos}-${prot_id}"/> | |
146 <dc:attribute name="factory" value="staticwkms"/> | |
147 <dc:attribute name="info" value="${info}"/> | |
148 </column> | |
149 </dc:elements> | |
150 </dc:context> | |
151 </relativepoint> | |
152 </dc:elements> | |
153 </dc:context> | |
154 </additionals> | |
155 </dc:macro> | |
156 | |
157 <dc:macro name="basedata_2_fixations_wst"> | |
158 <fixations> | |
159 <dc:context> | |
160 <dc:statement> | |
161 SELECT id AS prot_id, | |
162 description AS prot_description | |
163 FROM wsts WHERE kind = 2 AND river_id = ${river_id} | |
164 </dc:statement> | |
165 <dc:elements> | |
166 <fixation> | |
167 <dc:attribute name="name" value="${prot_description}"/> | |
168 <!--dc:attribute name="ids" value="fixations-wstv-A-${prot_id}"/--> | |
169 <dc:context> | |
170 <dc:statement> | |
171 SELECT id AS prot_column_id, | |
172 name AS prot_column_name, | |
173 position AS prot_rel_pos, | |
174 description AS info | |
175 FROM wst_columns WHERE wst_id = ${prot_id} | |
176 ORDER by position | |
177 </dc:statement> | |
178 <dc:elements> | |
179 <column> | |
180 <dc:attribute name="name" value="${prot_column_name}"/> | |
181 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/> | |
182 <dc:attribute name="factory" value="wqinterpol"/> | |
183 <dc:attribute name="info" value="${info}"/> | |
184 </column> | |
185 </dc:elements> | |
186 </dc:context> | |
187 </fixation> | |
188 </dc:elements> | |
189 </dc:context> | |
190 </fixations> | |
191 </dc:macro> | |
192 | |
193 <dc:macro name="basedata_2_fixations_wqkms"> | |
194 <fixations> | |
195 <dc:context> | |
196 <dc:statement> | |
197 SELECT id AS prot_id, | |
198 description AS prot_description | |
199 FROM wsts WHERE kind = 2 AND river_id = ${river_id} | |
200 </dc:statement> | |
201 <dc:elements> | |
202 <fixation> | |
203 <dc:attribute name="name" value="${prot_description}"/> | |
204 <dc:context> | |
205 <dc:statement> | |
206 SELECT id AS prot_column_id, | |
207 name AS prot_column_name, | |
208 position AS prot_rel_pos, | |
209 desciption AS info | |
210 FROM wst_columns WHERE wst_id = ${prot_id} | |
211 ORDER by position | |
212 </dc:statement> | |
213 <dc:elements> | |
214 <column> | |
215 <dc:attribute name="name" value="${prot_column_name}"/> | |
216 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/> | |
217 <dc:attribute name="factory" value="wqinterpol"/> | |
218 <dc:attribute name="info" value="${info}"/> | |
219 </column> | |
220 </dc:elements> | |
221 </dc:context> | |
222 </fixation> | |
223 </dc:elements> | |
224 </dc:context> | |
225 </fixations> | |
226 </dc:macro> | |
227 | |
228 <dc:macro name="basedata_2_fixations"> | |
229 <fixations> | |
230 <dc:context> | |
231 <dc:statement> | |
232 SELECT id AS prot_id, | |
233 description AS prot_description | |
234 FROM wsts WHERE kind = 2 AND river_id = ${river_id} | |
235 </dc:statement> | |
236 <dc:elements> | |
237 <fixation> | |
238 <dc:attribute name="name" value="${prot_description}"/> | |
239 <dc:context> | |
240 <dc:statement> | |
241 SELECT id AS prot_column_id, | |
242 name AS prot_column_name, | |
243 position AS prot_rel_pos, | |
244 description AS info | |
245 FROM wst_columns WHERE wst_id = ${prot_id} | |
246 ORDER by position | |
247 </dc:statement> | |
248 <dc:elements> | |
249 <column> | |
250 <dc:attribute name="name" value="${prot_column_name}"/> | |
251 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/> | |
252 <dc:attribute name="factory" value="staticwkms"/> | |
253 <dc:attribute name="info" value="${info}"/> | |
254 </column> | |
255 </dc:elements> | |
256 </dc:context> | |
257 </fixation> | |
258 </dc:elements> | |
259 </dc:context> | |
260 </fixations> | |
261 </dc:macro> | |
262 | |
263 <dc:macro name="basedata_2_fixations_relative_point"> | |
264 <fixations> | |
265 <dc:context> | |
266 <dc:statement> | |
267 SELECT id AS prot_id, | |
268 description AS prot_description | |
269 FROM wsts WHERE kind = 2 AND river_id = ${river_id} | |
270 </dc:statement> | |
271 <dc:elements> | |
272 <relativepoint> | |
273 <dc:attribute name="name" value="${prot_description}"/> | |
274 <dc:context> | |
275 <dc:statement> | |
276 SELECT id AS prot_column_id, | |
277 name AS prot_column_name, | |
278 position AS prot_rel_pos, | |
279 description AS info | |
280 FROM wst_columns WHERE wst_id = ${prot_id} | |
281 ORDER by position | |
282 </dc:statement> | |
283 <dc:elements> | |
284 <column> | |
285 <dc:attribute name="name" value="${prot_column_name}"/> | |
286 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/> | |
287 <dc:attribute name="factory" value="staticwkms"/> | |
288 <dc:attribute name="info" value="${info}"/> | |
289 </column> | |
290 </dc:elements> | |
291 </dc:context> | |
292 </relativepoint> | |
293 </dc:elements> | |
294 </dc:context> | |
295 </fixations> | |
296 </dc:macro> | |
297 | |
298 <dc:macro name="basedata_3_officials"> | |
299 <dc:comment comment=".wst -------------------------------"/> | |
300 <officiallines> | |
301 <dc:context> | |
302 <dc:statement> | |
303 SELECT id AS prot_id, | |
304 description AS prot_description | |
305 FROM wsts WHERE kind = 3 AND river_id = ${river_id} | |
306 </dc:statement> | |
307 <dc:elements> | |
308 <official> | |
309 <dc:attribute name="name" value="${prot_description}"/> | |
310 <dc:context> | |
311 <dc:statement> | |
312 SELECT id AS prot_column_id, | |
313 name AS prot_column_name, | |
314 position AS prot_rel_pos, | |
315 description AS info | |
316 FROM wst_columns WHERE wst_id = ${prot_id} | |
317 ORDER by position | |
318 </dc:statement> | |
319 <dc:elements> | |
320 <column> | |
321 <dc:attribute name="name" value="${prot_column_name}"/> | |
322 <dc:attribute name="ids" value="additionals-wstv-${prot_rel_pos}-${prot_id}"/> | |
323 <dc:attribute name="factory" value="staticwkms"/> | |
324 <dc:attribute name="info" value="${info}"/> | |
325 </column> | |
326 </dc:elements> | |
327 </dc:context> | |
328 </official> | |
329 </dc:elements> | |
330 </dc:context> | |
331 </officiallines> | |
332 </dc:macro> | |
333 | |
334 <dc:macro name="basedata_4_heightmarks-points-relative_points"> | |
335 <heightmarks> | |
336 <dc:context> | |
337 <dc:statement> | |
338 SELECT id AS prot_id, | |
339 description AS prot_description | |
340 FROM wsts WHERE kind = 4 AND river_id = ${river_id} | |
341 </dc:statement> | |
342 <dc:elements> | |
343 <relativepoint> | |
344 <dc:attribute name="name" value="${prot_description}"/> | |
345 <dc:context> | |
346 <dc:statement> | |
347 SELECT id AS prot_column_id, | |
348 name AS prot_column_name, | |
349 position AS prot_rel_pos, | |
350 description AS info | |
351 FROM wst_columns WHERE wst_id = ${prot_id} | |
352 ORDER by position | |
353 </dc:statement> | |
354 <dc:elements> | |
355 <column> | |
356 <dc:attribute name="name" value="${prot_column_name}"/> | |
357 <dc:attribute name="ids" value="heightmarks_points-wstv-${prot_rel_pos}-${prot_id}"/> | |
358 <dc:attribute name="factory" value="staticwkms"/> | |
359 <dc:attribute name="info" value="${info}"/> | |
360 </column> | |
361 </dc:elements> | |
362 </dc:context> | |
363 </relativepoint> | |
364 </dc:elements> | |
365 </dc:context> | |
366 </heightmarks> | |
367 </dc:macro> | |
368 | |
369 <dc:macro name="basedata_4_heightmarks-points"> | |
370 <heightmarks> | |
371 <dc:context> | |
372 <dc:statement> | |
373 SELECT id AS prot_id, | |
374 description AS prot_description | |
375 FROM wsts WHERE kind = 4 AND river_id = ${river_id} | |
376 </dc:statement> | |
377 <dc:elements> | |
378 <heightmark> | |
379 <dc:attribute name="name" value="${prot_description}"/> | |
380 <dc:context> | |
381 <dc:statement> | |
382 SELECT id AS prot_column_id, | |
383 name AS prot_column_name, | |
384 position AS prot_rel_pos, | |
385 description AS info | |
386 FROM wst_columns WHERE wst_id = ${prot_id} | |
387 ORDER by position | |
388 </dc:statement> | |
389 <dc:elements> | |
390 <column> | |
391 <dc:attribute name="name" value="${prot_column_name}"/> | |
392 <dc:attribute name="ids" value="heightmarks_points-wstv-${prot_rel_pos}-${prot_id}"/> | |
393 <dc:attribute name="factory" value="staticwkms"/> | |
394 <dc:attribute name="info" value="${info}"/> | |
395 </column> | |
396 </dc:elements> | |
397 </dc:context> | |
398 </heightmark> | |
399 </dc:elements> | |
400 </dc:context> | |
401 </heightmarks> | |
402 </dc:macro> | |
403 | |
404 <dc:macro name="basedata_4_heightmarks-wq"> | |
405 <heightmarks> | |
406 <dc:context> | |
407 <dc:statement> | |
408 SELECT id AS prot_id, | |
409 description AS prot_description | |
410 FROM wsts WHERE kind = 4 AND river_id = ${river_id} | |
411 </dc:statement> | |
412 <dc:elements> | |
413 <heightmark> | |
414 <dc:attribute name="name" value="${prot_description}"/> | |
415 <dc:context> | |
416 <dc:statement> | |
417 SELECT id AS prot_column_id, | |
418 name AS prot_column_name, | |
419 position AS prot_rel_pos, | |
420 description AS info | |
421 FROM wst_columns WHERE wst_id = ${prot_id} | |
422 ORDER by position | |
423 </dc:statement> | |
424 <dc:elements> | |
425 <column> | |
426 <dc:attribute name="name" value="${prot_column_name}"/> | |
427 <dc:attribute name="ids" value="heightmarks_annotations-wstv-${prot_rel_pos}-${prot_id}"/> | |
428 <dc:attribute name="factory" value="wqinterpol"/> | |
429 <dc:attribute name="info" value="${info}"/> | |
430 </column> | |
431 </dc:elements> | |
432 </dc:context> | |
433 </heightmark> | |
434 </dc:elements> | |
435 </dc:context> | |
436 </heightmarks> | |
437 </dc:macro> | |
438 | |
439 <dc:macro name="basedata_5_flood-protections_relative_points"> | |
440 <flood_protections> | |
441 <dc:attribute name="id" value="flood-protections-${river_id}"/> | |
442 <dc:context> | |
443 <dc:statement> | |
444 SELECT id AS prot_id, | |
445 description AS prot_description | |
446 FROM wsts WHERE kind = 5 AND river_id = ${river_id} | |
447 </dc:statement> | |
448 <dc:elements> | |
449 <relativepoint> | |
450 <dc:attribute name="name" value="${prot_description}"/> | |
451 <dc:attribute name="db-id" value="${prot_id}"/> | |
452 <dc:attribute name="factory" value="staticwkms"/> | |
453 <columns> | |
454 <dc:context> | |
455 <dc:statement> | |
456 SELECT id AS prot_column_id, | |
457 name AS prot_column_name, | |
458 position AS prot_rel_pos, | |
459 description AS info | |
460 FROM wst_columns WHERE wst_id = ${prot_id} | |
461 ORDER by position | |
462 </dc:statement> | |
463 <dc:elements> | |
464 <column> | |
465 <dc:attribute name="name" value="${prot_column_name}"/> | |
466 <dc:attribute name="ids" value="flood_protection-wstv-${prot_rel_pos}-${prot_id}"/> | |
467 <dc:attribute name="factory" value="staticwkms"/> | |
468 <dc:attribute name="info" value="${info}"/> | |
469 </column> | |
470 </dc:elements> | |
471 </dc:context> | |
472 </columns> | |
473 </relativepoint> | |
474 </dc:elements> | |
475 </dc:context> | |
476 </flood_protections> | |
477 </dc:macro> | |
478 | |
479 <dc:macro name="basedata_5_flood-protections"> | |
480 <flood_protections> | |
481 <dc:attribute name="id" value="flood-protections-${river_id}"/> | |
482 <dc:context> | |
483 <dc:statement> | |
484 SELECT id AS prot_id, | |
485 description AS prot_description | |
486 FROM wsts WHERE kind = 5 AND river_id = ${river_id} | |
487 </dc:statement> | |
488 <dc:elements> | |
489 <flood_protection> | |
490 <dc:attribute name="name" value="${prot_description}"/> | |
491 <dc:attribute name="db-id" value="${prot_id}"/> | |
492 <dc:attribute name="factory" value="staticwkms"/> | |
493 <columns> | |
494 <dc:context> | |
495 <dc:statement> | |
496 SELECT id AS prot_column_id, | |
497 name AS prot_column_name, | |
498 position AS prot_rel_pos | |
499 FROM wst_columns WHERE wst_id = ${prot_id} | |
500 ORDER by position | |
501 </dc:statement> | |
502 <dc:elements> | |
503 <column> | |
504 <dc:attribute name="name" value="${prot_column_name}"/> | |
505 <dc:attribute name="ids" value="flood_protection-wstv-${prot_rel_pos}-${prot_id}"/> | |
506 <dc:attribute name="factory" value="staticwkms"/> | |
507 </column> | |
508 </dc:elements> | |
509 </dc:context> | |
510 </columns> | |
511 </flood_protection> | |
512 </dc:elements> | |
513 </dc:context> | |
514 </flood_protections> | |
515 </dc:macro> | |
516 | |
517 <dc:macro name="mainvalues"> | |
518 <mainvalue> | |
519 <dc:attribute name="factory" value="mainvalue"/> | |
520 <dc:attribute name="ids" value="${river_id}"/> | |
521 </mainvalue> | |
522 </dc:macro> | |
523 | |
524 <dc:macro name="qsectors"> | |
525 <qsector> | |
526 <dc:attribute name="factory" value="qsectors"/> | |
527 <dc:attribute name="ids" value="${river_id}"/> | |
528 </qsector> | |
529 </dc:macro> | |
530 | |
531 <dc:macro name="annotations"> | |
532 <annotation> | |
533 <dc:attribute name="factory" value="annotations"/> | |
534 <dc:attribute name="ids" value="${river_id}"/> | |
535 </annotation> | |
536 </dc:macro> | |
537 | |
538 <dc:macro name="cross_sections"> | |
539 <cross_sections> | |
540 <dc:attribute name="id" value="flood-protections-${river_id}"/> | |
541 <dc:context> | |
542 <dc:statement> | |
543 SELECT id AS prot_id, | |
544 description AS prot_description | |
545 FROM cross_sections WHERE river_id = ${river_id} | |
546 </dc:statement> | |
547 <dc:elements> | |
548 <cross_section> | |
549 <dc:attribute name="name" value="${prot_description}"/> | |
550 <dc:attribute name="ids" value="${prot_id}"/> | |
551 <dc:attribute name="factory" value="crosssections"/> | |
552 </cross_section> | |
553 </dc:elements> | |
554 </dc:context> | |
555 </cross_sections> | |
556 </dc:macro> | |
557 | |
558 <dc:macro name="hyks"> | |
559 <hyks> | |
560 <dc:attribute name="id" value="hyk-${river_id}"/> | |
561 <dc:context> | |
562 <dc:statement> | |
563 SELECT id AS hyk_id, | |
564 description AS hyk_description | |
565 FROM hyks WHERE river_id = ${river_id} | |
566 </dc:statement> | |
567 <dc:elements> | |
568 <hyk> | |
569 <dc:attribute name="name" value="${hyk_description}"/> | |
570 <dc:attribute name="ids" value="${hyk_id}"/> | |
571 <dc:attribute name="factory" value="hyk"/> | |
572 </hyk> | |
573 </dc:elements> | |
574 </dc:context> | |
575 </hyks> | |
576 </dc:macro> | |
577 | |
578 <dc:comment> | |
579 | |
580 + River-Node | |
581 | |
582 </dc:comment> | |
583 | |
584 <river> | |
585 <dc:attribute name="name" value="${river_name}"/> | |
586 | |
587 <dc:choose> | |
588 <dc:when test="dc:contains($parameters, 'recommended')"> | |
589 <dc:comment> | |
590 Recommendations (client shall load immediately). | |
591 </dc:comment> | |
592 <dc:if test="dc:contains($artifact-outs, 'w_differences') or (dc:contains($artifact-outs, 'discharge_longitudinal_section'))"> | |
593 <dc:call-macro name="annotations"/> | |
594 </dc:if> | |
595 <dc:if test="dc:contains($artifact-outs, 'cross_section')"> | |
596 <dc:call-macro name="cross_sections"/> | |
597 <dc:call-macro name="hyks"/> | |
598 </dc:if> | |
599 <dc:if test="dc:contains($artifact-outs, 'reference_curve')"> | |
600 <dc:call-macro name="annotations"/> | |
601 <dc:call-macro name="mainvalues"/> | |
602 </dc:if> | |
603 <dc:if test="dc:contains($artifact-outs, 'fix_wq_curve')"> | |
604 <dc:call-macro name="qsectors"/> | |
605 </dc:if> | |
606 <dc:if test="dc:contains($artifact-outs, 'fix_longitudinal_section_curve')"> | |
607 <dc:call-macro name="annotations"/> | |
608 </dc:if> | |
609 <dc:if test="dc:contains($artifact-outs, 'bed_difference_epoch')"> | |
610 <dc:call-macro name="annotations"/> | |
611 </dc:if> | |
612 <dc:if test="dc:contains($artifact-outs, 'bed_difference_year')"> | |
613 <dc:call-macro name="annotations"/> | |
614 </dc:if> | |
615 <dc:if test="dc:contains($artifact-outs, 'bed_difference_height_year')"> | |
616 <dc:call-macro name="annotations"/> | |
617 </dc:if> | |
618 </dc:when> | |
619 <dc:otherwise> | |
620 <dc:comment> | |
621 Non - Recommendations. | |
622 </dc:comment> | |
623 <dc:if test="dc:contains($artifact-outs, 'cross_section')"> | |
624 <dc:call-macro name="basedata_0"/> | |
625 <dc:call-macro name="basedata_1_additionals"/> | |
626 <dc:call-macro name="basedata_2_fixations"/> | |
627 <dc:call-macro name="basedata_3_officials"/> | |
628 <dc:call-macro name="basedata_4_heightmarks-points"/> | |
629 <dc:call-macro name="cross_sections"/> | |
630 <dc:call-macro name="hyks"/> | |
631 </dc:if> | |
632 <dc:if test="dc:contains($artifact-outs, 'discharge_longitudinal_section')"> | |
633 <dc:call-macro name="basedata_0"/> | |
634 <dc:call-macro name="basedata_1_additionals"/> | |
635 <dc:call-macro name="basedata_2_fixations"/> | |
636 <dc:call-macro name="basedata_3_officials"/> | |
637 <dc:call-macro name="basedata_4_heightmarks-points"/> | |
638 <dc:call-macro name="basedata_5_flood-protections"/> | |
639 </dc:if> | |
640 <!--dc:if test="dc:contains($artifact-outs, 'computed_discharge_curve')"> | |
641 <dc:call-macro name="basedata_0_wq"/> | |
642 <dc:call-macro name="basedata_4_heightmarks-wq"/> | |
643 </dc:if--> | |
644 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section') or (dc:contains($artifact-outs, 'w_differences'))"> | |
645 <dc:call-macro name="basedata_0"/> | |
646 <dc:call-macro name="basedata_1_additionals"/> | |
647 <dc:comment comment=" FIXATIONS ---------------------------"/> | |
648 <dc:call-macro name="basedata_2_fixations"/> | |
649 <dc:comment comment=" HOEHENMARKEN ---------------------------"/> | |
650 <dc:call-macro name="basedata_4_heightmarks-points"/> | |
651 <dc:comment comment=" AMTL LINIEN ---------------------------"/> | |
652 <dc:call-macro name="basedata_3_officials"/> | |
653 </dc:if> | |
654 <dc:if test="dc:contains($artifact-outs, 'reference_curve')"> | |
655 <dc:call-macro name="annotations"/> | |
656 <!--dc:call-macro name="basedata_0"/--> | |
657 <dc:call-macro name="basedata_1_additionals-relative_point"/> | |
658 <dc:comment comment=" FIXATIONS ---------------------------"/> | |
659 <dc:call-macro name="basedata_2_fixations_relative_point"/> | |
660 <dc:comment comment=" HOEHENMARKEN ---------------------------"/> | |
661 <dc:call-macro name="basedata_4_heightmarks-points-relative_points"/> | |
662 <dc:call-macro name="basedata_5_flood-protections_relative_points"/> | |
663 </dc:if> | |
664 <dc:if test="dc:contains($artifact-outs, 'fix_wq_curve')"> | |
665 <dc:call-macro name="basedata_0_wq"/> | |
666 <dc:call-macro name="basedata_1_additionals"/> | |
667 <dc:call-macro name="basedata_2_fixations"/> | |
668 <dc:call-macro name="basedata_3_officials"/> | |
669 <dc:call-macro name="basedata_4_heightmarks-points"/> | |
670 <dc:call-macro name="basedata_5_flood-protections_relative_points"/> | |
671 </dc:if> | |
672 <dc:if test="dc:contains($artifact-outs, 'fix_deltawt_curve')"> | |
673 </dc:if> | |
674 <dc:if test="dc:contains($artifact-outs, 'fix_longitudinal_section_curve')"> | |
675 <dc:call-macro name="annotations"/> | |
676 </dc:if> | |
677 <dc:comment comment="--- non-recommendations---"/> | |
678 </dc:otherwise> | |
679 </dc:choose> | |
680 | |
681 | |
682 <dc:if test="dc:contains($artifact-outs, 'waterlevels')"> | |
683 | |
684 <!-- base data --> | |
685 <dc:call-macro name="basedata_0"/> | |
686 | |
687 <!-- extra-longitudinal-sections --> | |
688 <dc:call-macro name="basedata_1_additionals"/> | |
689 | |
690 <!-- fixations --> | |
691 <dc:call-macro name="basedata_2_fixations"/> | |
692 | |
693 <!-- flood water marks--> | |
694 <dc:call-macro name="basedata_4_heightmarks-points"/> | |
695 | |
696 <!-- flood protection --> | |
697 <dc:call-macro name="basedata_5_flood-protections"/> | |
698 | |
699 </dc:if> | |
700 <dc:if test="dc:contains($artifact-outs, 'computed_discharge_curve') and (dc:contains($parameters, 'recommended'))"> | |
701 <!--dc:call-macro name="basedata_2_fixations_wst"/--> | |
702 </dc:if> | |
703 | |
704 <dc:if test="dc:contains($artifact-outs, 'computed_discharge_curve') and not (dc:contains($parameters, 'recommended'))"> | |
705 <discharge_table_nn> | |
706 <discharge_table_gauge> | |
707 <dc:context> | |
708 <dc:statement> | |
709 SELECT id AS gauge_id, | |
710 name AS gauge_name | |
711 FROM gauges WHERE river_id = ${river_id} | |
712 </dc:statement> | |
713 <dc:elements> | |
714 <gauge> | |
715 <dc:attribute name="name" value="${gauge_name}"/> | |
716 <dc:attribute name="db-id" value="${gauge_id}"/> | |
717 <dc:attribute name="factory" value="gaugedischarge"/> | |
718 <dc:attribute name="from" value="${g_start}"/> | |
719 <dc:attribute name="to" value="${g_stop}"/> | |
720 <dc:attribute name="ids" value="${gauge_name}"/> | |
721 </gauge> | |
722 <!-- | |
723 <gauge> | |
724 <dc:attribute name="name" value="${gauge_name}"/> | |
725 <dc:attribute name="db-id" value="${gauge_id}"/> | |
726 <dc:context> | |
727 <dc:statement> | |
728 SELECT description AS gauge_desc, | |
729 d.id AS discharge_id, | |
730 ti.start_time AS g_start, | |
731 ti.stop_time AS g_stop | |
732 FROM discharge_tables d JOIN time_intervals ti | |
733 ON d.time_interval_id = ti.id | |
734 WHERE d.gauge_id = ${gauge_id} AND d.kind = 1 | |
735 </dc:statement> | |
736 <dc:elements> | |
737 <historical> | |
738 <dc:attribute name="name" value="${gauge_desc}"/> | |
739 <dc:attribute name="factory" value="gaugedischarge"/> | |
740 <dc:attribute name="from" value="${g_start}"/> | |
741 <dc:attribute name="to" value="${g_stop}"/> | |
742 <dc:attribute name="ids" value="${discharge_id}-${g_start}-${g_stop}"/> | |
743 </historical> | |
744 </dc:elements> | |
745 </dc:context> | |
746 </gauge> | |
747 --> | |
748 </dc:elements> | |
749 </dc:context> | |
750 </discharge_table_gauge> | |
751 | |
752 </discharge_table_nn> | |
753 | |
754 <dc:call-macro name="basedata_2_fixations_wst"/> | |
755 | |
756 <dc:call-macro name="basedata_5_flood-protections"/> | |
757 | |
758 <!-- former waterlevels --> | |
759 <dc:call-macro name="basedata_0"/> | |
760 | |
761 <dc:call-macro name="basedata_1_additionals"/> | |
762 | |
763 <!-- former flood-water-marks --> | |
764 <dc:call-macro name="basedata_4_heightmarks-points"/> | |
765 <computed_discharge_curve> | |
766 <dc:call-macro name="mainvalues"/> | |
767 </computed_discharge_curve> | |
768 </dc:if> | |
769 | |
770 <dc:if test="dc:contains($artifact-outs, 'duration_curve')"> | |
771 <dc:choose> | |
772 <dc:when test="dc:contains($parameters, 'recommended')"> | |
773 <dc:call-macro name="mainvalues"/> | |
774 </dc:when> | |
775 <dc:otherwise> | |
776 <dc:call-macro name="mainvalues"/> | |
777 <dc:call-macro name="basedata_2_fixations_relative_point"/> | |
778 <dc:call-macro name="basedata_4_heightmarks-points-relative_points"/> | |
779 <dc:call-macro name="basedata_5_flood-protections_relative_points"/> | |
780 </dc:otherwise> | |
781 </dc:choose> | |
782 </dc:if> | |
783 | |
784 <dc:if test="dc:contains($artifact-outs, 'fix_wq_curve') and not (dc:contains($parameters, 'recommended'))"> | |
785 <discharge_table_nn> | |
786 <discharge_table_gauge> | |
787 <dc:context> | |
788 <dc:statement> | |
789 SELECT id AS gauge_id, | |
790 name AS gauge_name | |
791 FROM gauges WHERE river_id = ${river_id} | |
792 </dc:statement> | |
793 <dc:elements> | |
794 <gauge> | |
795 <dc:attribute name="name" value="${gauge_name}"/> | |
796 <dc:attribute name="db-id" value="${gauge_id}"/> | |
797 <dc:attribute name="factory" value="gaugedischarge"/> | |
798 <dc:attribute name="from" value="${g_start}"/> | |
799 <dc:attribute name="to" value="${g_stop}"/> | |
800 <dc:attribute name="ids" value="${gauge_name}"/> | |
801 </gauge> | |
802 </dc:elements> | |
803 </dc:context> | |
804 </discharge_table_gauge> | |
805 </discharge_table_nn> | |
806 </dc:if> | |
807 | |
808 Â Â Â Â Â <dc:if test="dc:contains($artifact-outs, 'longitudinal_section')"> | |
809 | |
810 Â Â Â Â Â Â Â <longitudinal_section> | |
811 Â Â Â Â Â Â Â Â <dc:call-macro name="annotations"/> | |
812 Â Â Â Â Â Â Â </longitudinal_section> | |
813 Â Â Â Â Â </dc:if> | |
814 | |
815 <dc:if test="dc:contains($artifact-outs, 'map')"> | |
816 <map> | |
817 <dc:choose> | |
818 <dc:when test="dc:contains($parameters, 'recommended')"> | |
819 </dc:when> | |
820 <dc:otherwise> | |
821 <dc:call-macro name="flood-map-complete"/> | |
822 </dc:otherwise> | |
823 </dc:choose> | |
824 </map> | |
825 </dc:if> | |
826 <dc:if test="dc:contains($artifact-outs, 'floodmap')"> | |
827 <floodmap> | |
828 <dc:choose> | |
829 <dc:when test="dc:contains($parameters, 'recommended')"> | |
830 <dc:call-macro name="flood-map-recommended"/> | |
831 </dc:when> | |
832 <dc:when test="dc:contains($parameters, 'dem')"> | |
833 <dc:call-macro name="flood-map-dem"/> | |
834 </dc:when> | |
835 <dc:otherwise> | |
836 <dc:call-macro name="flood-map-complete"/> | |
837 </dc:otherwise> | |
838 </dc:choose> | |
839 </floodmap> | |
840 <dc:macro name="flood-map-recommended"> | |
841 <dc:comment> | |
842 FIXME: Following two macros look identical to me. | |
843 </dc:comment> | |
844 <kilometrage> | |
845 <riveraxis> | |
846 <dc:attribute name="factory" value="riveraxis"/> | |
847 <dc:attribute name="ids" value="${river_id}"/> | |
848 </riveraxis> | |
849 </kilometrage> | |
850 <rastermap> | |
851 <background> | |
852 <dc:attribute name="factory" value="wmsbackground"/> | |
853 <dc:attribute name="ids" value="${river_id}"/> | |
854 </background> | |
855 </rastermap> | |
856 </dc:macro> | |
857 <dc:macro name="flood-map-dem"> | |
858 <dems> | |
859 <dc:context> | |
860 <dc:statement> | |
861 SELECT id AS dem_id, | |
862 lower AS dem_lower, | |
863 upper AS dem_upper, | |
864 name AS name, | |
865 projection || ' | ' || year_from || ' - ' || year_to AS info | |
866 FROM dem WHERE river_id = ${river_id} | |
867 </dc:statement> | |
868 <dc:elements> | |
869 <dem> | |
870 <dc:attribute name="factory" value="demfactory"/> | |
871 <dc:attribute name="ids" value="${dem_id}"/> | |
872 <dc:attribute name="name" value="${name}"/> | |
873 <dc:attribute name="info" value="${info}"/> | |
874 </dem> | |
875 </dc:elements> | |
876 </dc:context> | |
877 </dems> | |
878 </dc:macro> | |
879 <dc:macro name="flood-map-km"> | |
880 <dc:context> | |
881 <dc:statement> | |
882 SELECT count(*) as km_exists | |
883 FROM river_axes_km WHERE river_id = ${river_id} | |
884 </dc:statement> | |
885 <dc:elements> | |
886 <dc:if test="$km_exists>0"> | |
887 <km> | |
888 <dc:attribute name="factory" value="wmskmfactory"/> | |
889 <dc:attribute name="ids" value="${river_id}"/> | |
890 </km> | |
891 </dc:if> | |
892 </dc:elements> | |
893 </dc:context> | |
894 </dc:macro> | |
895 <dc:macro name="flood-map-qps"> | |
896 <dc:context> | |
897 <dc:statement> | |
898 SELECT count(*) as km_exists | |
899 FROM cross_section_tracks WHERE river_id = ${river_id} | |
900 </dc:statement> | |
901 <dc:elements> | |
902 <dc:if test="$km_exists>0"> | |
903 <qps> | |
904 <dc:attribute name="factory" value="wmsqpsfactory"/> | |
905 <dc:attribute name="ids" value="${river_id}"/> | |
906 </qps> | |
907 </dc:if> | |
908 </dc:elements> | |
909 </dc:context> | |
910 </dc:macro> | |
911 <dc:macro name="flood-map-hws"> | |
912 <dc:context> | |
913 <dc:statement> | |
914 SELECT count(*) as km_exists, name as name | |
915 FROM hws WHERE river_id = ${river_id} GROUP BY name | |
916 </dc:statement> | |
917 <dc:elements> | |
918 <dc:if test="$km_exists>0"> | |
919 <hws> | |
920 <dc:attribute name="factory" value="wmshwsfactory"/> | |
921 <dc:attribute name="ids" value="${river_id};${name}"/> | |
922 <dc:attribute name="name" value="${name}"/> | |
923 </hws> | |
924 </dc:if> | |
925 </dc:elements> | |
926 </dc:context> | |
927 </dc:macro> | |
928 <dc:macro name="flood-map-hydr-boundaries"> | |
929 <hydr_boundaries_lines> | |
930 <dc:call-macro name="flood-map-hydr-boundaries-lines"/> | |
931 </hydr_boundaries_lines> | |
932 <hydr_boundaries_polygons> | |
933 <dc:call-macro name="flood-map-hydr-boundaries-poly"/> | |
934 </hydr_boundaries_polygons> | |
935 </dc:macro> | |
936 <dc:macro name="flood-map-hydr-boundaries-lines"> | |
937 <bfg> | |
938 <dc:context> | |
939 <dc:statement> | |
940 SELECT count(*) as km_exists, name as name | |
941 FROM hydr_boundaries WHERE river_id = ${river_id} AND kind = 1 GROUP BY name | |
942 </dc:statement> | |
943 <dc:elements> | |
944 <dc:if test="$km_exists>0"> | |
945 <hydrboundary> | |
946 <dc:attribute name="factory" value="wmshydrboundariesfactory"/> | |
947 <dc:attribute name="ids" value="${river_id};${name}"/> | |
948 <dc:attribute name="name" value="${name}"/> | |
949 </hydrboundary> | |
950 </dc:if> | |
951 </dc:elements> | |
952 </dc:context> | |
953 </bfg> | |
954 <land> | |
955 <dc:context> | |
956 <dc:statement> | |
957 SELECT count(*) as km_exists, name as name | |
958 FROM hydr_boundaries WHERE river_id = ${river_id} AND kind = 2 GROUP BY name | |
959 </dc:statement> | |
960 <dc:elements> | |
961 <dc:if test="$km_exists>0"> | |
962 <hydrboundary> | |
963 <dc:attribute name="factory" value="wmshydrboundariesfactory"/> | |
964 <dc:attribute name="ids" value="${river_id};${name}"/> | |
965 <dc:attribute name="name" value="${name}"/> | |
966 </hydrboundary> | |
967 </dc:if> | |
968 </dc:elements> | |
969 </dc:context> | |
970 </land> | |
971 </dc:macro> | |
972 <dc:macro name="flood-map-hydr-boundaries-poly"> | |
973 <bfg> | |
974 <dc:context> | |
975 <dc:statement> | |
976 SELECT count(*) as km_exists, name as name | |
977 FROM hydr_boundaries_poly WHERE river_id = ${river_id} AND kind = 1 GROUP BY name | |
978 </dc:statement> | |
979 <dc:elements> | |
980 <dc:if test="$km_exists>0"> | |
981 <hws> | |
982 <dc:attribute name="factory" value="wmshydrboundariespolyfactory"/> | |
983 <dc:attribute name="ids" value="${river_id};${name}"/> | |
984 <dc:attribute name="name" value="${name}"/> | |
985 </hws> | |
986 </dc:if> | |
987 </dc:elements> | |
988 </dc:context> | |
989 </bfg> | |
990 <land> | |
991 <dc:context> | |
992 <dc:statement> | |
993 SELECT count(*) as km_exists, name as name | |
994 FROM hydr_boundaries_poly WHERE river_id = ${river_id} AND kind = 2 GROUP BY name | |
995 </dc:statement> | |
996 <dc:elements> | |
997 <dc:if test="$km_exists>0"> | |
998 <hws> | |
999 <dc:attribute name="factory" value="wmshydrboundariespolyfactory"/> | |
1000 <dc:attribute name="ids" value="${river_id};${name}"/> | |
1001 <dc:attribute name="name" value="${name}"/> | |
1002 </hws> | |
1003 </dc:if> | |
1004 </dc:elements> | |
1005 </dc:context> | |
1006 </land> | |
1007 </dc:macro> | |
1008 <dc:macro name="flood-map-catchments"> | |
1009 <dc:context> | |
1010 <dc:statement> | |
1011 SELECT count(*) as km_exists, name as name | |
1012 FROM catchment WHERE river_id = ${river_id} GROUP BY name | |
1013 </dc:statement> | |
1014 <dc:elements> | |
1015 <dc:if test="$km_exists>0"> | |
1016 <catchment> | |
1017 <dc:attribute name="factory" value="wmscatchmentfactory"/> | |
1018 <dc:attribute name="ids" value="${river_id};${name}"/> | |
1019 <dc:attribute name="name" value="${name}"/> | |
1020 </catchment> | |
1021 </dc:if> | |
1022 </dc:elements> | |
1023 </dc:context> | |
1024 </dc:macro> | |
1025 <dc:macro name="flood-map-floodplain"> | |
1026 <dc:context> | |
1027 <dc:statement> | |
1028 SELECT count(*) as km_exists | |
1029 FROM floodplain WHERE river_id = ${river_id} | |
1030 </dc:statement> | |
1031 <dc:elements> | |
1032 <dc:if test="$km_exists>0"> | |
1033 <floodplain> | |
1034 <dc:attribute name="factory" value="wmsfloodplainfactory"/> | |
1035 <dc:attribute name="ids" value="${river_id}"/> | |
1036 </floodplain> | |
1037 </dc:if> | |
1038 </dc:elements> | |
1039 </dc:context> | |
1040 </dc:macro> | |
1041 <dc:macro name="flood-map-lines"> | |
1042 <dc:context> | |
1043 <dc:statement> | |
1044 SELECT count(*) as km_exists, name as name | |
1045 FROM lines WHERE river_id = ${river_id} GROUP BY name | |
1046 </dc:statement> | |
1047 <dc:elements> | |
1048 <dc:if test="$km_exists>0"> | |
1049 <line> | |
1050 <dc:attribute name="factory" value="wmslinefactory"/> | |
1051 <dc:attribute name="ids" value="${river_id};${name}"/> | |
1052 <dc:attribute name="name" value="${name}"/> | |
1053 </line> | |
1054 </dc:if> | |
1055 </dc:elements> | |
1056 </dc:context> | |
1057 </dc:macro> | |
1058 <dc:macro name="flood-map-buildings"> | |
1059 <dc:context> | |
1060 <dc:statement> | |
1061 SELECT count(*) as km_exists, name as name | |
1062 FROM buildings WHERE river_id = ${river_id} GROUP BY name | |
1063 </dc:statement> | |
1064 <dc:elements> | |
1065 <dc:if test="$km_exists>0"> | |
1066 <building> | |
1067 <dc:attribute name="factory" value="wmsbuildingsfactory"/> | |
1068 <dc:attribute name="ids" value="${river_id};${name}"/> | |
1069 <dc:attribute name="name" value="${name}"/> | |
1070 </building> | |
1071 </dc:if> | |
1072 </dc:elements> | |
1073 </dc:context> | |
1074 </dc:macro> | |
1075 <dc:macro name="flood-map-fixpoints"> | |
1076 <dc:context> | |
1077 <dc:statement> | |
1078 SELECT count(*) as km_exists, name as name | |
1079 FROM fixpoints WHERE river_id = ${river_id} GROUP BY name | |
1080 </dc:statement> | |
1081 <dc:elements> | |
1082 <dc:if test="$km_exists>0"> | |
1083 <fixpoint> | |
1084 <dc:attribute name="factory" value="wmsfixpointsfactory"/> | |
1085 <dc:attribute name="ids" value="${river_id};${name}"/> | |
1086 <dc:attribute name="name" value="${name}"/> | |
1087 </fixpoint> | |
1088 </dc:if> | |
1089 </dc:elements> | |
1090 </dc:context> | |
1091 </dc:macro> | |
1092 <dc:macro name="flood-map-gaugelocations"> | |
1093 <dc:context> | |
1094 <dc:statement> | |
1095 SELECT count(*) as km_exists, name as name | |
1096 FROM gauge_location WHERE river_id = ${river_id} GROUP BY name | |
1097 </dc:statement> | |
1098 <dc:elements> | |
1099 <dc:if test="$km_exists>0"> | |
1100 <gaugelocation> | |
1101 <dc:attribute name="factory" value="wmsgaugelocationfactory"/> | |
1102 <dc:attribute name="ids" value="${river_id};${name}"/> | |
1103 <dc:attribute name="name" value="${name}"/> | |
1104 </gaugelocation> | |
1105 </dc:if> | |
1106 </dc:elements> | |
1107 </dc:context> | |
1108 </dc:macro> | |
1109 <dc:macro name="flood-map-uesk"> | |
1110 <uesk> | |
1111 <calculations> | |
1112 <current> | |
1113 <bfg> | |
1114 <dc:context> | |
1115 <dc:statement> | |
1116 SELECT count(*) as uesg_exist, name as name | |
1117 FROM floodmaps | |
1118 WHERE river_id = ${river_id} AND kind = 111 | |
1119 GROUP BY name, kind | |
1120 </dc:statement> | |
1121 <dc:elements> | |
1122 <dc:if test="$uesg_exist>0"> | |
1123 <floodmaps> | |
1124 <dc:attribute name="factory" value="wmsfloodmapsfactory"/> | |
1125 <dc:attribute name="ids" value="${river_id};${name}"/> | |
1126 <dc:attribute name="name" value="${name}"/> | |
1127 </floodmaps> | |
1128 </dc:if> | |
1129 </dc:elements> | |
1130 </dc:context> | |
1131 </bfg> | |
1132 <land> | |
1133 <dc:context> | |
1134 <dc:statement> | |
1135 SELECT count(*) as uesg_exist, name as name | |
1136 FROM floodmaps | |
1137 WHERE river_id = ${river_id} AND kind = 112 | |
1138 GROUP BY name, kind | |
1139 </dc:statement> | |
1140 <dc:elements> | |
1141 <dc:if test="$uesg_exist>0"> | |
1142 <floodmaps> | |
1143 <dc:attribute name="factory" value="wmsfloodmapsfactory"/> | |
1144 <dc:attribute name="ids" value="${river_id};${name}"/> | |
1145 <dc:attribute name="name" value="${name}"/> | |
1146 </floodmaps> | |
1147 </dc:if> | |
1148 </dc:elements> | |
1149 </dc:context> | |
1150 </land> | |
1151 </current> | |
1152 <potentiel> | |
1153 <bfg> | |
1154 <dc:context> | |
1155 <dc:statement> | |
1156 SELECT count(*) as uesg_exist, name as name | |
1157 FROM floodmaps | |
1158 WHERE river_id = ${river_id} AND kind = 121 | |
1159 GROUP BY name, kind | |
1160 </dc:statement> | |
1161 <dc:elements> | |
1162 <dc:if test="$uesg_exist>0"> | |
1163 <floodmaps> | |
1164 <dc:attribute name="factory" value="wmsfloodmapsfactory"/> | |
1165 <dc:attribute name="ids" value="${river_id};${name}"/> | |
1166 <dc:attribute name="name" value="${name}"/> | |
1167 </floodmaps> | |
1168 </dc:if> | |
1169 </dc:elements> | |
1170 </dc:context> | |
1171 </bfg> | |
1172 <land> | |
1173 <dc:context> | |
1174 <dc:statement> | |
1175 SELECT count(*) as uesg_exist, name as name | |
1176 FROM floodmaps | |
1177 WHERE river_id = ${river_id} AND kind = 122 | |
1178 GROUP BY name, kind | |
1179 </dc:statement> | |
1180 <dc:elements> | |
1181 <dc:if test="$uesg_exist>0"> | |
1182 <floodmaps> | |
1183 <dc:attribute name="factory" value="wmsfloodmapsfactory"/> | |
1184 <dc:attribute name="ids" value="${river_id};${name}"/> | |
1185 <dc:attribute name="name" value="${name}"/> | |
1186 </floodmaps> | |
1187 </dc:if> | |
1188 </dc:elements> | |
1189 </dc:context> | |
1190 </land> | |
1191 </potentiel> | |
1192 </calculations> | |
1193 </uesk> | |
1194 </dc:macro> | |
1195 <dc:macro name="flood-map-complete"> | |
1196 <buildings> | |
1197 <dc:call-macro name="flood-map-buildings"/> | |
1198 </buildings> | |
1199 <catchments> | |
1200 <dc:call-macro name="flood-map-catchments"/> | |
1201 </catchments> | |
1202 <fixpoints> | |
1203 <dc:call-macro name="flood-map-fixpoints"/> | |
1204 </fixpoints> | |
1205 <hws> | |
1206 <dc:call-macro name="flood-map-hws"/> | |
1207 </hws> | |
1208 <hydrboundaries> | |
1209 <dc:call-macro name="flood-map-hydr-boundaries"/> | |
1210 <dc:call-macro name="flood-map-floodplain"/> | |
1211 </hydrboundaries> | |
1212 <kilometrage> | |
1213 <riveraxis> | |
1214 <dc:attribute name="factory" value="riveraxis"/> | |
1215 <dc:attribute name="ids" value="${river_id}"/> | |
1216 </riveraxis> | |
1217 <dc:call-macro name="flood-map-km"/> | |
1218 <dc:call-macro name="flood-map-qps"/> | |
1219 </kilometrage> | |
1220 <lines> | |
1221 <dc:call-macro name="flood-map-lines"/> | |
1222 </lines> | |
1223 <dc:call-macro name="flood-map-uesk"/> | |
1224 <gaugelocations> | |
1225 <dc:call-macro name="flood-map-gaugelocations"/> | |
1226 </gaugelocations> | |
1227 <rastermap> | |
1228 <background> | |
1229 <dc:attribute name="factory" value="wmsbackground"/> | |
1230 <dc:attribute name="ids" value="${river_id}"/> | |
1231 </background> | |
1232 </rastermap> | |
1233 </dc:macro> | |
1234 </dc:if> | |
1235 <dc:if test="dc:contains($artifact-outs, 'minfo-heights')"> | |
1236 <dc:call-macro name="minfo-heights"/> | |
1237 <dc:macro name="minfo-heights"> | |
1238 <bedheights> | |
1239 <dc:call-macro name="bed-heights-single"/> | |
1240 <dc:call-macro name="bed-heights-epoch"/> | |
1241 </bedheights> | |
1242 </dc:macro> | |
1243 </dc:if> | |
1244 <dc:if test="dc:contains($artifact-outs, 'minfo-heights-epoch')"> | |
1245 <bedheights> | |
1246 <dc:call-macro name="bed-heights-epoch"/> | |
1247 </bedheights> | |
1248 </dc:if> | |
1249 <dc:macro name="bed-heights-single"> | |
1250 <single> | |
1251 <dc:context> | |
1252 <dc:statement> | |
1253 SELECT id AS bedh_id, | |
1254 year AS bedh_year, | |
1255 description AS bedh_descr | |
1256 FROM bed_height_single WHERE river_id = ${river_id} | |
1257 </dc:statement> | |
1258 <dc:elements> | |
1259 <height> | |
1260 <dc:attribute name="factory" value="bedheight"/> | |
1261 <dc:attribute name="ids" value="bedheight-single-${bedh_id}-${bedh_year}"/> | |
1262 <dc:attribute name="description" value="${bedh_descr}"/> | |
1263 </height> | |
1264 </dc:elements> | |
1265 </dc:context> | |
1266 </single> | |
1267 </dc:macro> | |
1268 <dc:macro name="bed-heights-epoch"> | |
1269 <epoch> | |
1270 <dc:context> | |
1271 <dc:statement> | |
1272 SELECT id AS bedh_id, | |
1273 time_interval_id AS bedh_interval_id, | |
1274 description AS bedh_descr | |
1275 FROM bed_height_epoch WHERE river_id = ${river_id} | |
1276 </dc:statement> | |
1277 <dc:elements> | |
1278 <height> | |
1279 <dc:attribute name="factory" value="bedheight"/> | |
1280 <dc:attribute name="ids" value="bedheight-epoch-${bedh_id}-${bedh_interval_id}"/> | |
1281 <dc:attribute name="description" value="${bedh_descr}"/> | |
1282 </height> | |
1283 </dc:elements> | |
1284 </dc:context> | |
1285 </epoch> | |
1286 </dc:macro> | |
1287 </river> | |
1288 </dc:elements> | |
1289 </dc:context> | |
1290 </dc:macro> | |
1291 | |
1292 <dc:choose> | |
1293 <dc:comment> | |
1294 User specific part | |
1295 ------------------ | |
1296 </dc:comment> | |
1297 <dc:when test="dc:contains($parameters, 'user-id')"> | |
1298 | |
1299 | |
1300 <old_calculations> | |
1301 <dc:context connection="user"> | |
1302 <dc:comment> | |
1303 Get the user and collection-id. | |
1304 </dc:comment> | |
1305 <dc:statement> | |
1306 SELECT u.id AS user_id, c.id AS collection_id, c.name as collection_name | |
1307 FROM collections c JOIN users u ON c.user_id = u.id | |
1308 WHERE u.gid = CAST(${user-id} AS uuid) | |
1309 ORDER BY c.creation DESC | |
1310 </dc:statement> | |
1311 | |
1312 <!-- OFFICIAL LINES --> | |
1313 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section')"> | |
1314 <dc:comment comment=".wst -------------------------------"/> | |
1315 <officiallines> | |
1316 <dc:elements> | |
1317 <dc:context> | |
1318 <dc:statement> | |
1319 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation, ardg.v as gaugy, arv.v as wqsingle | |
1320 FROM master_artifacts m, artifact_data ardg, artifact_data arv | |
1321 WHERE m.collection_id = ${collection_id} AND m.gid = CAST(${artifact-id} AS uuid) AND ardg.artifact_id = m.id AND ardg.k = 'ld_gaugename' AND arv.artifact_id = m.id AND arv.k = 'wq_single' | |
1322 AND EXISTS ( | |
1323 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) | |
1324 </dc:statement> | |
1325 <dc:elements> | |
1326 <dc:context connection="system"> | |
1327 <dc:statement> | |
1328 SELECT ol.wst_id AS wstid, ol.wst_column_pos AS wstcolpos, ol.name AS olname, ol.value AS oval | |
1329 FROM official_q_values ol | |
1330 WHERE ol.value = CAST(${wqsingle} AS NUMERIC(10,2)) AND ol.gauge_name = ${gaugy} | |
1331 </dc:statement> | |
1332 <dc:elements> | |
1333 <dc:element name="${olname}"> | |
1334 <dc:attribute name="name" value="${olname}"/> | |
1335 <dc:attribute name="ids" value="additionals-wstv-${wstcolpos}-${wstid}"/> | |
1336 <dc:attribute name="factory" value="staticwkms"/> | |
1337 </dc:element> | |
1338 </dc:elements> | |
1339 </dc:context> | |
1340 </dc:elements> | |
1341 </dc:context> | |
1342 </dc:elements> | |
1343 </officiallines> | |
1344 </dc:if> | |
1345 <!-- END OFFICIAL LINES --> | |
1346 | |
1347 <dc:comment> | |
1348 SHOW W-DIFFERENCES | |
1349 </dc:comment> | |
1350 | |
1351 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section') or (dc:contains($artifact-outs, 'w_differences') or (dc:contains($artifact-outs, 'discharge_longitudinal_section')))"> | |
1352 <differences> | |
1353 <dc:elements> | |
1354 <dc:context> | |
1355 <dc:statement> | |
1356 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation | |
1357 FROM master_artifacts m | |
1358 WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) | |
1359 AND EXISTS ( | |
1360 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) | |
1361 </dc:statement> | |
1362 <dc:elements> | |
1363 <dc:context> | |
1364 <dc:statement> | |
1365 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description | |
1366 FROM outs as o, facets as f, artifacts as a | |
1367 WHERE f.name = 'w_differences' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} | |
1368 </dc:statement> | |
1369 <dc:elements> | |
1370 <dc:element name="${facet_name}"> | |
1371 <dc:attribute name="description" value="${facet_description}"/> | |
1372 <dc:attribute name="factory" value="winfo"/> | |
1373 <dc:attribute name="artifact-id" value="${aid}"/> | |
1374 <dc:attribute name="ids" value="${aid}"/> | |
1375 <dc:attribute name="out" value="w_differences"/> | |
1376 </dc:element> | |
1377 </dc:elements> | |
1378 </dc:context> | |
1379 </dc:elements> | |
1380 </dc:context> | |
1381 </dc:elements> | |
1382 </differences> | |
1383 </dc:if> | |
1384 | |
1385 <dc:comment> | |
1386 SHOW REFERENCE CURVE | |
1387 </dc:comment> | |
1388 | |
1389 <dc:if test="dc:contains($artifact-outs, 'reference_curve')"> | |
1390 <reference_curves> | |
1391 <dc:elements> | |
1392 <dc:context> | |
1393 <dc:statement> | |
1394 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation | |
1395 FROM master_artifacts m | |
1396 WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) | |
1397 AND EXISTS ( | |
1398 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) | |
1399 </dc:statement> | |
1400 <dc:elements> | |
1401 <dc:context> | |
1402 <dc:statement> | |
1403 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description | |
1404 FROM outs as o, facets as f, artifacts as a | |
1405 WHERE f.name = 'reference_curve' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} | |
1406 </dc:statement> | |
1407 <dc:elements> | |
1408 <dc:element name="${facet_name}"> | |
1409 <dc:attribute name="description" value="${facet_description}"/> | |
1410 <dc:attribute name="factory" value="winfo"/> | |
1411 <dc:attribute name="artifact-id" value="${aid}"/> | |
1412 <dc:attribute name="ids" value="${aid}"/> | |
1413 <dc:attribute name="out" value="reference_curve"/> | |
1414 </dc:element> | |
1415 </dc:elements> | |
1416 </dc:context> | |
1417 </dc:elements> | |
1418 </dc:context> | |
1419 </dc:elements> | |
1420 </reference_curves> | |
1421 </dc:if> | |
1422 | |
1423 <dc:comment> | |
1424 SHOW COMPUTED DISCHARGE CURVES | |
1425 </dc:comment> | |
1426 | |
1427 <dc:if test="dc:contains($artifact-outs, 'computed_discharge_curve')"> | |
1428 <computed_discharge_curves> | |
1429 <dc:elements> | |
1430 <dc:context> | |
1431 <dc:statement> | |
1432 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation | |
1433 FROM master_artifacts m | |
1434 WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) | |
1435 AND EXISTS ( | |
1436 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) | |
1437 </dc:statement> | |
1438 <dc:elements> | |
1439 <dc:context> | |
1440 <dc:statement> | |
1441 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description | |
1442 FROM outs as o, facets as f, artifacts as a | |
1443 WHERE f.name = 'computed_discharge_curve.q' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} | |
1444 </dc:statement> | |
1445 <dc:elements> | |
1446 <dc:element name="${facet_name}"> | |
1447 <dc:attribute name="description" value="${facet_description}"/> | |
1448 <dc:attribute name="factory" value="winfo"/> | |
1449 <dc:attribute name="artifact-id" value="${aid}"/> | |
1450 <dc:attribute name="ids" value="${aid}"/> | |
1451 <dc:attribute name="out" value="computed_discharge_curve"/> | |
1452 </dc:element> | |
1453 </dc:elements> | |
1454 </dc:context> | |
1455 </dc:elements> | |
1456 </dc:context> | |
1457 </dc:elements> | |
1458 </computed_discharge_curves> | |
1459 </dc:if> | |
1460 | |
1461 <dc:comment> | |
1462 CROSS SECTION | |
1463 </dc:comment> | |
1464 | |
1465 <dc:if test="dc:contains($artifact-outs, 'cross_section')"> | |
1466 <waterlevels> | |
1467 <dc:elements> | |
1468 <dc:context> | |
1469 <dc:statement> | |
1470 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation | |
1471 FROM master_artifacts m | |
1472 WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) | |
1473 AND EXISTS ( | |
1474 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) | |
1475 </dc:statement> | |
1476 <dc:elements> | |
1477 <dc:context> | |
1478 <dc:statement> | |
1479 SELECT id AS out_id | |
1480 FROM outs | |
1481 WHERE artifact_id = ${a_id} AND name = 'cross_section' | |
1482 </dc:statement> | |
1483 <dc:elements> | |
1484 <dc:context> | |
1485 <dc:statement> | |
1486 SELECT name AS facet_name, num as facet_num, description AS facet_description | |
1487 FROM facets | |
1488 WHERE out_id = ${out_id} | |
1489 ORDER BY num ASC, name DESC | |
1490 </dc:statement> | |
1491 <longitudinal_section_columns> | |
1492 <dc:attribute name="description" value="${river} ${a_creation}"/> | |
1493 <dc:elements> | |
1494 <dc:element name="${facet_name}"> | |
1495 <dc:attribute name="description" value="${facet_description}"/> | |
1496 <dc:attribute name="ids" value="${facet_num}"/> | |
1497 <dc:attribute name="factory" value="winfo"/> | |
1498 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
1499 <dc:attribute name="out" value="cross_section"/> | |
1500 </dc:element> | |
1501 </dc:elements> | |
1502 </longitudinal_section_columns> | |
1503 </dc:context> | |
1504 </dc:elements> | |
1505 </dc:context> | |
1506 </dc:elements> | |
1507 </dc:context> | |
1508 </dc:elements> | |
1509 </waterlevels> | |
1510 </dc:if> | |
1511 | |
1512 | |
1513 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section') or (dc:contains($artifact-outs, 'discharge_longitudinal_section') or (dc:contains($artifact-outs, 'w_differences')))"> | |
1514 <waterlevels> | |
1515 <dc:elements> | |
1516 <dc:context> | |
1517 <dc:statement> | |
1518 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation | |
1519 FROM master_artifacts m | |
1520 WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) | |
1521 AND EXISTS ( | |
1522 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) | |
1523 </dc:statement> | |
1524 <dc:elements> | |
1525 <dc:context> | |
1526 <dc:statement> | |
1527 SELECT id AS out_id | |
1528 FROM outs | |
1529 WHERE artifact_id = ${a_id} AND name = 'longitudinal_section' | |
1530 </dc:statement> | |
1531 <dc:elements> | |
1532 <dc:context> | |
1533 <dc:statement> | |
1534 SELECT name AS facet_name, num as facet_num, description AS facet_description | |
1535 FROM facets | |
1536 WHERE out_id = ${out_id} | |
1537 ORDER BY num ASC, name DESC | |
1538 </dc:statement> | |
1539 <longitudinal_section_columns> | |
1540 <dc:attribute name="description" value="${river} ${a_creation}"/> | |
1541 <dc:elements> | |
1542 <dc:element name="${facet_name}"> | |
1543 <dc:attribute name="description" value="${facet_description}"/> | |
1544 <dc:attribute name="ids" value="${facet_num}"/> | |
1545 <dc:attribute name="factory" value="winfo"/> | |
1546 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
1547 <dc:attribute name="out" value="longitudinal_section"/> | |
1548 </dc:element> | |
1549 </dc:elements> | |
1550 </longitudinal_section_columns> | |
1551 </dc:context> | |
1552 </dc:elements> | |
1553 </dc:context> | |
1554 </dc:elements> | |
1555 </dc:context> | |
1556 </dc:elements> | |
1557 </waterlevels> | |
1558 </dc:if> | |
1559 | |
1560 <dc:if test="dc:contains($artifact-outs, 'fix_longitudinal_section_curve')"> | |
1561 <waterlevels> | |
1562 <dc:elements> | |
1563 <dc:context> | |
1564 <dc:statement> | |
1565 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation | |
1566 FROM master_artifacts m | |
1567 WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) | |
1568 AND EXISTS ( | |
1569 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) | |
1570 </dc:statement> | |
1571 <dc:elements> | |
1572 | |
1573 <dc:context> | |
1574 <dc:statement> | |
1575 SELECT id AS out_id | |
1576 FROM outs | |
1577 WHERE artifact_id = ${a_id} AND name = 'fix_longitudinal_section_curve' | |
1578 </dc:statement> | |
1579 <dc:elements> | |
1580 <dc:context> | |
1581 <!-- average und deviation ls_0 . ls_1 ...--> | |
1582 <dc:statement> | |
1583 SELECT name AS facet_name, num as facet_num, description AS facet_description | |
1584 FROM facets | |
1585 WHERE out_id = ${out_id} AND ( name LIKE 'fix_deviation_ls%' OR name LIKE 'fix_sector_average_ls%' OR name LIKE 'fix_analysis_events_ls%' OR name LIKE 'fix_reference_events_ls%' ) | |
1586 ORDER BY num ASC, name DESC | |
1587 </dc:statement> | |
1588 <waterlevels> | |
1589 <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> | |
1590 <dc:elements> | |
1591 <dc:element name="${facet_name}"> | |
1592 <dc:attribute name="description" value="${facet_description}"/> | |
1593 <dc:attribute name="ids" value="${facet_num}"/> | |
1594 <dc:attribute name="factory" value="fixanalysis"/> | |
1595 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
1596 <dc:attribute name="out" value="fix_longitudinal_section_curve"/> | |
1597 </dc:element> | |
1598 </dc:elements> | |
1599 </waterlevels> | |
1600 </dc:context> | |
1601 </dc:elements> | |
1602 </dc:context> | |
1603 </dc:elements> | |
1604 </dc:context> | |
1605 </dc:elements> | |
1606 </waterlevels> | |
1607 </dc:if> | |
1608 | |
1609 <dc:if test="dc:contains($artifact-outs, 'fix_deltawt_curve')"> | |
1610 <waterlevels> | |
1611 <dc:elements> | |
1612 <dc:context> | |
1613 <dc:statement> | |
1614 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation | |
1615 FROM master_artifacts m | |
1616 WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) | |
1617 AND EXISTS ( | |
1618 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) | |
1619 </dc:statement> | |
1620 <dc:elements> | |
1621 | |
1622 <dc:context> | |
1623 <dc:statement> | |
1624 SELECT id AS out_id | |
1625 FROM outs | |
1626 WHERE artifact_id = ${a_id} AND name = 'fix_deltawt_curve' | |
1627 </dc:statement> | |
1628 <dc:elements> | |
1629 <dc:context> | |
1630 <dc:statement> | |
1631 SELECT name AS facet_name, num as facet_num, description AS facet_description | |
1632 FROM facets | |
1633 WHERE out_id = ${out_id} and ( name LIKE 'fix_sector_average_dwt%' OR name LIKE 'fix_deviation_dwt%' OR name = 'fix_analysis_events_dwt' OR name = 'fix_reference_events_dwt' OR name = 'fix_analysis_periods_dwt' ) | |
1634 ORDER BY num ASC, name DESC | |
1635 </dc:statement> | |
1636 <waterlevels> | |
1637 <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> | |
1638 <dc:elements> | |
1639 <dc:element name="${facet_name}"> | |
1640 <dc:attribute name="description" value="${facet_description}"/> | |
1641 <dc:attribute name="ids" value="${facet_num}"/> | |
1642 <dc:attribute name="factory" value="fixanalysis"/> | |
1643 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
1644 <dc:attribute name="out" value="fix_deltawt_curve"/> | |
1645 </dc:element> | |
1646 </dc:elements> | |
1647 </waterlevels> | |
1648 </dc:context> | |
1649 </dc:elements> | |
1650 </dc:context> | |
1651 </dc:elements> | |
1652 </dc:context> | |
1653 </dc:elements> | |
1654 </waterlevels> | |
1655 </dc:if> | |
1656 | |
1657 <dc:if test="dc:contains($artifact-outs, 'fix_derivate_curve')"> | |
1658 <waterlevels> | |
1659 <dc:elements> | |
1660 <dc:context> | |
1661 <dc:statement> | |
1662 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation | |
1663 FROM master_artifacts m | |
1664 WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) | |
1665 AND EXISTS ( | |
1666 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) | |
1667 </dc:statement> | |
1668 <dc:elements> | |
1669 | |
1670 <dc:context> | |
1671 <dc:statement> | |
1672 SELECT id AS out_id | |
1673 FROM outs | |
1674 WHERE artifact_id = ${a_id} AND name = 'fix_derivate_curve' | |
1675 </dc:statement> | |
1676 <dc:elements> | |
1677 <dc:context> | |
1678 <dc:statement> | |
1679 SELECT name AS facet_name, num as facet_num, description AS facet_description | |
1680 FROM facets | |
1681 WHERE out_id = ${out_id} and name = 'fix_derivate' | |
1682 ORDER BY num ASC, name DESC | |
1683 </dc:statement> | |
1684 <waterlevels> | |
1685 <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> | |
1686 <dc:elements> | |
1687 <dc:element name="${facet_name}"> | |
1688 <dc:attribute name="description" value="${facet_description}"/> | |
1689 <dc:attribute name="ids" value="${facet_num}"/> | |
1690 <dc:attribute name="factory" value="fixanalysis"/> | |
1691 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
1692 <dc:attribute name="out" value="fix_derivate_curve"/> | |
1693 </dc:element> | |
1694 </dc:elements> | |
1695 </waterlevels> | |
1696 </dc:context> | |
1697 </dc:elements> | |
1698 </dc:context> | |
1699 </dc:elements> | |
1700 </dc:context> | |
1701 </dc:elements> | |
1702 </waterlevels> | |
1703 </dc:if> | |
1704 | |
1705 <dc:if test="dc:contains($artifact-outs, 'fix_wq_curve')"> | |
1706 <waterlevels> | |
1707 <dc:elements> | |
1708 <dc:context> | |
1709 <dc:statement> | |
1710 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation | |
1711 FROM master_artifacts m | |
1712 WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) | |
1713 AND EXISTS ( | |
1714 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) | |
1715 </dc:statement> | |
1716 <dc:elements> | |
1717 | |
1718 <dc:context> | |
1719 <dc:statement> | |
1720 SELECT id AS out_id | |
1721 FROM outs | |
1722 WHERE artifact_id = ${a_id} AND name = 'fix_wq_curve' | |
1723 </dc:statement> | |
1724 <dc:elements> | |
1725 <dc:context> | |
1726 <dc:statement> | |
1727 SELECT name AS facet_name, num as facet_num, description AS facet_description | |
1728 FROM facets | |
1729 WHERE out_id = ${out_id} and ( name LIKE 'fix_sector_average_wq%' OR name = 'fix_wq_curve' OR name LIKE 'fix_analysis_events_wq%' OR name LIKE 'fix_reference_events_wq%' ) | |
1730 ORDER BY num ASC, name DESC | |
1731 </dc:statement> | |
1732 <waterlevels> | |
1733 <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> | |
1734 <dc:elements> | |
1735 <dc:element name="${facet_name}"> | |
1736 <dc:attribute name="description" value="${facet_description}"/> | |
1737 <dc:attribute name="ids" value="${facet_num}"/> | |
1738 <dc:attribute name="factory" value="fixanalysis"/> | |
1739 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
1740 <dc:attribute name="out" value="fix_wq_curve"/> | |
1741 </dc:element> | |
1742 </dc:elements> | |
1743 </waterlevels> | |
1744 </dc:context> | |
1745 </dc:elements> | |
1746 </dc:context> | |
1747 </dc:elements> | |
1748 </dc:context> | |
1749 </dc:elements> | |
1750 </waterlevels> | |
1751 </dc:if> | |
1752 | |
1753 <dc:if test="dc:contains($artifact-outs, 'duration_curve')"> | |
1754 <computed_discharge_curves> | |
1755 <dc:elements> | |
1756 <dc:context> | |
1757 <dc:statement> | |
1758 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation | |
1759 FROM master_artifacts m | |
1760 WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) | |
1761 AND EXISTS ( | |
1762 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) | |
1763 </dc:statement> | |
1764 <dc:elements> | |
1765 <dc:context> | |
1766 <dc:statement> | |
1767 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description | |
1768 FROM outs as o, facets as f, artifacts as a | |
1769 WHERE (f.name = 'duration_curve.q' or f.name = 'duration_curve.w') and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} | |
1770 </dc:statement> | |
1771 <dc:elements> | |
1772 <dc:element name="${facet_name}"> | |
1773 <dc:attribute name="description" value="${facet_description}"/> | |
1774 <dc:attribute name="factory" value="winfo"/> | |
1775 <dc:attribute name="artifact-id" value="${aid}"/> | |
1776 <dc:attribute name="ids" value="${aid}"/> | |
1777 <dc:attribute name="out" value="duration_curve"/> | |
1778 </dc:element> | |
1779 </dc:elements> | |
1780 </dc:context> | |
1781 </dc:elements> | |
1782 </dc:context> | |
1783 </dc:elements> | |
1784 </computed_discharge_curves> | |
1785 </dc:if> | |
1786 <dc:comment> | |
1787 WATERLEVELS - ONLY SHOW Ws | |
1788 </dc:comment> | |
1789 | |
1790 <!-- TODO doesnt work nicely for fix/wq-diags. --> | |
1791 <dc:if test="dc:contains($artifact-outs, 'waterlevels') or (dc:contains($artifact-outs, 'fix_wq_curve'))"> | |
1792 <waterlevels> | |
1793 <dc:elements> | |
1794 <dc:context> | |
1795 <dc:statement> | |
1796 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation | |
1797 FROM master_artifacts m | |
1798 WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) | |
1799 AND EXISTS ( | |
1800 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) | |
1801 </dc:statement> | |
1802 <dc:elements> | |
1803 | |
1804 <dc:context> | |
1805 <dc:statement> | |
1806 SELECT id AS out_id | |
1807 FROM outs | |
1808 WHERE artifact_id = ${a_id} AND name = 'longitudinal_section' | |
1809 </dc:statement> | |
1810 <dc:elements> | |
1811 <dc:context> | |
1812 <dc:statement> | |
1813 SELECT name AS facet_name, num as facet_num, description AS facet_description | |
1814 FROM facets | |
1815 WHERE out_id = ${out_id} and name = 'longitudinal_section.w' | |
1816 ORDER BY num ASC, name DESC | |
1817 </dc:statement> | |
1818 <waterlevels> | |
1819 <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> | |
1820 <dc:elements> | |
1821 <dc:element name="${facet_name}"> | |
1822 <dc:attribute name="description" value="${facet_description}"/> | |
1823 <dc:attribute name="ids" value="${facet_num}"/> | |
1824 <dc:attribute name="factory" value="winfo"/> | |
1825 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
1826 <dc:attribute name="out" value="longitudinal_section"/> | |
1827 </dc:element> | |
1828 </dc:elements> | |
1829 </waterlevels> | |
1830 </dc:context> | |
1831 </dc:elements> | |
1832 </dc:context> | |
1833 </dc:elements> | |
1834 </dc:context> | |
1835 </dc:elements> | |
1836 </waterlevels> | |
1837 </dc:if> | |
1838 | |
1839 <dc:comment> | |
1840 SHOW FLOODMAPS | |
1841 </dc:comment> | |
1842 | |
1843 <dc:if test="dc:contains($artifact-outs, 'floodmap') or dc:contains($artifact-outs, 'map')"> | |
1844 <floodmap> | |
1845 <dc:elements> | |
1846 <dc:context> | |
1847 <dc:statement> | |
1848 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation | |
1849 FROM master_artifacts m | |
1850 WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) | |
1851 AND EXISTS ( | |
1852 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) | |
1853 </dc:statement> | |
1854 <dc:elements> | |
1855 <dc:context> | |
1856 <dc:statement> | |
1857 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description | |
1858 FROM outs as o, facets as f, artifacts as a | |
1859 WHERE f.name = 'floodmap.wsplgen' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} | |
1860 </dc:statement> | |
1861 <dc:elements> | |
1862 <dc:element name="${facet_name}"> | |
1863 <dc:attribute name="description" value="${facet_description}"/> | |
1864 <dc:attribute name="factory" value="winfo"/> | |
1865 <dc:attribute name="artifact-id" value="${aid}"/> | |
1866 <dc:attribute name="ids" value="${aid}"/> | |
1867 <dc:attribute name="out" value="floodmap"/> | |
1868 </dc:element> | |
1869 </dc:elements> | |
1870 </dc:context> | |
1871 </dc:elements> | |
1872 </dc:context> | |
1873 </dc:elements> | |
1874 </floodmap> | |
1875 </dc:if> | |
1876 | |
1877 </dc:context> | |
1878 </old_calculations> | |
1879 | |
1880 | |
1881 <dc:comment> | |
1882 Include System specific part when 'load-system' is in parameters. | |
1883 ----------------------------------------------------------------- | |
1884 </dc:comment> | |
1885 <dc:choose> | |
1886 <dc:when test="dc:contains($parameters,'load-system')"> | |
1887 <dc:call-macro name="load-system"/> | |
1888 </dc:when> | |
1889 </dc:choose> | |
1890 </dc:when> | |
1891 | |
1892 | |
1893 <dc:comment> | |
1894 Include System specific part only if no user ID is given. | |
1895 --------------------------------------------------------- | |
1896 </dc:comment> | |
1897 <dc:otherwise> | |
1898 <dc:call-macro name="load-system"/> | |
1899 </dc:otherwise> | |
1900 </dc:choose> | |
1901 </datacage> | |
1902 </dc:template> |