comparison flys-artifacts/doc/conf/meta-data.xml @ 5522:eeac800eb4cd

Datacage: Rename <dc:elements> to <dc:for-each>. We should have done this much earlier.
author Sascha L. Teichmann <teichmann@intevation.de>
date Fri, 29 Mar 2013 11:07:24 +0100
parents 56d18ecc7d41
children 35dba807966a
comparison
equal deleted inserted replaced
5521:bc140668db82 5522:eeac800eb4cd
36 COALESCE(ld_from, '') AS ldf, 36 COALESCE(ld_from, '') AS ldf,
37 COALESCE(ld_to, '') AS ldt 37 COALESCE(ld_to, '') AS ldt
38 FROM master_artifacts_range 38 FROM master_artifacts_range
39 WHERE gid = CAST(${artifact-id} as uuid) 39 WHERE gid = CAST(${artifact-id} as uuid)
40 </dc:statement> 40 </dc:statement>
41 <dc:elements> 41 <dc:for-each>
42 <dc:variable name="fromkm" type="number" expr="dc:fromValue($ldm, $ldl, $ldf)"/> 42 <dc:variable name="fromkm" type="number" expr="dc:fromValue($ldm, $ldl, $ldf)"/>
43 <dc:variable name="tokm" type="number" expr="dc:toValue($ldm, $ldl, $ldt)"/> 43 <dc:variable name="tokm" type="number" expr="dc:toValue($ldm, $ldl, $ldt)"/>
44 <dc:macro-body/> 44 <dc:macro-body/>
45 </dc:elements> 45 </dc:for-each>
46 </dc:context> 46 </dc:context>
47 </dc:when> 47 </dc:when>
48 <dc:otherwise> 48 <dc:otherwise>
49 <dc:variable name="fromkm" type="number" expr="dc:fromValue('', '', '')"/> 49 <dc:variable name="fromkm" type="number" expr="dc:fromValue('', '', '')"/>
50 <dc:variable name="tokm" type="number" expr="dc:toValue('', '', '')"/> 50 <dc:variable name="tokm" type="number" expr="dc:toValue('', '', '')"/>
60 <dc:context connection="system"> 60 <dc:context connection="system">
61 <dc:statement> 61 <dc:statement>
62 SELECT id AS river_id, name as river_name FROM rivers 62 SELECT id AS river_id, name as river_name FROM rivers
63 WHERE lower(name) LIKE lower(${river}) 63 WHERE lower(name) LIKE lower(${river})
64 </dc:statement> 64 </dc:statement>
65 <dc:elements> 65 <dc:for-each>
66 66
67 <dc:comment> 67 <dc:comment>
68 Base-data macros (mostly data imported from wst-files). 68 Base-data macros (mostly data imported from wst-files).
69 </dc:comment> 69 </dc:comment>
70 <dc:macro name="basedata_0"> 70 <dc:macro name="basedata_0">
75 <dc:statement> 75 <dc:statement>
76 SELECT id AS prot_id, 76 SELECT id AS prot_id,
77 description AS prot_description 77 description AS prot_description
78 FROM wsts WHERE kind = 0 AND river_id = ${river_id} 78 FROM wsts WHERE kind = 0 AND river_id = ${river_id}
79 </dc:statement> 79 </dc:statement>
80 <dc:elements> 80 <dc:for-each>
81 <basedata> 81 <basedata>
82 <dc:attribute name="name" value="${prot_description}"/> 82 <dc:attribute name="name" value="${prot_description}"/>
83 <dc:context> 83 <dc:context>
84 <dc:call-macro name="SQL-wst_columns_statement"/> 84 <dc:call-macro name="SQL-wst_columns_statement"/>
85 <dc:elements> 85 <dc:for-each>
86 <column> 86 <column>
87 <dc:attribute name="name" value="${prot_column_name}"/> 87 <dc:attribute name="name" value="${prot_column_name}"/>
88 <dc:attribute name="ids" value="base_data-wstv-${prot_rel_pos}-${prot_id}"/> 88 <dc:attribute name="ids" value="base_data-wstv-${prot_rel_pos}-${prot_id}"/>
89 <dc:attribute name="factory" value="staticwkms"/> 89 <dc:attribute name="factory" value="staticwkms"/>
90 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> 90 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/>
91 </column> 91 </column>
92 </dc:elements> 92 </dc:for-each>
93 </dc:context> 93 </dc:context>
94 </basedata> 94 </basedata>
95 </dc:elements> 95 </dc:for-each>
96 </dc:context> 96 </dc:context>
97 </basedata> 97 </basedata>
98 </dc:call-macro> 98 </dc:call-macro>
99 </dc:macro> 99 </dc:macro>
100 100
106 <dc:statement> 106 <dc:statement>
107 SELECT id AS prot_id, 107 SELECT id AS prot_id,
108 description AS prot_description 108 description AS prot_description
109 FROM wsts WHERE kind = 0 AND river_id = ${river_id} 109 FROM wsts WHERE kind = 0 AND river_id = ${river_id}
110 </dc:statement> 110 </dc:statement>
111 <dc:elements> 111 <dc:for-each>
112 <basedata> 112 <basedata>
113 <dc:attribute name="name" value="${prot_description}"/> 113 <dc:attribute name="name" value="${prot_description}"/>
114 <dc:context> 114 <dc:context>
115 <dc:call-macro name="SQL-wst_columns_statement"/> 115 <dc:call-macro name="SQL-wst_columns_statement"/>
116 <dc:elements> 116 <dc:for-each>
117 <column> 117 <column>
118 <dc:attribute name="name" value="${prot_column_name}"/> 118 <dc:attribute name="name" value="${prot_column_name}"/>
119 <dc:attribute name="ids" value="base_data-wstv-${prot_rel_pos}-${prot_id}"/> 119 <dc:attribute name="ids" value="base_data-wstv-${prot_rel_pos}-${prot_id}"/>
120 <dc:attribute name="factory" value="wqinterpol"/> 120 <dc:attribute name="factory" value="wqinterpol"/>
121 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> 121 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/>
122 </column> 122 </column>
123 </dc:elements> 123 </dc:for-each>
124 </dc:context> 124 </dc:context>
125 </basedata> 125 </basedata>
126 </dc:elements> 126 </dc:for-each>
127 </dc:context> 127 </dc:context>
128 </basedata> 128 </basedata>
129 </dc:call-macro> 129 </dc:call-macro>
130 </dc:macro> 130 </dc:macro>
131 131
137 <dc:statement> 137 <dc:statement>
138 SELECT id AS prot_id, 138 SELECT id AS prot_id,
139 description AS prot_description 139 description AS prot_description
140 FROM wsts WHERE kind = 1 AND river_id = ${river_id} 140 FROM wsts WHERE kind = 1 AND river_id = ${river_id}
141 </dc:statement> 141 </dc:statement>
142 <dc:elements> 142 <dc:for-each>
143 <additional> 143 <additional>
144 <dc:attribute name="name" value="${prot_description}"/> 144 <dc:attribute name="name" value="${prot_description}"/>
145 <dc:context> 145 <dc:context>
146 <dc:call-macro name="SQL-wst_columns_statement"/> 146 <dc:call-macro name="SQL-wst_columns_statement"/>
147 <dc:elements> 147 <dc:for-each>
148 <column> 148 <column>
149 <dc:attribute name="name" value="${prot_column_name}"/> 149 <dc:attribute name="name" value="${prot_column_name}"/>
150 <dc:attribute name="ids" value="additionalsmarks-wstv-${prot_rel_pos}-${prot_id}"/> 150 <dc:attribute name="ids" value="additionalsmarks-wstv-${prot_rel_pos}-${prot_id}"/>
151 <dc:attribute name="factory" value="staticwkms"/> 151 <dc:attribute name="factory" value="staticwkms"/>
152 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> 152 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/>
153 </column> 153 </column>
154 </dc:elements> 154 </dc:for-each>
155 </dc:context> 155 </dc:context>
156 </additional> 156 </additional>
157 </dc:elements> 157 </dc:for-each>
158 </dc:context> 158 </dc:context>
159 </additionals> 159 </additionals>
160 </dc:call-macro> 160 </dc:call-macro>
161 </dc:macro> 161 </dc:macro>
162 162
168 <dc:statement> 168 <dc:statement>
169 SELECT id AS prot_id, 169 SELECT id AS prot_id,
170 description AS prot_description 170 description AS prot_description
171 FROM wsts WHERE kind = 1 AND river_id = ${river_id} 171 FROM wsts WHERE kind = 1 AND river_id = ${river_id}
172 </dc:statement> 172 </dc:statement>
173 <dc:elements> 173 <dc:for-each>
174 <additional> 174 <additional>
175 <dc:attribute name="name" value="${prot_description}"/> 175 <dc:attribute name="name" value="${prot_description}"/>
176 <dc:context> 176 <dc:context>
177 <dc:call-macro name="SQL-wst_columns_statement"/> 177 <dc:call-macro name="SQL-wst_columns_statement"/>
178 <dc:elements> 178 <dc:for-each>
179 <column> 179 <column>
180 <dc:attribute name="name" value="${prot_column_name}"/> 180 <dc:attribute name="name" value="${prot_column_name}"/>
181 <dc:attribute name="ids" value="additionals-wstv-${prot_rel_pos}-${prot_id}"/> 181 <dc:attribute name="ids" value="additionals-wstv-${prot_rel_pos}-${prot_id}"/>
182 <dc:attribute name="factory" value="staticwkms"/> 182 <dc:attribute name="factory" value="staticwkms"/>
183 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> 183 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/>
184 </column> 184 </column>
185 </dc:elements> 185 </dc:for-each>
186 </dc:context> 186 </dc:context>
187 </additional> 187 </additional>
188 </dc:elements> 188 </dc:for-each>
189 </dc:context> 189 </dc:context>
190 </additionals> 190 </additionals>
191 </dc:call-macro> 191 </dc:call-macro>
192 </dc:macro> 192 </dc:macro>
193 193
199 <dc:statement> 199 <dc:statement>
200 SELECT id AS prot_id, 200 SELECT id AS prot_id,
201 description AS prot_description 201 description AS prot_description
202 FROM wsts WHERE kind = 1 AND river_id = ${river_id} 202 FROM wsts WHERE kind = 1 AND river_id = ${river_id}
203 </dc:statement> 203 </dc:statement>
204 <dc:elements> 204 <dc:for-each>
205 <relativepoint> 205 <relativepoint>
206 <dc:attribute name="name" value="${prot_description}"/> 206 <dc:attribute name="name" value="${prot_description}"/>
207 <dc:context> 207 <dc:context>
208 <dc:call-macro name="SQL-wst_columns_statement"/> 208 <dc:call-macro name="SQL-wst_columns_statement"/>
209 <dc:elements> 209 <dc:for-each>
210 <column> 210 <column>
211 <dc:attribute name="name" value="${prot_column_name}"/> 211 <dc:attribute name="name" value="${prot_column_name}"/>
212 <dc:attribute name="ids" value="additionals-wstv-${prot_rel_pos}-${prot_id}"/> 212 <dc:attribute name="ids" value="additionals-wstv-${prot_rel_pos}-${prot_id}"/>
213 <dc:attribute name="factory" value="staticwkms"/> 213 <dc:attribute name="factory" value="staticwkms"/>
214 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> 214 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/>
215 </column> 215 </column>
216 </dc:elements> 216 </dc:for-each>
217 </dc:context> 217 </dc:context>
218 </relativepoint> 218 </relativepoint>
219 </dc:elements> 219 </dc:for-each>
220 </dc:context> 220 </dc:context>
221 </additionals> 221 </additionals>
222 </dc:call-macro> 222 </dc:call-macro>
223 </dc:macro> 223 </dc:macro>
224 224
229 <dc:statement> 229 <dc:statement>
230 SELECT id AS prot_id, 230 SELECT id AS prot_id,
231 description AS prot_description 231 description AS prot_description
232 FROM wsts WHERE kind = 2 AND river_id = ${river_id} 232 FROM wsts WHERE kind = 2 AND river_id = ${river_id}
233 </dc:statement> 233 </dc:statement>
234 <dc:elements> 234 <dc:for-each>
235 <fixation> 235 <fixation>
236 <dc:attribute name="name" value="${prot_description}"/> 236 <dc:attribute name="name" value="${prot_description}"/>
237 <!--dc:attribute name="ids" value="fixations-wstv-A-${prot_id}"/--> 237 <!--dc:attribute name="ids" value="fixations-wstv-A-${prot_id}"/-->
238 <dc:context> 238 <dc:context>
239 <dc:call-macro name="SQL-wst_columns_statement"/> 239 <dc:call-macro name="SQL-wst_columns_statement"/>
240 <dc:elements> 240 <dc:for-each>
241 <column> 241 <column>
242 <dc:attribute name="name" value="${prot_column_name}"/> 242 <dc:attribute name="name" value="${prot_column_name}"/>
243 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/> 243 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/>
244 <dc:attribute name="factory" value="wqinterpol"/> 244 <dc:attribute name="factory" value="wqinterpol"/>
245 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> 245 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/>
246 </column> 246 </column>
247 </dc:elements> 247 </dc:for-each>
248 </dc:context> 248 </dc:context>
249 </fixation> 249 </fixation>
250 </dc:elements> 250 </dc:for-each>
251 </dc:context> 251 </dc:context>
252 </fixations> 252 </fixations>
253 </dc:call-macro> 253 </dc:call-macro>
254 </dc:macro> 254 </dc:macro>
255 255
260 <dc:statement> 260 <dc:statement>
261 SELECT id AS prot_id, 261 SELECT id AS prot_id,
262 description AS prot_description 262 description AS prot_description
263 FROM wsts WHERE kind = 2 AND river_id = ${river_id} 263 FROM wsts WHERE kind = 2 AND river_id = ${river_id}
264 </dc:statement> 264 </dc:statement>
265 <dc:elements> 265 <dc:for-each>
266 <fixation> 266 <fixation>
267 <dc:attribute name="name" value="${prot_description}"/> 267 <dc:attribute name="name" value="${prot_description}"/>
268 <dc:context> 268 <dc:context>
269 <dc:call-macro name="SQL-wst_columns_statement"/> 269 <dc:call-macro name="SQL-wst_columns_statement"/>
270 <dc:elements> 270 <dc:for-each>
271 <column> 271 <column>
272 <dc:attribute name="name" value="${prot_column_name}"/> 272 <dc:attribute name="name" value="${prot_column_name}"/>
273 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/> 273 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/>
274 <dc:attribute name="factory" value="wqinterpol"/> 274 <dc:attribute name="factory" value="wqinterpol"/>
275 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> 275 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/>
276 </column> 276 </column>
277 </dc:elements> 277 </dc:for-each>
278 </dc:context> 278 </dc:context>
279 </fixation> 279 </fixation>
280 </dc:elements> 280 </dc:for-each>
281 </dc:context> 281 </dc:context>
282 </fixations> 282 </fixations>
283 </dc:call-macro> 283 </dc:call-macro>
284 </dc:macro> 284 </dc:macro>
285 285
290 <dc:statement> 290 <dc:statement>
291 SELECT id AS prot_id, 291 SELECT id AS prot_id,
292 description AS prot_description 292 description AS prot_description
293 FROM wsts WHERE kind = 2 AND river_id = ${river_id} 293 FROM wsts WHERE kind = 2 AND river_id = ${river_id}
294 </dc:statement> 294 </dc:statement>
295 <dc:elements> 295 <dc:for-each>
296 <fixation> 296 <fixation>
297 <dc:attribute name="name" value="${prot_description}"/> 297 <dc:attribute name="name" value="${prot_description}"/>
298 <dc:context> 298 <dc:context>
299 <dc:call-macro name="SQL-wst_columns_statement"/> 299 <dc:call-macro name="SQL-wst_columns_statement"/>
300 <dc:elements> 300 <dc:for-each>
301 <column> 301 <column>
302 <dc:attribute name="name" value="${prot_column_name}"/> 302 <dc:attribute name="name" value="${prot_column_name}"/>
303 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/> 303 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/>
304 <dc:attribute name="factory" value="staticwkms"/> 304 <dc:attribute name="factory" value="staticwkms"/>
305 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> 305 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/>
306 </column> 306 </column>
307 </dc:elements> 307 </dc:for-each>
308 </dc:context> 308 </dc:context>
309 </fixation> 309 </fixation>
310 </dc:elements> 310 </dc:for-each>
311 </dc:context> 311 </dc:context>
312 </fixations> 312 </fixations>
313 </dc:call-macro> 313 </dc:call-macro>
314 </dc:macro> 314 </dc:macro>
315 315
320 <dc:statement> 320 <dc:statement>
321 SELECT id AS prot_id, 321 SELECT id AS prot_id,
322 description AS prot_description 322 description AS prot_description
323 FROM wsts WHERE kind = 2 AND river_id = ${river_id} 323 FROM wsts WHERE kind = 2 AND river_id = ${river_id}
324 </dc:statement> 324 </dc:statement>
325 <dc:elements> 325 <dc:for-each>
326 <relativepoint> 326 <relativepoint>
327 <dc:attribute name="name" value="${prot_description}"/> 327 <dc:attribute name="name" value="${prot_description}"/>
328 <dc:context> 328 <dc:context>
329 <dc:call-macro name="SQL-wst_columns_statement"/> 329 <dc:call-macro name="SQL-wst_columns_statement"/>
330 <dc:elements> 330 <dc:for-each>
331 <column> 331 <column>
332 <dc:attribute name="name" value="${prot_column_name}"/> 332 <dc:attribute name="name" value="${prot_column_name}"/>
333 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/> 333 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/>
334 <dc:attribute name="factory" value="staticwkms"/> 334 <dc:attribute name="factory" value="staticwkms"/>
335 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> 335 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/>
336 </column> 336 </column>
337 </dc:elements> 337 </dc:for-each>
338 </dc:context> 338 </dc:context>
339 </relativepoint> 339 </relativepoint>
340 </dc:elements> 340 </dc:for-each>
341 </dc:context> 341 </dc:context>
342 </fixations> 342 </fixations>
343 </dc:call-macro> 343 </dc:call-macro>
344 </dc:macro> 344 </dc:macro>
345 345
351 <dc:statement> 351 <dc:statement>
352 SELECT id AS prot_id, 352 SELECT id AS prot_id,
353 description AS prot_description 353 description AS prot_description
354 FROM wsts WHERE kind = 3 AND river_id = ${river_id} 354 FROM wsts WHERE kind = 3 AND river_id = ${river_id}
355 </dc:statement> 355 </dc:statement>
356 <dc:elements> 356 <dc:for-each>
357 <official> 357 <official>
358 <dc:attribute name="name" value="${prot_description}"/> 358 <dc:attribute name="name" value="${prot_description}"/>
359 <dc:context> 359 <dc:context>
360 <dc:call-macro name="SQL-wst_columns_statement"/> 360 <dc:call-macro name="SQL-wst_columns_statement"/>
361 <dc:elements> 361 <dc:for-each>
362 <column> 362 <column>
363 <dc:attribute name="name" value="${prot_column_name}"/> 363 <dc:attribute name="name" value="${prot_column_name}"/>
364 <dc:attribute name="ids" value="additionals-wstv-${prot_rel_pos}-${prot_id}"/> 364 <dc:attribute name="ids" value="additionals-wstv-${prot_rel_pos}-${prot_id}"/>
365 <dc:attribute name="factory" value="staticwqkms"/> 365 <dc:attribute name="factory" value="staticwqkms"/>
366 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> 366 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/>
367 </column> 367 </column>
368 </dc:elements> 368 </dc:for-each>
369 </dc:context> 369 </dc:context>
370 </official> 370 </official>
371 </dc:elements> 371 </dc:for-each>
372 </dc:context> 372 </dc:context>
373 </officiallines> 373 </officiallines>
374 </dc:call-macro> 374 </dc:call-macro>
375 </dc:macro> 375 </dc:macro>
376 376
381 <dc:statement> 381 <dc:statement>
382 SELECT id AS prot_id, 382 SELECT id AS prot_id,
383 description AS prot_description 383 description AS prot_description
384 FROM wsts WHERE kind = 4 AND river_id = ${river_id} 384 FROM wsts WHERE kind = 4 AND river_id = ${river_id}
385 </dc:statement> 385 </dc:statement>
386 <dc:elements> 386 <dc:for-each>
387 <relativepoint> 387 <relativepoint>
388 <dc:attribute name="name" value="${prot_description}"/> 388 <dc:attribute name="name" value="${prot_description}"/>
389 <dc:context> 389 <dc:context>
390 <dc:call-macro name="SQL-wst_columns_statement"/> 390 <dc:call-macro name="SQL-wst_columns_statement"/>
391 <dc:elements> 391 <dc:for-each>
392 <column> 392 <column>
393 <dc:attribute name="name" value="${prot_column_name}"/> 393 <dc:attribute name="name" value="${prot_column_name}"/>
394 <dc:attribute name="ids" value="heightmarks_points-wstv-${prot_rel_pos}-${prot_id}"/> 394 <dc:attribute name="ids" value="heightmarks_points-wstv-${prot_rel_pos}-${prot_id}"/>
395 <dc:attribute name="factory" value="staticwkms"/> 395 <dc:attribute name="factory" value="staticwkms"/>
396 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> 396 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/>
397 </column> 397 </column>
398 </dc:elements> 398 </dc:for-each>
399 </dc:context> 399 </dc:context>
400 </relativepoint> 400 </relativepoint>
401 </dc:elements> 401 </dc:for-each>
402 </dc:context> 402 </dc:context>
403 </heightmarks> 403 </heightmarks>
404 </dc:call-macro> 404 </dc:call-macro>
405 </dc:macro> 405 </dc:macro>
406 406
411 <dc:statement> 411 <dc:statement>
412 SELECT id AS prot_id, 412 SELECT id AS prot_id,
413 description AS prot_description 413 description AS prot_description
414 FROM wsts WHERE kind = 4 AND river_id = ${river_id} 414 FROM wsts WHERE kind = 4 AND river_id = ${river_id}
415 </dc:statement> 415 </dc:statement>
416 <dc:elements> 416 <dc:for-each>
417 <heightmark> 417 <heightmark>
418 <dc:attribute name="name" value="${prot_description}"/> 418 <dc:attribute name="name" value="${prot_description}"/>
419 <dc:context> 419 <dc:context>
420 <dc:call-macro name="SQL-wst_columns_statement"/> 420 <dc:call-macro name="SQL-wst_columns_statement"/>
421 <dc:elements> 421 <dc:for-each>
422 <column> 422 <column>
423 <dc:attribute name="name" value="${prot_column_name}"/> 423 <dc:attribute name="name" value="${prot_column_name}"/>
424 <dc:attribute name="ids" value="heightmarks_points-wstv-${prot_rel_pos}-${prot_id}"/> 424 <dc:attribute name="ids" value="heightmarks_points-wstv-${prot_rel_pos}-${prot_id}"/>
425 <dc:attribute name="factory" value="staticwkms"/> 425 <dc:attribute name="factory" value="staticwkms"/>
426 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> 426 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/>
427 </column> 427 </column>
428 </dc:elements> 428 </dc:for-each>
429 </dc:context> 429 </dc:context>
430 </heightmark> 430 </heightmark>
431 </dc:elements> 431 </dc:for-each>
432 </dc:context> 432 </dc:context>
433 </heightmarks> 433 </heightmarks>
434 </dc:call-macro> 434 </dc:call-macro>
435 </dc:macro> 435 </dc:macro>
436 436
441 <dc:statement> 441 <dc:statement>
442 SELECT id AS prot_id, 442 SELECT id AS prot_id,
443 description AS prot_description 443 description AS prot_description
444 FROM wsts WHERE kind = 4 AND river_id = ${river_id} 444 FROM wsts WHERE kind = 4 AND river_id = ${river_id}
445 </dc:statement> 445 </dc:statement>
446 <dc:elements> 446 <dc:for-each>
447 <heightmark> 447 <heightmark>
448 <dc:attribute name="name" value="${prot_description}"/> 448 <dc:attribute name="name" value="${prot_description}"/>
449 <dc:context> 449 <dc:context>
450 <dc:call-macro name="SQL-wst_columns_statement"/> 450 <dc:call-macro name="SQL-wst_columns_statement"/>
451 <dc:elements> 451 <dc:for-each>
452 <column> 452 <column>
453 <dc:attribute name="name" value="${prot_column_name}"/> 453 <dc:attribute name="name" value="${prot_column_name}"/>
454 <dc:attribute name="ids" value="heightmarks_annotations-wstv-${prot_rel_pos}-${prot_id}"/> 454 <dc:attribute name="ids" value="heightmarks_annotations-wstv-${prot_rel_pos}-${prot_id}"/>
455 <dc:attribute name="factory" value="wqinterpol"/> 455 <dc:attribute name="factory" value="wqinterpol"/>
456 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> 456 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/>
457 </column> 457 </column>
458 </dc:elements> 458 </dc:for-each>
459 </dc:context> 459 </dc:context>
460 </heightmark> 460 </heightmark>
461 </dc:elements> 461 </dc:for-each>
462 </dc:context> 462 </dc:context>
463 </heightmarks> 463 </heightmarks>
464 </dc:call-macro> 464 </dc:call-macro>
465 </dc:macro> 465 </dc:macro>
466 466
472 <dc:statement> 472 <dc:statement>
473 SELECT id AS prot_id, 473 SELECT id AS prot_id,
474 description AS prot_description 474 description AS prot_description
475 FROM wsts WHERE kind = 5 AND river_id = ${river_id} 475 FROM wsts WHERE kind = 5 AND river_id = ${river_id}
476 </dc:statement> 476 </dc:statement>
477 <dc:elements> 477 <dc:for-each>
478 <relativepoint> 478 <relativepoint>
479 <dc:attribute name="name" value="${prot_description}"/> 479 <dc:attribute name="name" value="${prot_description}"/>
480 <dc:attribute name="db-id" value="${prot_id}"/> 480 <dc:attribute name="db-id" value="${prot_id}"/>
481 <dc:attribute name="factory" value="staticwkms"/> 481 <dc:attribute name="factory" value="staticwkms"/>
482 <columns> 482 <columns>
483 <dc:context> 483 <dc:context>
484 <dc:call-macro name="SQL-wst_columns_statement"/> 484 <dc:call-macro name="SQL-wst_columns_statement"/>
485 <dc:elements> 485 <dc:for-each>
486 <column> 486 <column>
487 <dc:attribute name="name" value="${prot_column_name}"/> 487 <dc:attribute name="name" value="${prot_column_name}"/>
488 <dc:attribute name="ids" value="flood_protection-wstv-${prot_rel_pos}-${prot_id}"/> 488 <dc:attribute name="ids" value="flood_protection-wstv-${prot_rel_pos}-${prot_id}"/>
489 <dc:attribute name="factory" value="staticwkms"/> 489 <dc:attribute name="factory" value="staticwkms"/>
490 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> 490 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/>
491 </column> 491 </column>
492 </dc:elements> 492 </dc:for-each>
493 </dc:context> 493 </dc:context>
494 </columns> 494 </columns>
495 </relativepoint> 495 </relativepoint>
496 </dc:elements> 496 </dc:for-each>
497 </dc:context> 497 </dc:context>
498 </flood_protections> 498 </flood_protections>
499 </dc:call-macro> 499 </dc:call-macro>
500 </dc:macro> 500 </dc:macro>
501 501
507 <dc:statement> 507 <dc:statement>
508 SELECT id AS prot_id, 508 SELECT id AS prot_id,
509 description AS prot_description 509 description AS prot_description
510 FROM wsts WHERE kind = 5 AND river_id = ${river_id} 510 FROM wsts WHERE kind = 5 AND river_id = ${river_id}
511 </dc:statement> 511 </dc:statement>
512 <dc:elements> 512 <dc:for-each>
513 <flood_protection> 513 <flood_protection>
514 <dc:attribute name="name" value="${prot_description}"/> 514 <dc:attribute name="name" value="${prot_description}"/>
515 <dc:attribute name="db-id" value="${prot_id}"/> 515 <dc:attribute name="db-id" value="${prot_id}"/>
516 <dc:attribute name="factory" value="staticwkms"/> 516 <dc:attribute name="factory" value="staticwkms"/>
517 <dc:context> 517 <dc:context>
518 <dc:call-macro name="SQL-wst_columns_statement"/> 518 <dc:call-macro name="SQL-wst_columns_statement"/>
519 <dc:elements> 519 <dc:for-each>
520 <column> 520 <column>
521 <dc:attribute name="name" value="${prot_column_name}"/> 521 <dc:attribute name="name" value="${prot_column_name}"/>
522 <dc:attribute name="ids" value="flood_protection-wstv-${prot_rel_pos}-${prot_id}"/> 522 <dc:attribute name="ids" value="flood_protection-wstv-${prot_rel_pos}-${prot_id}"/>
523 <dc:attribute name="factory" value="staticwkms"/> 523 <dc:attribute name="factory" value="staticwkms"/>
524 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> 524 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/>
525 </column> 525 </column>
526 </dc:elements> 526 </dc:for-each>
527 </dc:context> 527 </dc:context>
528 </flood_protection> 528 </flood_protection>
529 </dc:elements> 529 </dc:for-each>
530 </dc:context> 530 </dc:context>
531 </flood_protections> 531 </flood_protections>
532 </dc:call-macro> 532 </dc:call-macro>
533 </dc:macro> 533 </dc:macro>
534 534
572 <dc:statement> 572 <dc:statement>
573 SELECT id AS anno_id, 573 SELECT id AS anno_id,
574 name AS anno_description 574 name AS anno_description
575 FROM annotation_types 575 FROM annotation_types
576 </dc:statement> 576 </dc:statement>
577 <dc:elements> 577 <dc:for-each>
578 <annotation> 578 <annotation>
579 <dc:attribute name="name" value="${anno_description}"/> 579 <dc:attribute name="name" value="${anno_description}"/>
580 <dc:attribute name="factory" value="annotations"/> 580 <dc:attribute name="factory" value="annotations"/>
581 <dc:attribute name="ids" value="${river_id}:${anno_description}"/> 581 <dc:attribute name="ids" value="${river_id}:${anno_description}"/>
582 </annotation> 582 </annotation>
583 </dc:elements> 583 </dc:for-each>
584 </dc:context> 584 </dc:context>
585 </annotations> 585 </annotations>
586 </dc:macro> 586 </dc:macro>
587 587
588 <dc:macro name="cross_sections"> 588 <dc:macro name="cross_sections">
597 FROM cross_sections cs 597 FROM cross_sections cs
598 JOIN cross_section_lines csl ON csl.cross_section_id = cs.id 598 JOIN cross_section_lines csl ON csl.cross_section_id = cs.id
599 WHERE cs.river_id = ${river_id} 599 WHERE cs.river_id = ${river_id}
600 AND csl.km BETWEEN ${fromkm} AND ${tokm} 600 AND csl.km BETWEEN ${fromkm} AND ${tokm}
601 </dc:statement> 601 </dc:statement>
602 <dc:elements> 602 <dc:for-each>
603 <cross_section> 603 <cross_section>
604 <dc:attribute name="name" value="${prot_description}"/> 604 <dc:attribute name="name" value="${prot_description}"/>
605 <dc:attribute name="ids" value="${prot_id}"/> 605 <dc:attribute name="ids" value="${prot_id}"/>
606 <dc:attribute name="factory" value="crosssections"/> 606 <dc:attribute name="factory" value="crosssections"/>
607 </cross_section> 607 </cross_section>
608 </dc:elements> 608 </dc:for-each>
609 </dc:context> 609 </dc:context>
610 </cross_sections> 610 </cross_sections>
611 </dc:call-macro> 611 </dc:call-macro>
612 </dc:macro> 612 </dc:macro>
613 613
623 FROM hyks h 623 FROM hyks h
624 JOIN hyk_entries he ON he.hyk_id = h.id 624 JOIN hyk_entries he ON he.hyk_id = h.id
625 WHERE river_id = ${river_id} 625 WHERE river_id = ${river_id}
626 AND he.km BETWEEN ${fromkm} AND ${tokm} 626 AND he.km BETWEEN ${fromkm} AND ${tokm}
627 </dc:statement> 627 </dc:statement>
628 <dc:elements> 628 <dc:for-each>
629 <hyk> 629 <hyk>
630 <dc:attribute name="name" value="${hyk_description}"/> 630 <dc:attribute name="name" value="${hyk_description}"/>
631 <dc:attribute name="ids" value="${hyk_id}"/> 631 <dc:attribute name="ids" value="${hyk_id}"/>
632 <dc:attribute name="factory" value="hyk"/> 632 <dc:attribute name="factory" value="hyk"/>
633 </hyk> 633 </hyk>
634 </dc:elements> 634 </dc:for-each>
635 </dc:context> 635 </dc:context>
636 </hyks> 636 </hyks>
637 </dc:call-macro> 637 </dc:call-macro>
638 </dc:macro> 638 </dc:macro>
639 639
644 <dc:statement> 644 <dc:statement>
645 SELECT id AS fvmid, 645 SELECT id AS fvmid,
646 description AS fvmd 646 description AS fvmd
647 FROM flow_velocity_measurements WHERE river_id = ${river_id} 647 FROM flow_velocity_measurements WHERE river_id = ${river_id}
648 </dc:statement> 648 </dc:statement>
649 <dc:elements> 649 <dc:for-each>
650 <flow_velocity_measurement> 650 <flow_velocity_measurement>
651 <dc:attribute name="name" value="${fvmd}"/> 651 <dc:attribute name="name" value="${fvmd}"/>
652 <dc:attribute name="ids" value="${fvmid}"/> 652 <dc:attribute name="ids" value="${fvmid}"/>
653 <dc:attribute name="factory" value="flowvelocity"/> 653 <dc:attribute name="factory" value="flowvelocity"/>
654 <dc:context> 654 <dc:context>
656 SELECT id, description, station, datetime, v, w, q 656 SELECT id, description, station, datetime, v, w, q
657 FROM flow_velocity_measure_values 657 FROM flow_velocity_measure_values
658 WHERE measurements_id = ${fvmid} 658 WHERE measurements_id = ${fvmid}
659 AND station BETWEEN ${fromkm} AND ${tokm} 659 AND station BETWEEN ${fromkm} AND ${tokm}
660 </dc:statement> 660 </dc:statement>
661 <dc:elements> 661 <dc:for-each>
662 <measurement_value> 662 <measurement_value>
663 <dc:attribute name="name" value="${id}-${description}-${station}-${datetime}"/> 663 <dc:attribute name="name" value="${id}-${description}-${station}-${datetime}"/>
664 <dc:attribute name="ids" value="${id}"/> 664 <dc:attribute name="ids" value="${id}"/>
665 <dc:attribute name="factory" value="flowvelocity"/> 665 <dc:attribute name="factory" value="flowvelocity"/>
666 </measurement_value> 666 </measurement_value>
667 </dc:elements> 667 </dc:for-each>
668 </dc:context> 668 </dc:context>
669 </flow_velocity_measurement> 669 </flow_velocity_measurement>
670 </dc:elements> 670 </dc:for-each>
671 </dc:context> 671 </dc:context>
672 </flowvelocitymeasurement> 672 </flowvelocitymeasurement>
673 </dc:call-macro> 673 </dc:call-macro>
674 </dc:macro> 674 </dc:macro>
675 675
680 SELECT id AS bedh_id, 680 SELECT id AS bedh_id,
681 year AS bedh_year, 681 year AS bedh_year,
682 description AS bedh_descr 682 description AS bedh_descr
683 FROM bed_height_single WHERE river_id = ${river_id} 683 FROM bed_height_single WHERE river_id = ${river_id}
684 </dc:statement> 684 </dc:statement>
685 <dc:elements> 685 <dc:for-each>
686 <height> 686 <height>
687 <dc:attribute name="factory" value="bedheight"/> 687 <dc:attribute name="factory" value="bedheight"/>
688 <dc:attribute name="ids" value="bedheight-singlevalues-${bedh_id}-${bedh_year}"/> 688 <dc:attribute name="ids" value="bedheight-singlevalues-${bedh_id}-${bedh_year}"/>
689 <dc:attribute name="description" value="${bedh_descr}"/> 689 <dc:attribute name="description" value="${bedh_descr}"/>
690 </height> 690 </height>
691 </dc:elements> 691 </dc:for-each>
692 </dc:context> 692 </dc:context>
693 </soundings_width> 693 </soundings_width>
694 </dc:macro> 694 </dc:macro>
695 695
696 <dc:macro name="longitudinal-section-prototype"> 696 <dc:macro name="longitudinal-section-prototype">
854 <dc:statement> 854 <dc:statement>
855 SELECT id AS gauge_id, 855 SELECT id AS gauge_id,
856 name AS gauge_name 856 name AS gauge_name
857 FROM gauges WHERE river_id = ${river_id} 857 FROM gauges WHERE river_id = ${river_id}
858 </dc:statement> 858 </dc:statement>
859 <dc:elements> 859 <dc:for-each>
860 <gauge> 860 <gauge>
861 <dc:attribute name="name" value="${gauge_name}"/> 861 <dc:attribute name="name" value="${gauge_name}"/>
862 <dc:attribute name="db-id" value="${gauge_id}"/> 862 <dc:attribute name="db-id" value="${gauge_id}"/>
863 <dc:attribute name="factory" value="gaugedischarge"/> 863 <dc:attribute name="factory" value="gaugedischarge"/>
864 <dc:attribute name="from" value="${g_start}"/> 864 <dc:attribute name="from" value="${g_start}"/>
877 ti.stop_time AS g_stop 877 ti.stop_time AS g_stop
878 FROM discharge_tables d JOIN time_intervals ti 878 FROM discharge_tables d JOIN time_intervals ti
879 ON d.time_interval_id = ti.id 879 ON d.time_interval_id = ti.id
880 WHERE d.gauge_id = ${gauge_id} AND d.kind = 1 880 WHERE d.gauge_id = ${gauge_id} AND d.kind = 1
881 </dc:statement> 881 </dc:statement>
882 <dc:elements> 882 <dc:for-each>
883 <historical> 883 <historical>
884 <dc:attribute name="name" value="${gauge_desc}"/> 884 <dc:attribute name="name" value="${gauge_desc}"/>
885 <dc:attribute name="factory" value="gaugedischarge"/> 885 <dc:attribute name="factory" value="gaugedischarge"/>
886 <dc:attribute name="from" value="${g_start}"/> 886 <dc:attribute name="from" value="${g_start}"/>
887 <dc:attribute name="to" value="${g_stop}"/> 887 <dc:attribute name="to" value="${g_stop}"/>
888 <dc:attribute name="ids" value="${discharge_id}-${g_start}-${g_stop}"/> 888 <dc:attribute name="ids" value="${discharge_id}-${g_start}-${g_stop}"/>
889 </historical> 889 </historical>
890 </dc:elements> 890 </dc:for-each>
891 </dc:context> 891 </dc:context>
892 </gauge> 892 </gauge>
893 --> 893 -->
894 </dc:elements> 894 </dc:for-each>
895 </dc:context> 895 </dc:context>
896 </discharge_table_gauge> 896 </discharge_table_gauge>
897 897
898 </discharge_table_nn> 898 </discharge_table_nn>
899 899
920 <dc:statement> 920 <dc:statement>
921 SELECT id AS gauge_id, 921 SELECT id AS gauge_id,
922 name AS gauge_name 922 name AS gauge_name
923 FROM gauges WHERE river_id = ${river_id} 923 FROM gauges WHERE river_id = ${river_id}
924 </dc:statement> 924 </dc:statement>
925 <dc:elements> 925 <dc:for-each>
926 <gauge> 926 <gauge>
927 <dc:attribute name="name" value="${gauge_name}"/> 927 <dc:attribute name="name" value="${gauge_name}"/>
928 <dc:attribute name="db-id" value="${gauge_id}"/> 928 <dc:attribute name="db-id" value="${gauge_id}"/>
929 <dc:attribute name="factory" value="gaugedischarge"/> 929 <dc:attribute name="factory" value="gaugedischarge"/>
930 <dc:attribute name="from" value="${g_start}"/> 930 <dc:attribute name="from" value="${g_start}"/>
931 <dc:attribute name="to" value="${g_stop}"/> 931 <dc:attribute name="to" value="${g_stop}"/>
932 <dc:attribute name="ids" value="${gauge_name}"/> 932 <dc:attribute name="ids" value="${gauge_name}"/>
933 </gauge> 933 </gauge>
934 </dc:elements> 934 </dc:for-each>
935 </dc:context> 935 </dc:context>
936 </discharge_table_gauge> 936 </discharge_table_gauge>
937 </discharge_table_nn> 937 </discharge_table_nn>
938 </dc:if> 938 </dc:if>
939 939
987 FROM dem d 987 FROM dem d
988 JOIN ranges r ON d.range_id = r.id 988 JOIN ranges r ON d.range_id = r.id
989 JOIN time_intervals t ON d.time_interval_id = t.id 989 JOIN time_intervals t ON d.time_interval_id = t.id
990 WHERE d.river_id = ${river_id} 990 WHERE d.river_id = ${river_id}
991 </dc:statement> 991 </dc:statement>
992 <dc:elements> 992 <dc:for-each>
993 <dem> 993 <dem>
994 <dc:attribute name="factory" value="demfactory"/> 994 <dc:attribute name="factory" value="demfactory"/>
995 <dc:attribute name="ids" value="${dem_id}"/> 995 <dc:attribute name="ids" value="${dem_id}"/>
996 <dc:attribute name="name" value="${name}"/> 996 <dc:attribute name="name" value="${name}"/>
997 <dc:attribute name="info" value="${info}"/> 997 <dc:attribute name="info" value="${info}"/>
998 </dem> 998 </dem>
999 </dc:elements> 999 </dc:for-each>
1000 </dc:context> 1000 </dc:context>
1001 </dems> 1001 </dems>
1002 </dc:macro> 1002 </dc:macro>
1003 <dc:macro name="flood-map-hws-lines"> 1003 <dc:macro name="flood-map-hws-lines">
1004 <dc:context> 1004 <dc:context>
1011 WHERE river_id = ${river_id} 1011 WHERE river_id = ${river_id}
1012 </dc:statement> 1012 </dc:statement>
1013 <lines> 1013 <lines>
1014 <official> 1014 <official>
1015 <Durchlass> 1015 <Durchlass>
1016 <dc:elements filter="$hws_kind=1 and $hws_official=1"> 1016 <dc:for-each filter="$hws_kind=1 and $hws_official=1">
1017 <hws> 1017 <hws>
1018 <dc:attribute name="factory" value="hwsfactory"/> 1018 <dc:attribute name="factory" value="hwsfactory"/>
1019 <dc:attribute name="name" value="${hws_name}"/> 1019 <dc:attribute name="name" value="${hws_name}"/>
1020 </hws> 1020 </hws>
1021 </dc:elements> 1021 </dc:for-each>
1022 </Durchlass> 1022 </Durchlass>
1023 <Damm> 1023 <Damm>
1024 <dc:elements filter="$hws_kind=2 and $hws_official=1"> 1024 <dc:for-each filter="$hws_kind=2 and $hws_official=1">
1025 <hws> 1025 <hws>
1026 <dc:attribute name="factory" value="hwsfactory"/> 1026 <dc:attribute name="factory" value="hwsfactory"/>
1027 <dc:attribute name="name" value="${hws_name}"/> 1027 <dc:attribute name="name" value="${hws_name}"/>
1028 </hws> 1028 </hws>
1029 </dc:elements> 1029 </dc:for-each>
1030 </Damm> 1030 </Damm>
1031 <Graben> 1031 <Graben>
1032 <dc:elements filter="$hws_kind=3 and $hws_official=1"> 1032 <dc:for-each filter="$hws_kind=3 and $hws_official=1">
1033 <hws> 1033 <hws>
1034 <dc:attribute name="factory" value="hwsfactory"/> 1034 <dc:attribute name="factory" value="hwsfactory"/>
1035 <dc:attribute name="name" value="${hws_name}"/> 1035 <dc:attribute name="name" value="${hws_name}"/>
1036 </hws> 1036 </hws>
1037 </dc:elements> 1037 </dc:for-each>
1038 </Graben> 1038 </Graben>
1039 </official> 1039 </official>
1040 <inofficial> 1040 <inofficial>
1041 <Durchlass> 1041 <Durchlass>
1042 <dc:elements filter="$hws_kind=1 and $hws_official=0"> 1042 <dc:for-each filter="$hws_kind=1 and $hws_official=0">
1043 <hws> 1043 <hws>
1044 <dc:attribute name="factory" value="hwsfactory"/> 1044 <dc:attribute name="factory" value="hwsfactory"/>
1045 <dc:attribute name="name" value="${hws_name}"/> 1045 <dc:attribute name="name" value="${hws_name}"/>
1046 </hws> 1046 </hws>
1047 </dc:elements> 1047 </dc:for-each>
1048 </Durchlass> 1048 </Durchlass>
1049 <Damm> 1049 <Damm>
1050 <dc:elements filter="$hws_kind=2 and $hws_official=0"> 1050 <dc:for-each filter="$hws_kind=2 and $hws_official=0">
1051 <hws> 1051 <hws>
1052 <dc:attribute name="factory" value="hwsfactory"/> 1052 <dc:attribute name="factory" value="hwsfactory"/>
1053 <dc:attribute name="name" value="${hws_name}"/> 1053 <dc:attribute name="name" value="${hws_name}"/>
1054 </hws> 1054 </hws>
1055 </dc:elements> 1055 </dc:for-each>
1056 </Damm> 1056 </Damm>
1057 <Graben> 1057 <Graben>
1058 <dc:elements filter="$hws_kind=3 and $hws_official=0"> 1058 <dc:for-each filter="$hws_kind=3 and $hws_official=0">
1059 <hws> 1059 <hws>
1060 <dc:attribute name="factory" value="hwsfactory"/> 1060 <dc:attribute name="factory" value="hwsfactory"/>
1061 <dc:attribute name="name" value="${hws_name}"/> 1061 <dc:attribute name="name" value="${hws_name}"/>
1062 </hws> 1062 </hws>
1063 </dc:elements> 1063 </dc:for-each>
1064 </Graben> 1064 </Graben>
1065 </inofficial> 1065 </inofficial>
1066 </lines> 1066 </lines>
1067 </dc:context> 1067 </dc:context>
1068 </dc:macro> 1068 </dc:macro>
1077 WHERE river_id = ${river_id} 1077 WHERE river_id = ${river_id}
1078 </dc:statement> 1078 </dc:statement>
1079 <points> 1079 <points>
1080 <official> 1080 <official>
1081 <Durchlass> 1081 <Durchlass>
1082 <dc:elements filter="$hws_points_kind=1 and $hws_points_official=1"> 1082 <dc:for-each filter="$hws_points_kind=1 and $hws_points_official=1">
1083 <hws> 1083 <hws>
1084 <dc:attribute name="factory" value="hwsfactory"/> 1084 <dc:attribute name="factory" value="hwsfactory"/>
1085 <dc:attribute name="name" value="${hws_points_name}"/> 1085 <dc:attribute name="name" value="${hws_points_name}"/>
1086 </hws> 1086 </hws>
1087 </dc:elements> 1087 </dc:for-each>
1088 </Durchlass> 1088 </Durchlass>
1089 <Damm> 1089 <Damm>
1090 <dc:elements filter="$hws_points_kind=2 and $hws_points_official=1"> 1090 <dc:for-each filter="$hws_points_kind=2 and $hws_points_official=1">
1091 <hws> 1091 <hws>
1092 <dc:attribute name="factory" value="hwsfactory"/> 1092 <dc:attribute name="factory" value="hwsfactory"/>
1093 <dc:attribute name="name" value="${hws_points_name}"/> 1093 <dc:attribute name="name" value="${hws_points_name}"/>
1094 </hws> 1094 </hws>
1095 </dc:elements> 1095 </dc:for-each>
1096 </Damm> 1096 </Damm>
1097 <Graben> 1097 <Graben>
1098 <dc:elements filter="$hws_kind=3 and $hws_official=1"> 1098 <dc:for-each filter="$hws_kind=3 and $hws_official=1">
1099 <hws> 1099 <hws>
1100 <dc:attribute name="factory" value="hwsfactory"/> 1100 <dc:attribute name="factory" value="hwsfactory"/>
1101 <dc:attribute name="name" value="${hws_points_name}"/> 1101 <dc:attribute name="name" value="${hws_points_name}"/>
1102 </hws> 1102 </hws>
1103 </dc:elements> 1103 </dc:for-each>
1104 </Graben> 1104 </Graben>
1105 </official> 1105 </official>
1106 <inofficial> 1106 <inofficial>
1107 <Durchlass> 1107 <Durchlass>
1108 <dc:elements filter="$hws_points_kind=1 and $hws_points_official=0"> 1108 <dc:for-each filter="$hws_points_kind=1 and $hws_points_official=0">
1109 <hws> 1109 <hws>
1110 <dc:attribute name="factory" value="hwsfactory"/> 1110 <dc:attribute name="factory" value="hwsfactory"/>
1111 <dc:attribute name="name" value="${hws_points_name}"/> 1111 <dc:attribute name="name" value="${hws_points_name}"/>
1112 </hws> 1112 </hws>
1113 </dc:elements> 1113 </dc:for-each>
1114 </Durchlass> 1114 </Durchlass>
1115 <Damm> 1115 <Damm>
1116 <dc:elements filter="$hws_points_kind=2 and $hws_points_official=0"> 1116 <dc:for-each filter="$hws_points_kind=2 and $hws_points_official=0">
1117 <hws> 1117 <hws>
1118 <dc:attribute name="factory" value="hwsfactory"/> 1118 <dc:attribute name="factory" value="hwsfactory"/>
1119 <dc:attribute name="name" value="${hws_points_name}"/> 1119 <dc:attribute name="name" value="${hws_points_name}"/>
1120 </hws> 1120 </hws>
1121 </dc:elements> 1121 </dc:for-each>
1122 </Damm> 1122 </Damm>
1123 <Graben> 1123 <Graben>
1124 <dc:elements filter="$hws_points_kind=3 and $hws_points_official=0"> 1124 <dc:for-each filter="$hws_points_kind=3 and $hws_points_official=0">
1125 <hws> 1125 <hws>
1126 <dc:attribute name="factory" value="hwsfactory"/> 1126 <dc:attribute name="factory" value="hwsfactory"/>
1127 <dc:attribute name="name" value="${hws_points_name}"/> 1127 <dc:attribute name="name" value="${hws_points_name}"/>
1128 </hws> 1128 </hws>
1129 </dc:elements> 1129 </dc:for-each>
1130 </Graben> 1130 </Graben>
1131 </inofficial> 1131 </inofficial>
1132 </points> 1132 </points>
1133 </dc:context> 1133 </dc:context>
1134 </dc:macro> 1134 </dc:macro>
1136 <dc:context> 1136 <dc:context>
1137 <dc:statement> 1137 <dc:statement>
1138 SELECT count(*) as km_exists 1138 SELECT count(*) as km_exists
1139 FROM river_axes_km WHERE river_id = ${river_id} 1139 FROM river_axes_km WHERE river_id = ${river_id}
1140 </dc:statement> 1140 </dc:statement>
1141 <dc:elements> 1141 <dc:for-each>
1142 <dc:if test="$km_exists>0"> 1142 <dc:if test="$km_exists>0">
1143 <kilometrage> 1143 <kilometrage>
1144 <dc:attribute name="factory" value="wmskmfactory"/> 1144 <dc:attribute name="factory" value="wmskmfactory"/>
1145 <dc:attribute name="ids" value="${river_id}"/> 1145 <dc:attribute name="ids" value="${river_id}"/>
1146 </kilometrage> 1146 </kilometrage>
1147 </dc:if> 1147 </dc:if>
1148 </dc:elements> 1148 </dc:for-each>
1149 </dc:context> 1149 </dc:context>
1150 </dc:macro> 1150 </dc:macro>
1151 <dc:macro name="flood-map-qps"> 1151 <dc:macro name="flood-map-qps">
1152 <dc:context> 1152 <dc:context>
1153 <dc:comment>Grab only the actual first</dc:comment> 1153 <dc:comment>Grab only the actual first</dc:comment>
1159 JOIN cross_section_track_kinds ck on cs.kind_id = ck.id 1159 JOIN cross_section_track_kinds ck on cs.kind_id = ck.id
1160 WHERE river_id = ${river_id} 1160 WHERE river_id = ${river_id}
1161 AND kind_id=1 1161 AND kind_id=1
1162 </dc:statement> 1162 </dc:statement>
1163 <dc:if test="dc:has-result()"> 1163 <dc:if test="dc:has-result()">
1164 <dc:elements> 1164 <dc:for-each>
1165 <actual> 1165 <actual>
1166 <dc:attribute name="description" value="${kind_name}"/> 1166 <dc:attribute name="description" value="${kind_name}"/>
1167 <dc:attribute name="factory" value="wmsqpsfactory"/> 1167 <dc:attribute name="factory" value="wmsqpsfactory"/>
1168 <dc:attribute name="ids" value="${river_id};${kind_name};${kind_id}"/> 1168 <dc:attribute name="ids" value="${river_id};${kind_name};${kind_id}"/>
1169 </actual> 1169 </actual>
1170 </dc:elements> 1170 </dc:for-each>
1171 </dc:if> 1171 </dc:if>
1172 </dc:context> 1172 </dc:context>
1173 <dc:context> 1173 <dc:context>
1174 <dc:comment>Now the other tracks</dc:comment> 1174 <dc:comment>Now the other tracks</dc:comment>
1175 <dc:statement> 1175 <dc:statement>
1182 WHERE river_id = ${river_id} 1182 WHERE river_id = ${river_id}
1183 AND kind_id=0 1183 AND kind_id=0
1184 </dc:statement> 1184 </dc:statement>
1185 <dc:if test="dc:has-result()"> 1185 <dc:if test="dc:has-result()">
1186 <other> 1186 <other>
1187 <dc:elements> 1187 <dc:for-each>
1188 <misc-qps> 1188 <misc-qps>
1189 <dc:attribute name="description" value="${layer_name}"/> 1189 <dc:attribute name="description" value="${layer_name}"/>
1190 <dc:attribute name="factory" value="wmsqpsfactory"/> 1190 <dc:attribute name="factory" value="wmsqpsfactory"/>
1191 <dc:attribute name="ids" value="${river_id};${layer_name};${kind_id}"/> 1191 <dc:attribute name="ids" value="${river_id};${layer_name};${kind_id}"/>
1192 </misc-qps> 1192 </misc-qps>
1193 </dc:elements> 1193 </dc:for-each>
1194 </other> 1194 </other>
1195 </dc:if> 1195 </dc:if>
1196 </dc:context> 1196 </dc:context>
1197 </dc:macro> 1197 </dc:macro>
1198 <dc:macro name="flood-map-riveraxis"> 1198 <dc:macro name="flood-map-riveraxis">
1205 JOIN axis_kinds ak on ax.kind_id = ak.id 1205 JOIN axis_kinds ak on ax.kind_id = ak.id
1206 WHERE river_id = ${river_id} 1206 WHERE river_id = ${river_id}
1207 AND kind_id=1 1207 AND kind_id=1
1208 </dc:statement> 1208 </dc:statement>
1209 <dc:if test="dc:has-result()"> 1209 <dc:if test="dc:has-result()">
1210 <dc:elements> 1210 <dc:for-each>
1211 <actual factory="riveraxis"> 1211 <actual factory="riveraxis">
1212 <dc:attribute name="description" value="${kind_name}"/> 1212 <dc:attribute name="description" value="${kind_name}"/>
1213 <dc:attribute name="ids" value="${river_id};${kind_name};${kind_id}"/> 1213 <dc:attribute name="ids" value="${river_id};${kind_name};${kind_id}"/>
1214 </actual> 1214 </actual>
1215 </dc:elements> 1215 </dc:for-each>
1216 </dc:if> 1216 </dc:if>
1217 </dc:context> 1217 </dc:context>
1218 <dc:context> 1218 <dc:context>
1219 <dc:statement> 1219 <dc:statement>
1220 SELECT DISTINCT 1220 SELECT DISTINCT
1226 WHERE river_id = ${river_id} 1226 WHERE river_id = ${river_id}
1227 AND kind_id &lt;&gt; 1 1227 AND kind_id &lt;&gt; 1
1228 </dc:statement> 1228 </dc:statement>
1229 <dc:if test="dc:has-result()"> 1229 <dc:if test="dc:has-result()">
1230 <other> 1230 <other>
1231 <dc:elements> 1231 <dc:for-each>
1232 <misc-axis factory="riveraxis"> 1232 <misc-axis factory="riveraxis">
1233 <dc:attribute name="description" value="${layer_name}"/> 1233 <dc:attribute name="description" value="${layer_name}"/>
1234 <dc:attribute name="ids" value="${river_id};${layer_name};${kind_id}"/> 1234 <dc:attribute name="ids" value="${river_id};${layer_name};${kind_id}"/>
1235 </misc-axis> 1235 </misc-axis>
1236 </dc:elements> 1236 </dc:for-each>
1237 </other> 1237 </other>
1238 </dc:if> 1238 </dc:if>
1239 </dc:context> 1239 </dc:context>
1240 </dc:macro> 1240 </dc:macro>
1241 <dc:macro name="flood-map-hydr-boundaries-state"> 1241 <dc:macro name="flood-map-hydr-boundaries-state">
1245 name 1245 name
1246 FROM hydr_boundaries 1246 FROM hydr_boundaries
1247 WHERE river_id = ${river_id} 1247 WHERE river_id = ${river_id}
1248 AND kind = 2 1248 AND kind = 2
1249 </dc:statement> 1249 </dc:statement>
1250 <dc:elements> 1250 <dc:for-each>
1251 <line factory="wmshydrboundariesfactory" 1251 <line factory="wmshydrboundariesfactory"
1252 ids="{$river_id};{$name};2" 1252 ids="{$river_id};{$name};2"
1253 name="{$name}"/> 1253 name="{$name}"/>
1254 </dc:elements> 1254 </dc:for-each>
1255 </dc:context> 1255 </dc:context>
1256 <dc:context> 1256 <dc:context>
1257 <dc:statement> 1257 <dc:statement>
1258 SELECT DISTINCT 1258 SELECT DISTINCT
1259 name 1259 name
1260 FROM hydr_boundaries_poly 1260 FROM hydr_boundaries_poly
1261 WHERE river_id = ${river_id} 1261 WHERE river_id = ${river_id}
1262 AND kind = 2 1262 AND kind = 2
1263 </dc:statement> 1263 </dc:statement>
1264 <dc:elements> 1264 <dc:for-each>
1265 <line factory="wmshydrboundariespolyfactory" 1265 <line factory="wmshydrboundariespolyfactory"
1266 ids="{$river_id};{$name};2" 1266 ids="{$river_id};{$name};2"
1267 name="{$name}"/> 1267 name="{$name}"/>
1268 </dc:elements> 1268 </dc:for-each>
1269 </dc:context> 1269 </dc:context>
1270 </dc:macro> 1270 </dc:macro>
1271 <dc:macro name="flood-map-hydr-boundaries-lines"> 1271 <dc:macro name="flood-map-hydr-boundaries-lines">
1272 <dc:context> 1272 <dc:context>
1273 <dc:statement> 1273 <dc:statement>
1278 AND kind = 1 1278 AND kind = 1
1279 </dc:statement> 1279 </dc:statement>
1280 <dc:comment> What about all other line kinds?</dc:comment> 1280 <dc:comment> What about all other line kinds?</dc:comment>
1281 <dc:if test="dc:has-result()"> 1281 <dc:if test="dc:has-result()">
1282 <lines> 1282 <lines>
1283 <dc:elements> 1283 <dc:for-each>
1284 <line factory="wmshydrboundariesfactory" 1284 <line factory="wmshydrboundariesfactory"
1285 ids="{$river_id};{$name};1" 1285 ids="{$river_id};{$name};1"
1286 name="{$name}"/> 1286 name="{$name}"/>
1287 </dc:elements> 1287 </dc:for-each>
1288 </lines> 1288 </lines>
1289 </dc:if> 1289 </dc:if>
1290 </dc:context> 1290 </dc:context>
1291 </dc:macro> 1291 </dc:macro>
1292 <dc:macro name="flood-map-hydr-boundaries-poly"> 1292 <dc:macro name="flood-map-hydr-boundaries-poly">
1300 WHERE b.river_id = ${river_id} 1300 WHERE b.river_id = ${river_id}
1301 AND b.kind = 1 1301 AND b.kind = 1
1302 </dc:statement> 1302 </dc:statement>
1303 <dc:if test="dc:has-result()"> 1303 <dc:if test="dc:has-result()">
1304 <sobek_areas> 1304 <sobek_areas>
1305 <dc:elements> 1305 <dc:for-each>
1306 <boundary name="{$sectie}" 1306 <boundary name="{$sectie}"
1307 factory="wmshydrboundariespolyfactory" 1307 factory="wmshydrboundariespolyfactory"
1308 ids="{$river_id};{$sectie};1;{$sectie_id};-1"/> 1308 ids="{$river_id};{$sectie};1;{$sectie_id};-1"/>
1309 </dc:elements> 1309 </dc:for-each>
1310 </sobek_areas> 1310 </sobek_areas>
1311 </dc:if> 1311 </dc:if>
1312 </dc:context> 1312 </dc:context>
1313 <dc:context> 1313 <dc:context>
1314 <dc:statement> 1314 <dc:statement>
1320 WHERE b.river_id = ${river_id} 1320 WHERE b.river_id = ${river_id}
1321 AND b.kind = 1 1321 AND b.kind = 1
1322 </dc:statement> 1322 </dc:statement>
1323 <dc:if test="dc:has-result()"> 1323 <dc:if test="dc:has-result()">
1324 <sobek_flooded> 1324 <sobek_flooded>
1325 <dc:elements> 1325 <dc:for-each>
1326 <boundary name="{$sobek}" 1326 <boundary name="{$sobek}"
1327 factory="wmshydrboundariespolyfactory" 1327 factory="wmshydrboundariespolyfactory"
1328 ids="{$river_id};{$sobek};1;-1;{$sobek_id}"/> 1328 ids="{$river_id};{$sobek};1;-1;{$sobek_id}"/>
1329 </dc:elements> 1329 </dc:for-each>
1330 </sobek_flooded> 1330 </sobek_flooded>
1331 </dc:if> 1331 </dc:if>
1332 </dc:context> 1332 </dc:context>
1333 </dc:macro> 1333 </dc:macro>
1334 <dc:macro name="flood-map-hydr-boundaries"> 1334 <dc:macro name="flood-map-hydr-boundaries">
1352 JOIN floodplain_kinds flk on fp.kind_id = flk.id 1352 JOIN floodplain_kinds flk on fp.kind_id = flk.id
1353 WHERE river_id = ${river_id} 1353 WHERE river_id = ${river_id}
1354 AND kind_id=1 1354 AND kind_id=1
1355 </dc:statement> 1355 </dc:statement>
1356 <dc:if test="dc:has-result()"> 1356 <dc:if test="dc:has-result()">
1357 <dc:elements> 1357 <dc:for-each>
1358 <floody factory="wmsfloodplainfactory" 1358 <floody factory="wmsfloodplainfactory"
1359 description="{$kind_name}" 1359 description="{$kind_name}"
1360 ids="{$river_id};{$kind_name};{$kind_id}"/> 1360 ids="{$river_id};{$kind_name};{$kind_id}"/>
1361 </dc:elements> 1361 </dc:for-each>
1362 </dc:if> 1362 </dc:if>
1363 </dc:context> 1363 </dc:context>
1364 <dc:context> 1364 <dc:context>
1365 <dc:statement> 1365 <dc:statement>
1366 SELECT DISTINCT 1366 SELECT DISTINCT
1372 WHERE river_id = ${river_id} 1372 WHERE river_id = ${river_id}
1373 AND kind_id &lt;&gt; 1 1373 AND kind_id &lt;&gt; 1
1374 </dc:statement> 1374 </dc:statement>
1375 <dc:if test="dc:has-result()"> 1375 <dc:if test="dc:has-result()">
1376 <other> 1376 <other>
1377 <dc:elements> 1377 <dc:for-each>
1378 <floody factory="wmsfloodplainfactory" 1378 <floody factory="wmsfloodplainfactory"
1379 description="{$layer_name}" 1379 description="{$layer_name}"
1380 ids="{$river_id};{$layer_name};{$kind_id}"/> 1380 ids="{$river_id};{$layer_name};{$kind_id}"/>
1381 </dc:elements> 1381 </dc:for-each>
1382 </other> 1382 </other>
1383 </dc:if> 1383 </dc:if>
1384 </dc:context> 1384 </dc:context>
1385 </dc:macro> 1385 </dc:macro>
1386 1386
1388 <dc:comment> 1388 <dc:comment>
1389 Call from a context where fed_name hws_kind hws_name and river_id is 1389 Call from a context where fed_name hws_kind hws_name and river_id is
1390 availble 1390 availble
1391 </dc:comment> 1391 </dc:comment>
1392 <Durchlass> 1392 <Durchlass>
1393 <dc:elements filter="$hws_kind=1"> 1393 <dc:for-each filter="$hws_kind=1">
1394 <hws> 1394 <hws>
1395 <dc:attribute name="factory" value="wmshwslinesfactory"/> 1395 <dc:attribute name="factory" value="wmshwslinesfactory"/>
1396 <dc:attribute name="ids" value="${river_id};${hws_name}"/> 1396 <dc:attribute name="ids" value="${river_id};${hws_name}"/>
1397 <dc:attribute name="name" value="${hws_name}"/> 1397 <dc:attribute name="name" value="${hws_name}"/>
1398 </hws> 1398 </hws>
1399 </dc:elements> 1399 </dc:for-each>
1400 </Durchlass> 1400 </Durchlass>
1401 <Damm> 1401 <Damm>
1402 <dc:elements filter="$hws_kind=2"> 1402 <dc:for-each filter="$hws_kind=2">
1403 <hws> 1403 <hws>
1404 <dc:attribute name="factory" value="wmshwslinesfactory"/> 1404 <dc:attribute name="factory" value="wmshwslinesfactory"/>
1405 <dc:attribute name="ids" value="${river_id};${hws_name}"/> 1405 <dc:attribute name="ids" value="${river_id};${hws_name}"/>
1406 <dc:attribute name="name" value="${hws_name}"/> 1406 <dc:attribute name="name" value="${hws_name}"/>
1407 </hws> 1407 </hws>
1408 </dc:elements> 1408 </dc:for-each>
1409 </Damm> 1409 </Damm>
1410 <Graben> 1410 <Graben>
1411 <dc:elements filter="$hws_kind=3"> 1411 <dc:for-each filter="$hws_kind=3">
1412 <hws> 1412 <hws>
1413 <dc:attribute name="factory" value="wmshwslinesfactory"/> 1413 <dc:attribute name="factory" value="wmshwslinesfactory"/>
1414 <dc:attribute name="ids" value="${river_id};${hws_name}"/> 1414 <dc:attribute name="ids" value="${river_id};${hws_name}"/>
1415 <dc:attribute name="name" value="${hws_name}"/> 1415 <dc:attribute name="name" value="${hws_name}"/>
1416 </hws> 1416 </hws>
1417 </dc:elements> 1417 </dc:for-each>
1418 </Graben> 1418 </Graben>
1419 </dc:macro> 1419 </dc:macro>
1420 1420
1421 <dc:macro name="hwslines"> 1421 <dc:macro name="hwslines">
1422 <hws_lines> 1422 <hws_lines>
1429 FROM hws_lines hws 1429 FROM hws_lines hws
1430 JOIN fed_states fs ON hws.fed_state_id = fs.id 1430 JOIN fed_states fs ON hws.fed_state_id = fs.id
1431 WHERE river_id = ${river_id} 1431 WHERE river_id = ${river_id}
1432 AND hws.official=1 1432 AND hws.official=1
1433 </dc:statement> 1433 </dc:statement>
1434 <dc:elements> 1434 <dc:for-each>
1435 <dc:context> 1435 <dc:context>
1436 <dc:statement> 1436 <dc:statement>
1437 SELECT DISTINCT 1437 SELECT DISTINCT
1438 name AS hws_name, 1438 name AS hws_name,
1439 kind_id AS hws_kind 1439 kind_id AS hws_kind
1445 <fedstate> 1445 <fedstate>
1446 <dc:attribute name="description" value="${fed_name}"/> 1446 <dc:attribute name="description" value="${fed_name}"/>
1447 <dc:call-macro name="hwslines_by_kind"/> 1447 <dc:call-macro name="hwslines_by_kind"/>
1448 </fedstate> 1448 </fedstate>
1449 </dc:context> 1449 </dc:context>
1450 </dc:elements> 1450 </dc:for-each>
1451 </dc:context> 1451 </dc:context>
1452 <dc:context> 1452 <dc:context>
1453 <dc:statement> 1453 <dc:statement>
1454 SELECT distinct 1454 SELECT distinct
1455 name AS hws_name, 1455 name AS hws_name,
1474 FROM hws_lines hws 1474 FROM hws_lines hws
1475 JOIN fed_states fs ON hws.fed_state_id = fs.id 1475 JOIN fed_states fs ON hws.fed_state_id = fs.id
1476 WHERE river_id = ${river_id} 1476 WHERE river_id = ${river_id}
1477 AND hws.official=0 1477 AND hws.official=0
1478 </dc:statement> 1478 </dc:statement>
1479 <dc:elements> 1479 <dc:for-each>
1480 <dc:context> 1480 <dc:context>
1481 <dc:statement> 1481 <dc:statement>
1482 SELECT DISTINCT 1482 SELECT DISTINCT
1483 name AS hws_name, 1483 name AS hws_name,
1484 kind_id AS hws_kind 1484 kind_id AS hws_kind
1490 <fedstate> 1490 <fedstate>
1491 <dc:attribute name="description" value="${fed_name}"/> 1491 <dc:attribute name="description" value="${fed_name}"/>
1492 <dc:call-macro name="hwslines_by_kind"/> 1492 <dc:call-macro name="hwslines_by_kind"/>
1493 </fedstate> 1493 </fedstate>
1494 </dc:context> 1494 </dc:context>
1495 </dc:elements> 1495 </dc:for-each>
1496 </dc:context> 1496 </dc:context>
1497 <dc:context> 1497 <dc:context>
1498 <dc:statement> 1498 <dc:statement>
1499 SELECT distinct 1499 SELECT distinct
1500 name AS hws_name, 1500 name AS hws_name,
1516 <dc:comment> 1516 <dc:comment>
1517 Call from a context where fed_name hws_kind hws_name and river_id is 1517 Call from a context where fed_name hws_kind hws_name and river_id is
1518 availble 1518 availble
1519 </dc:comment> 1519 </dc:comment>
1520 <Durchlass> 1520 <Durchlass>
1521 <dc:elements filter="$hws_kind=1"> 1521 <dc:for-each filter="$hws_kind=1">
1522 <hws> 1522 <hws>
1523 <dc:attribute name="factory" value="wmshwspointsfactory"/> 1523 <dc:attribute name="factory" value="wmshwspointsfactory"/>
1524 <dc:attribute name="ids" value="${river_id};${hws_name}"/> 1524 <dc:attribute name="ids" value="${river_id};${hws_name}"/>
1525 <dc:attribute name="name" value="${hws_name}"/> 1525 <dc:attribute name="name" value="${hws_name}"/>
1526 </hws> 1526 </hws>
1527 </dc:elements> 1527 </dc:for-each>
1528 </Durchlass> 1528 </Durchlass>
1529 <Damm> 1529 <Damm>
1530 <dc:elements filter="$hws_kind=2"> 1530 <dc:for-each filter="$hws_kind=2">
1531 <hws> 1531 <hws>
1532 <dc:attribute name="factory" value="wmshwspointsfactory"/> 1532 <dc:attribute name="factory" value="wmshwspointsfactory"/>
1533 <dc:attribute name="ids" value="${river_id};${hws_name}"/> 1533 <dc:attribute name="ids" value="${river_id};${hws_name}"/>
1534 <dc:attribute name="name" value="${hws_name}"/> 1534 <dc:attribute name="name" value="${hws_name}"/>
1535 </hws> 1535 </hws>
1536 </dc:elements> 1536 </dc:for-each>
1537 </Damm> 1537 </Damm>
1538 <Graben> 1538 <Graben>
1539 <dc:elements filter="$hws_kind=3"> 1539 <dc:for-each filter="$hws_kind=3">
1540 <hws> 1540 <hws>
1541 <dc:attribute name="factory" value="wmshwspointsfactory"/> 1541 <dc:attribute name="factory" value="wmshwspointsfactory"/>
1542 <dc:attribute name="ids" value="${river_id};${hws_name}"/> 1542 <dc:attribute name="ids" value="${river_id};${hws_name}"/>
1543 <dc:attribute name="name" value="${hws_name}"/> 1543 <dc:attribute name="name" value="${hws_name}"/>
1544 </hws> 1544 </hws>
1545 </dc:elements> 1545 </dc:for-each>
1546 </Graben> 1546 </Graben>
1547 </dc:macro> 1547 </dc:macro>
1548 1548
1549 <dc:macro name="hwspoints"> 1549 <dc:macro name="hwspoints">
1550 <hws_points> 1550 <hws_points>
1557 FROM hws_points hws 1557 FROM hws_points hws
1558 JOIN fed_states fs ON hws.fed_state_id = fs.id 1558 JOIN fed_states fs ON hws.fed_state_id = fs.id
1559 WHERE river_id = ${river_id} 1559 WHERE river_id = ${river_id}
1560 AND hws.official=1 1560 AND hws.official=1
1561 </dc:statement> 1561 </dc:statement>
1562 <dc:elements> 1562 <dc:for-each>
1563 <dc:context> 1563 <dc:context>
1564 <dc:statement> 1564 <dc:statement>
1565 SELECT DISTINCT 1565 SELECT DISTINCT
1566 name AS hws_name, 1566 name AS hws_name,
1567 kind_id AS hws_kind 1567 kind_id AS hws_kind
1573 <fedstate> 1573 <fedstate>
1574 <dc:attribute name="description" value="${fed_name}"/> 1574 <dc:attribute name="description" value="${fed_name}"/>
1575 <dc:call-macro name="hwspoints_by_kind"/> 1575 <dc:call-macro name="hwspoints_by_kind"/>
1576 </fedstate> 1576 </fedstate>
1577 </dc:context> 1577 </dc:context>
1578 </dc:elements> 1578 </dc:for-each>
1579 </dc:context> 1579 </dc:context>
1580 <dc:context> 1580 <dc:context>
1581 <dc:statement> 1581 <dc:statement>
1582 SELECT distinct 1582 SELECT distinct
1583 name AS hws_name, 1583 name AS hws_name,
1602 FROM hws_points hws 1602 FROM hws_points hws
1603 JOIN fed_states fs ON hws.fed_state_id = fs.id 1603 JOIN fed_states fs ON hws.fed_state_id = fs.id
1604 WHERE river_id = ${river_id} 1604 WHERE river_id = ${river_id}
1605 AND hws.official=0 1605 AND hws.official=0
1606 </dc:statement> 1606 </dc:statement>
1607 <dc:elements> 1607 <dc:for-each>
1608 <dc:context> 1608 <dc:context>
1609 <dc:statement> 1609 <dc:statement>
1610 SELECT DISTINCT 1610 SELECT DISTINCT
1611 name AS hws_name, 1611 name AS hws_name,
1612 kind_id AS hws_kind 1612 kind_id AS hws_kind
1618 <fedstate> 1618 <fedstate>
1619 <dc:attribute name="description" value="${fed_name}"/> 1619 <dc:attribute name="description" value="${fed_name}"/>
1620 <dc:call-macro name="hwspoints_by_kind"/> 1620 <dc:call-macro name="hwspoints_by_kind"/>
1621 </fedstate> 1621 </fedstate>
1622 </dc:context> 1622 </dc:context>
1623 </dc:elements> 1623 </dc:for-each>
1624 </dc:context> 1624 </dc:context>
1625 <dc:context> 1625 <dc:context>
1626 <dc:statement> 1626 <dc:statement>
1627 SELECT distinct 1627 SELECT distinct
1628 name AS hws_name, 1628 name AS hws_name,
1649 FROM buildings b 1649 FROM buildings b
1650 JOIN building_kinds bk ON b.kind_id = bk.id 1650 JOIN building_kinds bk ON b.kind_id = bk.id
1651 WHERE b.river_id = ${river_id} 1651 WHERE b.river_id = ${river_id}
1652 AND b.kind_id &lt;&gt; 0 1652 AND b.kind_id &lt;&gt; 0
1653 </dc:statement> 1653 </dc:statement>
1654 <dc:elements> 1654 <dc:for-each>
1655 <buildings> 1655 <buildings>
1656 <dc:attribute name="description" value="${building_kind}"/> 1656 <dc:attribute name="description" value="${building_kind}"/>
1657 <dc:attribute name="factory" value="wmsbuildingsfactory"/> 1657 <dc:attribute name="factory" value="wmsbuildingsfactory"/>
1658 <dc:attribute name="ids" value="${river_id};${building_kind};${building_kind_id}"/> 1658 <dc:attribute name="ids" value="${river_id};${building_kind};${building_kind_id}"/>
1659 </buildings> 1659 </buildings>
1660 </dc:elements> 1660 </dc:for-each>
1661 </dc:context> 1661 </dc:context>
1662 <dc:context> 1662 <dc:context>
1663 <dc:statement> 1663 <dc:statement>
1664 SELECT DISTINCT 1664 SELECT DISTINCT
1665 b.kind_id AS building_kind_id, 1665 b.kind_id AS building_kind_id,
1669 JOIN building_kinds bk ON b.kind_id = bk.id 1669 JOIN building_kinds bk ON b.kind_id = bk.id
1670 WHERE river_id = ${river_id} 1670 WHERE river_id = ${river_id}
1671 AND kind_id = 0 OR 1671 AND kind_id = 0 OR
1672 kind_id IS NULL 1672 kind_id IS NULL
1673 </dc:statement> 1673 </dc:statement>
1674 <dc:elements> 1674 <dc:for-each>
1675 <dc:element name="${building_kind}"> 1675 <dc:element name="${building_kind}">
1676 <dc:elements> 1676 <dc:for-each>
1677 <buildings> 1677 <buildings>
1678 <dc:attribute name="description" value="${building_name}"/> 1678 <dc:attribute name="description" value="${building_name}"/>
1679 <dc:attribute name="factory" value="wmsbuildingsfactory"/> 1679 <dc:attribute name="factory" value="wmsbuildingsfactory"/>
1680 <dc:attribute name="ids" value="${river_id};${building_name}"/> 1680 <dc:attribute name="ids" value="${river_id};${building_name}"/>
1681 </buildings> 1681 </buildings>
1682 </dc:elements> 1682 </dc:for-each>
1683 </dc:element> 1683 </dc:element>
1684 </dc:elements> 1684 </dc:for-each>
1685 </dc:context> 1685 </dc:context>
1686 <dc:context> 1686 <dc:context>
1687 <dc:statement> 1687 <dc:statement>
1688 SELECT DISTINCT 1688 SELECT DISTINCT
1689 j.kind_id AS jetty_kind_id, 1689 j.kind_id AS jetty_kind_id,
1692 JOIN jetty_kinds jk ON j.kind_id = jk.id 1692 JOIN jetty_kinds jk ON j.kind_id = jk.id
1693 WHERE river_id = ${river_id} 1693 WHERE river_id = ${river_id}
1694 </dc:statement> 1694 </dc:statement>
1695 <dc:if test="dc:has-result()"> 1695 <dc:if test="dc:has-result()">
1696 <jetties> 1696 <jetties>
1697 <dc:elements> 1697 <dc:for-each>
1698 <jetty> 1698 <jetty>
1699 <dc:attribute name="description" value="${jetty_kind}"/> 1699 <dc:attribute name="description" value="${jetty_kind}"/>
1700 <dc:attribute name="factory" value="wmsjettiesfactory"/> 1700 <dc:attribute name="factory" value="wmsjettiesfactory"/>
1701 <dc:attribute name="ids" value="${river_id};${jetty_kind};${jetty_kind_id}"/> 1701 <dc:attribute name="ids" value="${river_id};${jetty_kind};${jetty_kind_id}"/>
1702 </jetty> 1702 </jetty>
1703 </dc:elements> 1703 </dc:for-each>
1704 </jetties> 1704 </jetties>
1705 </dc:if> 1705 </dc:if>
1706 </dc:context> 1706 </dc:context>
1707 </dc:macro> 1707 </dc:macro>
1708 <dc:macro name="flood-map-fixpoints"> 1708 <dc:macro name="flood-map-fixpoints">
1709 <dc:context> 1709 <dc:context>
1710 <dc:statement> 1710 <dc:statement>
1711 SELECT count(*) as km_exists, name as name 1711 SELECT count(*) as km_exists, name as name
1712 FROM fixpoints WHERE river_id = ${river_id} GROUP BY name 1712 FROM fixpoints WHERE river_id = ${river_id} GROUP BY name
1713 </dc:statement> 1713 </dc:statement>
1714 <dc:elements> 1714 <dc:for-each>
1715 <dc:if test="$km_exists>0"> 1715 <dc:if test="$km_exists>0">
1716 <fixpoint> 1716 <fixpoint>
1717 <dc:attribute name="factory" value="wmsfixpointsfactory"/> 1717 <dc:attribute name="factory" value="wmsfixpointsfactory"/>
1718 <dc:attribute name="ids" value="${river_id};${name}"/> 1718 <dc:attribute name="ids" value="${river_id};${name}"/>
1719 <dc:attribute name="name" value="${name}"/> 1719 <dc:attribute name="name" value="${name}"/>
1720 </fixpoint> 1720 </fixpoint>
1721 </dc:if> 1721 </dc:if>
1722 </dc:elements> 1722 </dc:for-each>
1723 </dc:context> 1723 </dc:context>
1724 </dc:macro> 1724 </dc:macro>
1725 <dc:macro name="flood-map-gaugelocations"> 1725 <dc:macro name="flood-map-gaugelocations">
1726 <dc:attribute name="factory" value="externalwmsfactory"/> 1726 <dc:attribute name="factory" value="externalwmsfactory"/>
1727 <dc:attribute name="ids" value="http://www.pegelonline.wsv.de/webservices/gis/wms;Pegelpunkte;Pegelonline-Pegelpunkte"/> 1727 <dc:attribute name="ids" value="http://www.pegelonline.wsv.de/webservices/gis/wms;Pegelpunkte;Pegelonline-Pegelpunkte"/>
1736 SELECT count(*) as uesg_exist, name as name 1736 SELECT count(*) as uesg_exist, name as name
1737 FROM floodmaps 1737 FROM floodmaps
1738 WHERE river_id = ${river_id} AND kind = 111 1738 WHERE river_id = ${river_id} AND kind = 111
1739 GROUP BY name, kind 1739 GROUP BY name, kind
1740 </dc:statement> 1740 </dc:statement>
1741 <dc:elements> 1741 <dc:for-each>
1742 <dc:if test="$uesg_exist>0"> 1742 <dc:if test="$uesg_exist>0">
1743 <floodmaps> 1743 <floodmaps>
1744 <dc:attribute name="factory" value="wmsfloodmapsfactory"/> 1744 <dc:attribute name="factory" value="wmsfloodmapsfactory"/>
1745 <dc:attribute name="ids" value="${river_id};${name}"/> 1745 <dc:attribute name="ids" value="${river_id};${name}"/>
1746 <dc:attribute name="name" value="${name}"/> 1746 <dc:attribute name="name" value="${name}"/>
1747 </floodmaps> 1747 </floodmaps>
1748 </dc:if> 1748 </dc:if>
1749 </dc:elements> 1749 </dc:for-each>
1750 </dc:context> 1750 </dc:context>
1751 </bfg> 1751 </bfg>
1752 <land> 1752 <land>
1753 <dc:context> 1753 <dc:context>
1754 <dc:statement> 1754 <dc:statement>
1755 SELECT count(*) as uesg_exist, name as name 1755 SELECT count(*) as uesg_exist, name as name
1756 FROM floodmaps 1756 FROM floodmaps
1757 WHERE river_id = ${river_id} AND kind = 112 1757 WHERE river_id = ${river_id} AND kind = 112
1758 GROUP BY name, kind 1758 GROUP BY name, kind
1759 </dc:statement> 1759 </dc:statement>
1760 <dc:elements> 1760 <dc:for-each>
1761 <dc:if test="$uesg_exist>0"> 1761 <dc:if test="$uesg_exist>0">
1762 <floodmaps> 1762 <floodmaps>
1763 <dc:attribute name="factory" value="wmsfloodmapsfactory"/> 1763 <dc:attribute name="factory" value="wmsfloodmapsfactory"/>
1764 <dc:attribute name="ids" value="${river_id};${name}"/> 1764 <dc:attribute name="ids" value="${river_id};${name}"/>
1765 <dc:attribute name="name" value="${name}"/> 1765 <dc:attribute name="name" value="${name}"/>
1766 </floodmaps> 1766 </floodmaps>
1767 </dc:if> 1767 </dc:if>
1768 </dc:elements> 1768 </dc:for-each>
1769 </dc:context> 1769 </dc:context>
1770 </land> 1770 </land>
1771 </current> 1771 </current>
1772 <potentiel> 1772 <potentiel>
1773 <bfg> 1773 <bfg>
1776 SELECT count(*) as uesg_exist, name as name 1776 SELECT count(*) as uesg_exist, name as name
1777 FROM floodmaps 1777 FROM floodmaps
1778 WHERE river_id = ${river_id} AND kind = 121 1778 WHERE river_id = ${river_id} AND kind = 121
1779 GROUP BY name, kind 1779 GROUP BY name, kind
1780 </dc:statement> 1780 </dc:statement>
1781 <dc:elements> 1781 <dc:for-each>
1782 <dc:if test="$uesg_exist>0"> 1782 <dc:if test="$uesg_exist>0">
1783 <floodmaps> 1783 <floodmaps>
1784 <dc:attribute name="factory" value="wmsfloodmapsfactory"/> 1784 <dc:attribute name="factory" value="wmsfloodmapsfactory"/>
1785 <dc:attribute name="ids" value="${river_id};${name}"/> 1785 <dc:attribute name="ids" value="${river_id};${name}"/>
1786 <dc:attribute name="name" value="${name}"/> 1786 <dc:attribute name="name" value="${name}"/>
1787 </floodmaps> 1787 </floodmaps>
1788 </dc:if> 1788 </dc:if>
1789 </dc:elements> 1789 </dc:for-each>
1790 </dc:context> 1790 </dc:context>
1791 </bfg> 1791 </bfg>
1792 <land> 1792 <land>
1793 <dc:context> 1793 <dc:context>
1794 <dc:statement> 1794 <dc:statement>
1795 SELECT count(*) as uesg_exist, name as name 1795 SELECT count(*) as uesg_exist, name as name
1796 FROM floodmaps 1796 FROM floodmaps
1797 WHERE river_id = ${river_id} AND kind = 122 1797 WHERE river_id = ${river_id} AND kind = 122
1798 GROUP BY name, kind 1798 GROUP BY name, kind
1799 </dc:statement> 1799 </dc:statement>
1800 <dc:elements> 1800 <dc:for-each>
1801 <dc:if test="$uesg_exist>0"> 1801 <dc:if test="$uesg_exist>0">
1802 <floodmaps> 1802 <floodmaps>
1803 <dc:attribute name="factory" value="wmsfloodmapsfactory"/> 1803 <dc:attribute name="factory" value="wmsfloodmapsfactory"/>
1804 <dc:attribute name="ids" value="${river_id};${name}"/> 1804 <dc:attribute name="ids" value="${river_id};${name}"/>
1805 <dc:attribute name="name" value="${name}"/> 1805 <dc:attribute name="name" value="${name}"/>
1806 </floodmaps> 1806 </floodmaps>
1807 </dc:if> 1807 </dc:if>
1808 </dc:elements> 1808 </dc:for-each>
1809 </dc:context> 1809 </dc:context>
1810 </land> 1810 </land>
1811 </potentiel> 1811 </potentiel>
1812 </calculations> 1812 </calculations>
1813 </uesk> 1813 </uesk>
1879 SELECT id AS bedh_id, 1879 SELECT id AS bedh_id,
1880 year AS bedh_year, 1880 year AS bedh_year,
1881 description AS bedh_descr 1881 description AS bedh_descr
1882 FROM bed_height_single WHERE river_id = ${river_id} 1882 FROM bed_height_single WHERE river_id = ${river_id}
1883 </dc:statement> 1883 </dc:statement>
1884 <dc:elements> 1884 <dc:for-each>
1885 <height> 1885 <height>
1886 <dc:attribute name="factory" value="bedheight"/> 1886 <dc:attribute name="factory" value="bedheight"/>
1887 <dc:attribute name="ids" value="bedheight-single-${bedh_id}-${bedh_year}"/> 1887 <dc:attribute name="ids" value="bedheight-single-${bedh_id}-${bedh_year}"/>
1888 <dc:attribute name="description" value="${bedh_descr}"/> 1888 <dc:attribute name="description" value="${bedh_descr}"/>
1889 </height> 1889 </height>
1890 </dc:elements> 1890 </dc:for-each>
1891 </dc:context> 1891 </dc:context>
1892 </single> 1892 </single>
1893 </dc:macro> 1893 </dc:macro>
1894 <dc:macro name="bed-heights-epoch"> 1894 <dc:macro name="bed-heights-epoch">
1895 <epoch> 1895 <epoch>
1898 SELECT id AS bedh_id, 1898 SELECT id AS bedh_id,
1899 time_interval_id AS bedh_interval_id, 1899 time_interval_id AS bedh_interval_id,
1900 description AS bedh_descr 1900 description AS bedh_descr
1901 FROM bed_height_epoch WHERE river_id = ${river_id} 1901 FROM bed_height_epoch WHERE river_id = ${river_id}
1902 </dc:statement> 1902 </dc:statement>
1903 <dc:elements> 1903 <dc:for-each>
1904 <height> 1904 <height>
1905 <dc:attribute name="factory" value="bedheight"/> 1905 <dc:attribute name="factory" value="bedheight"/>
1906 <dc:attribute name="ids" value="bedheight-epoch-${bedh_id}-${bedh_interval_id}"/> 1906 <dc:attribute name="ids" value="bedheight-epoch-${bedh_id}-${bedh_interval_id}"/>
1907 <dc:attribute name="description" value="${bedh_descr}"/> 1907 <dc:attribute name="description" value="${bedh_descr}"/>
1908 </height> 1908 </height>
1909 </dc:elements> 1909 </dc:for-each>
1910 </dc:context> 1910 </dc:context>
1911 </epoch> 1911 </epoch>
1912 </dc:macro> 1912 </dc:macro>
1913 </dc:elements> 1913 </dc:for-each>
1914 </dc:context> 1914 </dc:context>
1915 </dc:macro> 1915 </dc:macro>
1916 1916
1917 <dc:choose> 1917 <dc:choose>
1918 <dc:comment> 1918 <dc:comment>
1950 FROM master_artifacts_range m 1950 FROM master_artifacts_range m
1951 WHERE m.collection_id = ${collection_id} AND m.gid &lt;&gt; CAST(${artifact-id} AS uuid) 1951 WHERE m.collection_id = ${collection_id} AND m.gid &lt;&gt; CAST(${artifact-id} AS uuid)
1952 AND EXISTS ( 1952 AND EXISTS (
1953 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) 1953 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river})
1954 </dc:statement> 1954 </dc:statement>
1955 <dc:elements> 1955 <dc:for-each>
1956 <dc:variable name="from" type="number" expr="dc:fromValue($ld_m, $ld_l, $ld_f)"/> 1956 <dc:variable name="from" type="number" expr="dc:fromValue($ld_m, $ld_l, $ld_f)"/>
1957 <dc:variable name="to" type="number" expr="dc:toValue($ld_m, $ld_l, $ld_t)"/> 1957 <dc:variable name="to" type="number" expr="dc:toValue($ld_m, $ld_l, $ld_t)"/>
1958 <dc:if test="($from &gt;= $fromkm and $from &lt;= $tokm) or ($to &lt;= $tokm and $to &gt;= $fromkm) or ($from &lt;= $fromkm and $to &gt;= $tokm)"> 1958 <dc:if test="($from &gt;= $fromkm and $from &lt;= $tokm) or ($to &lt;= $tokm and $to &gt;= $fromkm) or ($from &lt;= $fromkm and $to &gt;= $tokm)">
1959 <dc:macro-body/> 1959 <dc:macro-body/>
1960 </dc:if> 1960 </dc:if>
1961 </dc:elements> 1961 </dc:for-each>
1962 </dc:macro> 1962 </dc:macro>
1963 1963
1964 <!-- OFFICIAL LINES --> 1964 <!-- OFFICIAL LINES -->
1965 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section')"> 1965 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section')">
1966 <dc:comment comment=".wst -------------------------------"/> 1966 <dc:comment comment=".wst -------------------------------"/>
1967 <officiallines> 1967 <officiallines>
1968 <dc:elements> 1968 <dc:for-each>
1969 <dc:context> 1969 <dc:context>
1970 <dc:statement> 1970 <dc:statement>
1971 SELECT m.id AS a_id, 1971 SELECT m.id AS a_id,
1972 m.state AS a_state, 1972 m.state AS a_state,
1973 m.gid AS a_gid, 1973 m.gid AS a_gid,
1988 FROM artifact_data ad 1988 FROM artifact_data ad
1989 WHERE ad.artifact_id = m.id 1989 WHERE ad.artifact_id = m.id
1990 AND k = 'river' 1990 AND k = 'river'
1991 AND v = ${river}) 1991 AND v = ${river})
1992 </dc:statement> 1992 </dc:statement>
1993 <dc:elements> 1993 <dc:for-each>
1994 <dc:context connection="system"> 1994 <dc:context connection="system">
1995 <dc:statement> 1995 <dc:statement>
1996 SELECT ol.wst_id AS wstid, ol.wst_column_pos AS wstcolpos, ol.name AS olname, ol.value AS oval 1996 SELECT ol.wst_id AS wstid, ol.wst_column_pos AS wstcolpos, ol.name AS olname, ol.value AS oval
1997 FROM official_q_values ol 1997 FROM official_q_values ol
1998 WHERE ol.value = CAST(${wqsingle} AS NUMERIC(10,2)) AND ol.gauge_name = ${gaugy} 1998 WHERE ol.value = CAST(${wqsingle} AS NUMERIC(10,2)) AND ol.gauge_name = ${gaugy}
1999 </dc:statement> 1999 </dc:statement>
2000 <dc:elements> 2000 <dc:for-each>
2001 <dc:element name="${olname}"> 2001 <dc:element name="${olname}">
2002 <dc:attribute name="name" value="${olname}"/> 2002 <dc:attribute name="name" value="${olname}"/>
2003 <dc:attribute name="ids" value="additionals-wstv-${wstcolpos}-${wstid}"/> 2003 <dc:attribute name="ids" value="additionals-wstv-${wstcolpos}-${wstid}"/>
2004 <dc:attribute name="factory" value="staticwkms"/> 2004 <dc:attribute name="factory" value="staticwkms"/>
2005 </dc:element> 2005 </dc:element>
2006 </dc:elements> 2006 </dc:for-each>
2007 </dc:context> 2007 </dc:context>
2008 </dc:elements> 2008 </dc:for-each>
2009 </dc:context> 2009 </dc:context>
2010 </dc:elements> 2010 </dc:for-each>
2011 </officiallines> 2011 </officiallines>
2012 </dc:if> 2012 </dc:if>
2013 <!-- END OFFICIAL LINES --> 2013 <!-- END OFFICIAL LINES -->
2014 2014
2015 <dc:comment> 2015 <dc:comment>
2016 SHOW W-DIFFERENCES 2016 SHOW W-DIFFERENCES
2017 </dc:comment> 2017 </dc:comment>
2018 2018
2019 <dc:macro name="differences"> 2019 <dc:macro name="differences">
2020 <differences> 2020 <differences>
2021 <dc:elements> 2021 <dc:for-each>
2022 <dc:context> 2022 <dc:context>
2023 <dc:call-macro name="range-filter"> 2023 <dc:call-macro name="range-filter">
2024 <dc:context> 2024 <dc:context>
2025 <dc:statement> 2025 <dc:statement>
2026 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description 2026 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description
2027 FROM outs as o, facets as f, artifacts as a 2027 FROM outs as o, facets as f, artifacts as a
2028 WHERE f.name = 'w_differences' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} 2028 WHERE f.name = 'w_differences' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id}
2029 </dc:statement> 2029 </dc:statement>
2030 <dc:elements> 2030 <dc:for-each>
2031 <dc:element name="${facet_name}"> 2031 <dc:element name="${facet_name}">
2032 <dc:attribute name="description" value="${facet_description}"/> 2032 <dc:attribute name="description" value="${facet_description}"/>
2033 <dc:attribute name="factory" value="winfo"/> 2033 <dc:attribute name="factory" value="winfo"/>
2034 <dc:attribute name="artifact-id" value="${aid}"/> 2034 <dc:attribute name="artifact-id" value="${aid}"/>
2035 <dc:attribute name="ids" value="${aid}"/> 2035 <dc:attribute name="ids" value="${aid}"/>
2036 <dc:attribute name="out" value="w_differences"/> 2036 <dc:attribute name="out" value="w_differences"/>
2037 </dc:element> 2037 </dc:element>
2038 </dc:elements> 2038 </dc:for-each>
2039 </dc:context> 2039 </dc:context>
2040 </dc:call-macro> 2040 </dc:call-macro>
2041 </dc:context> 2041 </dc:context>
2042 </dc:elements> 2042 </dc:for-each>
2043 </differences> 2043 </differences>
2044 </dc:macro> 2044 </dc:macro>
2045 2045
2046 <dc:comment> 2046 <dc:comment>
2047 SHOW REFERENCE CURVE 2047 SHOW REFERENCE CURVE
2048 </dc:comment> 2048 </dc:comment>
2049 2049
2050 2050
2051 <dc:macro name="reference-curves"> 2051 <dc:macro name="reference-curves">
2052 <reference_curves> 2052 <reference_curves>
2053 <dc:elements> 2053 <dc:for-each>
2054 <dc:context> 2054 <dc:context>
2055 <dc:call-macro name="user-range"> 2055 <dc:call-macro name="user-range">
2056 <dc:context> 2056 <dc:context>
2057 <dc:statement> 2057 <dc:statement>
2058 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description 2058 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description
2059 FROM outs as o, facets as f, artifacts as a 2059 FROM outs as o, facets as f, artifacts as a
2060 WHERE f.name = 'reference_curve' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} 2060 WHERE f.name = 'reference_curve' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id}
2061 </dc:statement> 2061 </dc:statement>
2062 <dc:elements> 2062 <dc:for-each>
2063 <dc:element name="${facet_name}"> 2063 <dc:element name="${facet_name}">
2064 <dc:attribute name="description" value="${facet_description}"/> 2064 <dc:attribute name="description" value="${facet_description}"/>
2065 <dc:attribute name="factory" value="winfo"/> 2065 <dc:attribute name="factory" value="winfo"/>
2066 <dc:attribute name="artifact-id" value="${aid}"/> 2066 <dc:attribute name="artifact-id" value="${aid}"/>
2067 <dc:attribute name="ids" value="${aid}"/> 2067 <dc:attribute name="ids" value="${aid}"/>
2068 <dc:attribute name="out" value="reference_curve"/> 2068 <dc:attribute name="out" value="reference_curve"/>
2069 </dc:element> 2069 </dc:element>
2070 </dc:elements> 2070 </dc:for-each>
2071 </dc:context> 2071 </dc:context>
2072 </dc:call-macro> 2072 </dc:call-macro>
2073 </dc:context> 2073 </dc:context>
2074 </dc:elements> 2074 </dc:for-each>
2075 </reference_curves> 2075 </reference_curves>
2076 </dc:macro> 2076 </dc:macro>
2077 2077
2078 <dc:comment> 2078 <dc:comment>
2079 SHOW COMPUTED DISCHARGE CURVES 2079 SHOW COMPUTED DISCHARGE CURVES
2080 </dc:comment> 2080 </dc:comment>
2081 2081
2082 <dc:macro name="computed-discharge-curve"> 2082 <dc:macro name="computed-discharge-curve">
2083 <computed_discharge_curves> 2083 <computed_discharge_curves>
2084 <dc:elements> 2084 <dc:for-each>
2085 <dc:context> 2085 <dc:context>
2086 <dc:call-macro name="range-filter"> 2086 <dc:call-macro name="range-filter">
2087 <dc:context> 2087 <dc:context>
2088 <dc:statement> 2088 <dc:statement>
2089 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description 2089 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description
2090 FROM outs as o, facets as f, artifacts as a 2090 FROM outs as o, facets as f, artifacts as a
2091 WHERE f.name = 'computed_discharge_curve.q' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} 2091 WHERE f.name = 'computed_discharge_curve.q' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id}
2092 </dc:statement> 2092 </dc:statement>
2093 <dc:elements> 2093 <dc:for-each>
2094 <dc:element name="${facet_name}"> 2094 <dc:element name="${facet_name}">
2095 <dc:attribute name="description" value="${facet_description}"/> 2095 <dc:attribute name="description" value="${facet_description}"/>
2096 <dc:attribute name="factory" value="winfo"/> 2096 <dc:attribute name="factory" value="winfo"/>
2097 <dc:attribute name="artifact-id" value="${aid}"/> 2097 <dc:attribute name="artifact-id" value="${aid}"/>
2098 <dc:attribute name="ids" value="${aid}"/> 2098 <dc:attribute name="ids" value="${aid}"/>
2099 <dc:attribute name="out" value="computed_discharge_curve"/> 2099 <dc:attribute name="out" value="computed_discharge_curve"/>
2100 </dc:element> 2100 </dc:element>
2101 </dc:elements> 2101 </dc:for-each>
2102 </dc:context> 2102 </dc:context>
2103 </dc:call-macro> 2103 </dc:call-macro>
2104 </dc:context> 2104 </dc:context>
2105 </dc:elements> 2105 </dc:for-each>
2106 </computed_discharge_curves> 2106 </computed_discharge_curves>
2107 </dc:macro> 2107 </dc:macro>
2108 2108
2109 <dc:comment> 2109 <dc:comment>
2110 CROSS SECTION 2110 CROSS SECTION
2111 </dc:comment> 2111 </dc:comment>
2112 2112
2113 2113
2114 <dc:macro name="waterlevels"> 2114 <dc:macro name="waterlevels">
2115 <waterlevels> 2115 <waterlevels>
2116 <dc:elements> 2116 <dc:for-each>
2117 <dc:context> 2117 <dc:context>
2118 <dc:call-macro name="range-filter"> 2118 <dc:call-macro name="range-filter">
2119 <dc:context> 2119 <dc:context>
2120 <dc:statement> 2120 <dc:statement>
2121 SELECT id AS out_id 2121 SELECT id AS out_id
2122 FROM outs 2122 FROM outs
2123 WHERE artifact_id = ${a_id} AND name = 'cross_section' 2123 WHERE artifact_id = ${a_id} AND name = 'cross_section'
2124 </dc:statement> 2124 </dc:statement>
2125 <dc:elements> 2125 <dc:for-each>
2126 <dc:context> 2126 <dc:context>
2127 <dc:statement> 2127 <dc:statement>
2128 SELECT name AS facet_name, num as facet_num, description AS facet_description 2128 SELECT name AS facet_name, num as facet_num, description AS facet_description
2129 FROM facets 2129 FROM facets
2130 WHERE out_id = ${out_id} 2130 WHERE out_id = ${out_id}
2131 ORDER BY num ASC, name DESC 2131 ORDER BY num ASC, name DESC
2132 </dc:statement> 2132 </dc:statement>
2133 <longitudinal_section_columns> 2133 <longitudinal_section_columns>
2134 <dc:attribute name="description" value="${river} ${a_creation}"/> 2134 <dc:attribute name="description" value="${river} ${a_creation}"/>
2135 <dc:elements> 2135 <dc:for-each>
2136 <dc:element name="${facet_name}"> 2136 <dc:element name="${facet_name}">
2137 <dc:attribute name="description" value="${facet_description}"/> 2137 <dc:attribute name="description" value="${facet_description}"/>
2138 <dc:attribute name="ids" value="${facet_num}"/> 2138 <dc:attribute name="ids" value="${facet_num}"/>
2139 <dc:attribute name="factory" value="winfo"/> 2139 <dc:attribute name="factory" value="winfo"/>
2140 <dc:attribute name="artifact-id" value="${a_gid}"/> 2140 <dc:attribute name="artifact-id" value="${a_gid}"/>
2141 <dc:attribute name="out" value="cross_section"/> 2141 <dc:attribute name="out" value="cross_section"/>
2142 </dc:element> 2142 </dc:element>
2143 </dc:elements> 2143 </dc:for-each>
2144 </longitudinal_section_columns> 2144 </longitudinal_section_columns>
2145 </dc:context> 2145 </dc:context>
2146 </dc:elements> 2146 </dc:for-each>
2147 </dc:context> 2147 </dc:context>
2148 </dc:call-macro> 2148 </dc:call-macro>
2149 </dc:context> 2149 </dc:context>
2150 </dc:elements> 2150 </dc:for-each>
2151 </waterlevels> 2151 </waterlevels>
2152 </dc:macro> 2152 </dc:macro>
2153 2153
2154 2154
2155 <dc:macro name="longitudinal"> 2155 <dc:macro name="longitudinal">
2156 <waterlevels> 2156 <waterlevels>
2157 <dc:elements> 2157 <dc:for-each>
2158 <dc:context> 2158 <dc:context>
2159 <dc:call-macro name="range-filter"> 2159 <dc:call-macro name="range-filter">
2160 <dc:context> 2160 <dc:context>
2161 <dc:statement> 2161 <dc:statement>
2162 SELECT id AS out_id 2162 SELECT id AS out_id
2163 FROM outs 2163 FROM outs
2164 WHERE artifact_id = ${a_id} AND name = 'longitudinal_section' 2164 WHERE artifact_id = ${a_id} AND name = 'longitudinal_section'
2165 </dc:statement> 2165 </dc:statement>
2166 <dc:elements> 2166 <dc:for-each>
2167 <dc:context> 2167 <dc:context>
2168 <dc:statement> 2168 <dc:statement>
2169 SELECT name AS facet_name, num as facet_num, description AS facet_description 2169 SELECT name AS facet_name, num as facet_num, description AS facet_description
2170 FROM facets 2170 FROM facets
2171 WHERE out_id = ${out_id} 2171 WHERE out_id = ${out_id}
2172 ORDER BY num ASC, name DESC 2172 ORDER BY num ASC, name DESC
2173 </dc:statement> 2173 </dc:statement>
2174 <longitudinal_section_columns> 2174 <longitudinal_section_columns>
2175 <dc:attribute name="description" value="${river} ${a_creation}"/> 2175 <dc:attribute name="description" value="${river} ${a_creation}"/>
2176 <dc:elements> 2176 <dc:for-each>
2177 <dc:element name="${facet_name}"> 2177 <dc:element name="${facet_name}">
2178 <dc:attribute name="description" value="${facet_description}"/> 2178 <dc:attribute name="description" value="${facet_description}"/>
2179 <dc:attribute name="ids" value="${facet_num}"/> 2179 <dc:attribute name="ids" value="${facet_num}"/>
2180 <dc:attribute name="factory" value="winfo"/> 2180 <dc:attribute name="factory" value="winfo"/>
2181 <dc:attribute name="artifact-id" value="${a_gid}"/> 2181 <dc:attribute name="artifact-id" value="${a_gid}"/>
2182 <dc:attribute name="out" value="longitudinal_section"/> 2182 <dc:attribute name="out" value="longitudinal_section"/>
2183 </dc:element> 2183 </dc:element>
2184 </dc:elements> 2184 </dc:for-each>
2185 </longitudinal_section_columns> 2185 </longitudinal_section_columns>
2186 </dc:context> 2186 </dc:context>
2187 </dc:elements> 2187 </dc:for-each>
2188 </dc:context> 2188 </dc:context>
2189 </dc:call-macro> 2189 </dc:call-macro>
2190 </dc:context> 2190 </dc:context>
2191 </dc:elements> 2191 </dc:for-each>
2192 </waterlevels> 2192 </waterlevels>
2193 </dc:macro> 2193 </dc:macro>
2194 2194
2195 2195
2196 <dc:macro name="longitudinal-section"> 2196 <dc:macro name="longitudinal-section">
2197 <waterlevels> 2197 <waterlevels>
2198 <dc:elements> 2198 <dc:for-each>
2199 <dc:context> 2199 <dc:context>
2200 <dc:call-macro name="range-filter"> 2200 <dc:call-macro name="range-filter">
2201 <dc:context> 2201 <dc:context>
2202 <dc:statement> 2202 <dc:statement>
2203 SELECT id AS out_id 2203 SELECT id AS out_id
2204 FROM outs 2204 FROM outs
2205 WHERE artifact_id = ${a_id} AND name = 'fix_longitudinal_section_curve' 2205 WHERE artifact_id = ${a_id} AND name = 'fix_longitudinal_section_curve'
2206 </dc:statement> 2206 </dc:statement>
2207 <dc:elements> 2207 <dc:for-each>
2208 <dc:context> 2208 <dc:context>
2209 <!-- average und deviation ls_0 . ls_1 ...--> 2209 <!-- average und deviation ls_0 . ls_1 ...-->
2210 <dc:statement> 2210 <dc:statement>
2211 SELECT name AS facet_name, num as facet_num, description AS facet_description 2211 SELECT name AS facet_name, num as facet_num, description AS facet_description
2212 FROM facets 2212 FROM facets
2213 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%' ) 2213 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%' )
2214 ORDER BY num ASC, name DESC 2214 ORDER BY num ASC, name DESC
2215 </dc:statement> 2215 </dc:statement>
2216 <waterlevels> 2216 <waterlevels>
2217 <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> 2217 <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/>
2218 <dc:elements> 2218 <dc:for-each>
2219 <dc:element name="${facet_name}"> 2219 <dc:element name="${facet_name}">
2220 <dc:attribute name="description" value="${facet_description}"/> 2220 <dc:attribute name="description" value="${facet_description}"/>
2221 <dc:attribute name="ids" value="${facet_num}"/> 2221 <dc:attribute name="ids" value="${facet_num}"/>
2222 <dc:attribute name="factory" value="fixanalysis"/> 2222 <dc:attribute name="factory" value="fixanalysis"/>
2223 <dc:attribute name="artifact-id" value="${a_gid}"/> 2223 <dc:attribute name="artifact-id" value="${a_gid}"/>
2224 <dc:attribute name="out" value="fix_longitudinal_section_curve"/> 2224 <dc:attribute name="out" value="fix_longitudinal_section_curve"/>
2225 </dc:element> 2225 </dc:element>
2226 </dc:elements> 2226 </dc:for-each>
2227 </waterlevels> 2227 </waterlevels>
2228 </dc:context> 2228 </dc:context>
2229 </dc:elements> 2229 </dc:for-each>
2230 </dc:context> 2230 </dc:context>
2231 </dc:call-macro> 2231 </dc:call-macro>
2232 </dc:context> 2232 </dc:context>
2233 </dc:elements> 2233 </dc:for-each>
2234 </waterlevels> 2234 </waterlevels>
2235 </dc:macro> 2235 </dc:macro>
2236 2236
2237 <dc:macro name="delta-wt"> 2237 <dc:macro name="delta-wt">
2238 <waterlevels> 2238 <waterlevels>
2239 <dc:elements> 2239 <dc:for-each>
2240 <dc:context> 2240 <dc:context>
2241 <dc:call-macro name="range-filter"> 2241 <dc:call-macro name="range-filter">
2242 <dc:context> 2242 <dc:context>
2243 <dc:statement> 2243 <dc:statement>
2244 SELECT id AS out_id 2244 SELECT id AS out_id
2245 FROM outs 2245 FROM outs
2246 WHERE artifact_id = ${a_id} AND name = 'fix_deltawt_curve' 2246 WHERE artifact_id = ${a_id} AND name = 'fix_deltawt_curve'
2247 </dc:statement> 2247 </dc:statement>
2248 <dc:elements> 2248 <dc:for-each>
2249 <dc:context> 2249 <dc:context>
2250 <dc:statement> 2250 <dc:statement>
2251 SELECT name AS facet_name, num as facet_num, description AS facet_description 2251 SELECT name AS facet_name, num as facet_num, description AS facet_description
2252 FROM facets 2252 FROM facets
2253 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' ) 2253 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' )
2254 ORDER BY num ASC, name DESC 2254 ORDER BY num ASC, name DESC
2255 </dc:statement> 2255 </dc:statement>
2256 <waterlevels> 2256 <waterlevels>
2257 <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> 2257 <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/>
2258 <dc:elements> 2258 <dc:for-each>
2259 <dc:element name="${facet_name}"> 2259 <dc:element name="${facet_name}">
2260 <dc:attribute name="description" value="${facet_description}"/> 2260 <dc:attribute name="description" value="${facet_description}"/>
2261 <dc:attribute name="ids" value="${facet_num}"/> 2261 <dc:attribute name="ids" value="${facet_num}"/>
2262 <dc:attribute name="factory" value="fixanalysis"/> 2262 <dc:attribute name="factory" value="fixanalysis"/>
2263 <dc:attribute name="artifact-id" value="${a_gid}"/> 2263 <dc:attribute name="artifact-id" value="${a_gid}"/>
2264 <dc:attribute name="out" value="fix_deltawt_curve"/> 2264 <dc:attribute name="out" value="fix_deltawt_curve"/>
2265 </dc:element> 2265 </dc:element>
2266 </dc:elements> 2266 </dc:for-each>
2267 </waterlevels> 2267 </waterlevels>
2268 </dc:context> 2268 </dc:context>
2269 </dc:elements> 2269 </dc:for-each>
2270 </dc:context> 2270 </dc:context>
2271 </dc:call-macro> 2271 </dc:call-macro>
2272 </dc:context> 2272 </dc:context>
2273 </dc:elements> 2273 </dc:for-each>
2274 </waterlevels> 2274 </waterlevels>
2275 </dc:macro> 2275 </dc:macro>
2276 2276
2277 2277
2278 <dc:macro name="fix-derivate-curve"> 2278 <dc:macro name="fix-derivate-curve">
2279 <waterlevels> 2279 <waterlevels>
2280 <dc:elements> 2280 <dc:for-each>
2281 <dc:context> 2281 <dc:context>
2282 <dc:call-macro name="range-filter"> 2282 <dc:call-macro name="range-filter">
2283 <dc:context> 2283 <dc:context>
2284 <dc:statement> 2284 <dc:statement>
2285 SELECT id AS out_id 2285 SELECT id AS out_id
2286 FROM outs 2286 FROM outs
2287 WHERE artifact_id = ${a_id} AND name = 'fix_derivate_curve' 2287 WHERE artifact_id = ${a_id} AND name = 'fix_derivate_curve'
2288 </dc:statement> 2288 </dc:statement>
2289 <dc:elements> 2289 <dc:for-each>
2290 <dc:context> 2290 <dc:context>
2291 <dc:statement> 2291 <dc:statement>
2292 SELECT name AS facet_name, num as facet_num, description AS facet_description 2292 SELECT name AS facet_name, num as facet_num, description AS facet_description
2293 FROM facets 2293 FROM facets
2294 WHERE out_id = ${out_id} and name = 'fix_derivate_curve' 2294 WHERE out_id = ${out_id} and name = 'fix_derivate_curve'
2295 ORDER BY num ASC, name DESC 2295 ORDER BY num ASC, name DESC
2296 </dc:statement> 2296 </dc:statement>
2297 <waterlevels> 2297 <waterlevels>
2298 <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> 2298 <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/>
2299 <dc:elements> 2299 <dc:for-each>
2300 <dc:element name="${facet_name}"> 2300 <dc:element name="${facet_name}">
2301 <dc:attribute name="description" value="${facet_description}"/> 2301 <dc:attribute name="description" value="${facet_description}"/>
2302 <dc:attribute name="ids" value="${facet_num}"/> 2302 <dc:attribute name="ids" value="${facet_num}"/>
2303 <dc:attribute name="factory" value="fixanalysis"/> 2303 <dc:attribute name="factory" value="fixanalysis"/>
2304 <dc:attribute name="artifact-id" value="${a_gid}"/> 2304 <dc:attribute name="artifact-id" value="${a_gid}"/>
2305 <dc:attribute name="out" value="fix_derivate_curve"/> 2305 <dc:attribute name="out" value="fix_derivate_curve"/>
2306 </dc:element> 2306 </dc:element>
2307 </dc:elements> 2307 </dc:for-each>
2308 </waterlevels> 2308 </waterlevels>
2309 </dc:context> 2309 </dc:context>
2310 </dc:elements> 2310 </dc:for-each>
2311 </dc:context> 2311 </dc:context>
2312 </dc:call-macro> 2312 </dc:call-macro>
2313 </dc:context> 2313 </dc:context>
2314 </dc:elements> 2314 </dc:for-each>
2315 </waterlevels> 2315 </waterlevels>
2316 </dc:macro> 2316 </dc:macro>
2317 2317
2318 2318
2319 <dc:macro name="fix-wq-curve"> 2319 <dc:macro name="fix-wq-curve">
2320 <waterlevels> 2320 <waterlevels>
2321 <dc:elements> 2321 <dc:for-each>
2322 <dc:context> 2322 <dc:context>
2323 <dc:call-macro name="range-filter"> 2323 <dc:call-macro name="range-filter">
2324 <dc:context> 2324 <dc:context>
2325 <dc:statement> 2325 <dc:statement>
2326 SELECT id AS out_id 2326 SELECT id AS out_id
2327 FROM outs 2327 FROM outs
2328 WHERE artifact_id = ${a_id} AND name = 'fix_wq_curve' 2328 WHERE artifact_id = ${a_id} AND name = 'fix_wq_curve'
2329 </dc:statement> 2329 </dc:statement>
2330 <dc:elements> 2330 <dc:for-each>
2331 <dc:context> 2331 <dc:context>
2332 <dc:statement> 2332 <dc:statement>
2333 SELECT name AS facet_name, num as facet_num, description AS facet_description 2333 SELECT name AS facet_name, num as facet_num, description AS facet_description
2334 FROM facets 2334 FROM facets
2335 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%' ) 2335 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%' )
2336 ORDER BY num ASC, name DESC 2336 ORDER BY num ASC, name DESC
2337 </dc:statement> 2337 </dc:statement>
2338 <waterlevels> 2338 <waterlevels>
2339 <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> 2339 <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/>
2340 <dc:elements> 2340 <dc:for-each>
2341 <dc:element name="${facet_name}"> 2341 <dc:element name="${facet_name}">
2342 <dc:attribute name="description" value="${facet_description}"/> 2342 <dc:attribute name="description" value="${facet_description}"/>
2343 <dc:attribute name="ids" value="${facet_num}"/> 2343 <dc:attribute name="ids" value="${facet_num}"/>
2344 <dc:attribute name="factory" value="fixanalysis"/> 2344 <dc:attribute name="factory" value="fixanalysis"/>
2345 <dc:attribute name="artifact-id" value="${a_gid}"/> 2345 <dc:attribute name="artifact-id" value="${a_gid}"/>
2346 <dc:attribute name="out" value="fix_wq_curve"/> 2346 <dc:attribute name="out" value="fix_wq_curve"/>
2347 </dc:element> 2347 </dc:element>
2348 </dc:elements> 2348 </dc:for-each>
2349 </waterlevels> 2349 </waterlevels>
2350 </dc:context> 2350 </dc:context>
2351 </dc:elements> 2351 </dc:for-each>
2352 </dc:context> 2352 </dc:context>
2353 </dc:call-macro> 2353 </dc:call-macro>
2354 </dc:context> 2354 </dc:context>
2355 </dc:elements> 2355 </dc:for-each>
2356 </waterlevels> 2356 </waterlevels>
2357 </dc:macro> 2357 </dc:macro>
2358 2358
2359 2359
2360 <dc:macro name="duration-curve"> 2360 <dc:macro name="duration-curve">
2361 <computed_discharge_curves> 2361 <computed_discharge_curves>
2362 <dc:elements> 2362 <dc:for-each>
2363 <dc:context> 2363 <dc:context>
2364 <dc:call-macro name="range-filter"> 2364 <dc:call-macro name="range-filter">
2365 <dc:context> 2365 <dc:context>
2366 <dc:statement> 2366 <dc:statement>
2367 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description 2367 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description
2368 FROM outs as o, facets as f, artifacts as a 2368 FROM outs as o, facets as f, artifacts as a
2369 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} 2369 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}
2370 </dc:statement> 2370 </dc:statement>
2371 <dc:elements> 2371 <dc:for-each>
2372 <dc:element name="${facet_name}"> 2372 <dc:element name="${facet_name}">
2373 <dc:attribute name="description" value="${facet_description}"/> 2373 <dc:attribute name="description" value="${facet_description}"/>
2374 <dc:attribute name="factory" value="winfo"/> 2374 <dc:attribute name="factory" value="winfo"/>
2375 <dc:attribute name="artifact-id" value="${aid}"/> 2375 <dc:attribute name="artifact-id" value="${aid}"/>
2376 <dc:attribute name="ids" value="${aid}"/> 2376 <dc:attribute name="ids" value="${aid}"/>
2377 <dc:attribute name="out" value="duration_curve"/> 2377 <dc:attribute name="out" value="duration_curve"/>
2378 </dc:element> 2378 </dc:element>
2379 </dc:elements> 2379 </dc:for-each>
2380 </dc:context> 2380 </dc:context>
2381 </dc:call-macro> 2381 </dc:call-macro>
2382 </dc:context> 2382 </dc:context>
2383 </dc:elements> 2383 </dc:for-each>
2384 </computed_discharge_curves> 2384 </computed_discharge_curves>
2385 </dc:macro> 2385 </dc:macro>
2386 2386
2387 <dc:comment> 2387 <dc:comment>
2388 WATERLEVELS - ONLY SHOW Ws 2388 WATERLEVELS - ONLY SHOW Ws
2390 2390
2391 <!-- TODO doesnt work nicely for fix/wq-diags. --> 2391 <!-- TODO doesnt work nicely for fix/wq-diags. -->
2392 2392
2393 <dc:macro name="waterlevels-fix"> 2393 <dc:macro name="waterlevels-fix">
2394 <waterlevels> 2394 <waterlevels>
2395 <dc:elements> 2395 <dc:for-each>
2396 <dc:context> 2396 <dc:context>
2397 <dc:call-macro name="range-filter"> 2397 <dc:call-macro name="range-filter">
2398 <dc:context> 2398 <dc:context>
2399 <dc:statement> 2399 <dc:statement>
2400 SELECT id AS out_id 2400 SELECT id AS out_id
2401 FROM outs 2401 FROM outs
2402 WHERE artifact_id = ${a_id} AND name = 'longitudinal_section' 2402 WHERE artifact_id = ${a_id} AND name = 'longitudinal_section'
2403 </dc:statement> 2403 </dc:statement>
2404 <dc:elements> 2404 <dc:for-each>
2405 <dc:context> 2405 <dc:context>
2406 <dc:statement> 2406 <dc:statement>
2407 SELECT name AS facet_name, num as facet_num, description AS facet_description 2407 SELECT name AS facet_name, num as facet_num, description AS facet_description
2408 FROM facets 2408 FROM facets
2409 WHERE out_id = ${out_id} and name = 'longitudinal_section.w' 2409 WHERE out_id = ${out_id} and name = 'longitudinal_section.w'
2410 ORDER BY num ASC, name DESC 2410 ORDER BY num ASC, name DESC
2411 </dc:statement> 2411 </dc:statement>
2412 <waterlevels> 2412 <waterlevels>
2413 <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> 2413 <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/>
2414 <dc:elements> 2414 <dc:for-each>
2415 <dc:element name="${facet_name}"> 2415 <dc:element name="${facet_name}">
2416 <dc:attribute name="description" value="${facet_description}"/> 2416 <dc:attribute name="description" value="${facet_description}"/>
2417 <dc:attribute name="ids" value="${facet_num}"/> 2417 <dc:attribute name="ids" value="${facet_num}"/>
2418 <dc:attribute name="factory" value="winfo"/> 2418 <dc:attribute name="factory" value="winfo"/>
2419 <dc:attribute name="artifact-id" value="${a_gid}"/> 2419 <dc:attribute name="artifact-id" value="${a_gid}"/>
2420 <dc:attribute name="out" value="longitudinal_section"/> 2420 <dc:attribute name="out" value="longitudinal_section"/>
2421 </dc:element> 2421 </dc:element>
2422 </dc:elements> 2422 </dc:for-each>
2423 </waterlevels> 2423 </waterlevels>
2424 </dc:context> 2424 </dc:context>
2425 </dc:elements> 2425 </dc:for-each>
2426 </dc:context> 2426 </dc:context>
2427 </dc:call-macro> 2427 </dc:call-macro>
2428 </dc:context> 2428 </dc:context>
2429 </dc:elements> 2429 </dc:for-each>
2430 </waterlevels> 2430 </waterlevels>
2431 </dc:macro> 2431 </dc:macro>
2432 2432
2433 <dc:comment> 2433 <dc:comment>
2434 SHOW FLOODMAPS 2434 SHOW FLOODMAPS
2435 </dc:comment> 2435 </dc:comment>
2436 2436
2437 2437
2438 <dc:macro name="flood-map"> 2438 <dc:macro name="flood-map">
2439 <floodmap> 2439 <floodmap>
2440 <dc:elements> 2440 <dc:for-each>
2441 <dc:context> 2441 <dc:context>
2442 <dc:call-macro name="range-filter"> 2442 <dc:call-macro name="range-filter">
2443 <dc:context> 2443 <dc:context>
2444 <dc:statement> 2444 <dc:statement>
2445 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description 2445 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description
2446 FROM outs as o, facets as f, artifacts as a 2446 FROM outs as o, facets as f, artifacts as a
2447 WHERE f.name = 'floodmap.wsplgen' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} 2447 WHERE f.name = 'floodmap.wsplgen' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id}
2448 </dc:statement> 2448 </dc:statement>
2449 <dc:elements> 2449 <dc:for-each>
2450 <dc:element name="${facet_name}"> 2450 <dc:element name="${facet_name}">
2451 <dc:attribute name="description" value="${facet_description}"/> 2451 <dc:attribute name="description" value="${facet_description}"/>
2452 <dc:attribute name="factory" value="winfo"/> 2452 <dc:attribute name="factory" value="winfo"/>
2453 <dc:attribute name="artifact-id" value="${aid}"/> 2453 <dc:attribute name="artifact-id" value="${aid}"/>
2454 <dc:attribute name="ids" value="${aid}"/> 2454 <dc:attribute name="ids" value="${aid}"/>
2455 <dc:attribute name="out" value="floodmap"/> 2455 <dc:attribute name="out" value="floodmap"/>
2456 </dc:element> 2456 </dc:element>
2457 </dc:elements> 2457 </dc:for-each>
2458 </dc:context> 2458 </dc:context>
2459 </dc:call-macro> 2459 </dc:call-macro>
2460 </dc:context> 2460 </dc:context>
2461 </dc:elements> 2461 </dc:for-each>
2462 </floodmap> 2462 </floodmap>
2463 </dc:macro> 2463 </dc:macro>
2464 2464
2465 <dc:comment> 2465 <dc:comment>
2466 MINFO bedheight difference 2466 MINFO bedheight difference
2467 </dc:comment> 2467 </dc:comment>
2468 2468
2469 <dc:macro name="bed-difference"> 2469 <dc:macro name="bed-difference">
2470 <fix_longitudinal_section_curve> 2470 <fix_longitudinal_section_curve>
2471 <dc:elements> 2471 <dc:for-each>
2472 <dc:context> 2472 <dc:context>
2473 <dc:call-macro name="range-filter"> 2473 <dc:call-macro name="range-filter">
2474 <dc:context> 2474 <dc:context>
2475 <dc:statement> 2475 <dc:statement>
2476 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description 2476 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description
2479 or f.name = 'fix_sector_average_ls_3' or f.name = 'fix_analysis_events_ls' or f.name = 'fix_reference_events_ls') 2479 or f.name = 'fix_sector_average_ls_3' or f.name = 'fix_analysis_events_ls' or f.name = 'fix_reference_events_ls')
2480 and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} 2480 and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id}
2481 </dc:statement> 2481 </dc:statement>
2482 <fix_longitudinal_section_curve> 2482 <fix_longitudinal_section_curve>
2483 <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> 2483 <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/>
2484 <dc:elements> 2484 <dc:for-each>
2485 <dc:element name="${facet_name}"> 2485 <dc:element name="${facet_name}">
2486 <dc:attribute name="description" value="${facet_description}"/> 2486 <dc:attribute name="description" value="${facet_description}"/>
2487 <dc:attribute name="factory" value="fixanalysis"/> 2487 <dc:attribute name="factory" value="fixanalysis"/>
2488 <dc:attribute name="artifact-id" value="${aid}"/> 2488 <dc:attribute name="artifact-id" value="${aid}"/>
2489 <dc:attribute name="ids" value="${facet_num}"/> 2489 <dc:attribute name="ids" value="${facet_num}"/>
2490 <dc:attribute name="out" value="fix_longitudinal_section_curve"/> 2490 <dc:attribute name="out" value="fix_longitudinal_section_curve"/>
2491 </dc:element> 2491 </dc:element>
2492 </dc:elements> 2492 </dc:for-each>
2493 </fix_longitudinal_section_curve> 2493 </fix_longitudinal_section_curve>
2494 </dc:context> 2494 </dc:context>
2495 </dc:call-macro> 2495 </dc:call-macro>
2496 </dc:context> 2496 </dc:context>
2497 </dc:elements> 2497 </dc:for-each>
2498 </fix_longitudinal_section_curve> 2498 </fix_longitudinal_section_curve>
2499 </dc:macro> 2499 </dc:macro>
2500 2500
2501 <dc:comment> 2501 <dc:comment>
2502 MINFO bedheight middle 2502 MINFO bedheight middle
2503 </dc:comment> 2503 </dc:comment>
2504 2504
2505 <dc:macro name="bed-height"> 2505 <dc:macro name="bed-height">
2506 <fix_vollmer_wq_curve> 2506 <fix_vollmer_wq_curve>
2507 <dc:elements> 2507 <dc:for-each>
2508 <dc:context> 2508 <dc:context>
2509 <dc:call-macro name="range-filter"> 2509 <dc:call-macro name="range-filter">
2510 <dc:context> 2510 <dc:context>
2511 <dc:statement> 2511 <dc:statement>
2512 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description 2512 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description
2514 WHERE (f.name = 'longitudinal_section.w' or f.name = 'heightmarks_points') 2514 WHERE (f.name = 'longitudinal_section.w' or f.name = 'heightmarks_points')
2515 and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} 2515 and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id}
2516 </dc:statement> 2516 </dc:statement>
2517 <fix_vollmer_wq_curve> 2517 <fix_vollmer_wq_curve>
2518 <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> 2518 <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/>
2519 <dc:elements> 2519 <dc:for-each>
2520 <dc:element name="${facet_name}"> 2520 <dc:element name="${facet_name}">
2521 <dc:attribute name="description" value="${facet_description}"/> 2521 <dc:attribute name="description" value="${facet_description}"/>
2522 <dc:attribute name="factory" value="fixanalysis"/> 2522 <dc:attribute name="factory" value="fixanalysis"/>
2523 <dc:attribute name="artifact-id" value="${aid}"/> 2523 <dc:attribute name="artifact-id" value="${aid}"/>
2524 <dc:attribute name="ids" value="${facet_num}"/> 2524 <dc:attribute name="ids" value="${facet_num}"/>
2525 <dc:attribute name="out" value="longitudinal_section"/> 2525 <dc:attribute name="out" value="longitudinal_section"/>
2526 </dc:element> 2526 </dc:element>
2527 </dc:elements> 2527 </dc:for-each>
2528 </fix_vollmer_wq_curve> 2528 </fix_vollmer_wq_curve>
2529 </dc:context> 2529 </dc:context>
2530 </dc:call-macro> 2530 </dc:call-macro>
2531 </dc:context> 2531 </dc:context>
2532 </dc:elements> 2532 </dc:for-each>
2533 </fix_vollmer_wq_curve> 2533 </fix_vollmer_wq_curve>
2534 </dc:macro> 2534 </dc:macro>
2535 2535
2536 <dc:macro name="floodmap-hws-user"> 2536 <dc:macro name="floodmap-hws-user">
2537 <dc:context> 2537 <dc:context>
2538 <dc:statement> 2538 <dc:statement>
2539 SELECT id AS out_id 2539 SELECT id AS out_id
2540 FROM outs 2540 FROM outs
2541 WHERE artifact_id = ${a_id} AND name = 'floodmap' 2541 WHERE artifact_id = ${a_id} AND name = 'floodmap'
2542 </dc:statement> 2542 </dc:statement>
2543 <dc:elements> 2543 <dc:for-each>
2544 <dc:context> 2544 <dc:context>
2545 <dc:statement> 2545 <dc:statement>
2546 SELECT name AS facet_name, num as facet_num, description AS facet_description 2546 SELECT name AS facet_name, num as facet_num, description AS facet_description
2547 FROM facets 2547 FROM facets
2548 WHERE out_id = ${out_id} and name = 'floodmap.usershape' 2548 WHERE out_id = ${out_id} and name = 'floodmap.usershape'
2549 ORDER BY num ASC, name DESC 2549 ORDER BY num ASC, name DESC
2550 </dc:statement> 2550 </dc:statement>
2551 <own-hws> 2551 <own-hws>
2552 <dc:elements> 2552 <dc:for-each>
2553 <dc:element name="${facet_name}"> 2553 <dc:element name="${facet_name}">
2554 <dc:attribute name="description" value="${facet_description}"/> 2554 <dc:attribute name="description" value="${facet_description}"/>
2555 <dc:attribute name="ids" value="${facet_num}"/> 2555 <dc:attribute name="ids" value="${facet_num}"/>
2556 <dc:attribute name="factory" value="winfo"/> 2556 <dc:attribute name="factory" value="winfo"/>
2557 <dc:attribute name="artifact-id" value="${a_gid}"/> 2557 <dc:attribute name="artifact-id" value="${a_gid}"/>
2558 <dc:attribute name="out" value="floodmap"/> 2558 <dc:attribute name="out" value="floodmap"/>
2559 </dc:element> 2559 </dc:element>
2560 </dc:elements> 2560 </dc:for-each>
2561 </own-hws> 2561 </own-hws>
2562 </dc:context> 2562 </dc:context>
2563 </dc:elements> 2563 </dc:for-each>
2564 </dc:context> 2564 </dc:context>
2565 </dc:macro> 2565 </dc:macro>
2566 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section') or (dc:contains($artifact-outs, 'discharge_longitudinal_section') or (dc:contains($artifact-outs, 'w_differences')))"> 2566 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section') or (dc:contains($artifact-outs, 'discharge_longitudinal_section') or (dc:contains($artifact-outs, 'w_differences')))">
2567 <dc:call-macro name="longitudinal"/> 2567 <dc:call-macro name="longitudinal"/>
2568 </dc:if> 2568 </dc:if>

http://dive4elements.wald.intevation.org