comparison flys-artifacts/doc/conf/meta-data.xml @ 1905:d025009fec73

Recommend fixations for computed discharge curves. flys-artifacts/trunk@3265 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 16 Nov 2011 09:43:58 +0000
parents ebd16028efa3
children efff4305dc05
comparison
equal deleted inserted replaced
1904:af043ef347ed 1905:d025009fec73
76 </dc:elements> 76 </dc:elements>
77 </dc:context> 77 </dc:context>
78 </addtionals> 78 </addtionals>
79 </dc:macro> 79 </dc:macro>
80 80
81 <dc:macro name="basedata_2_fixations_wst">
82 <fixations>
83 <dc:context>
84 <dc:statement>
85 SELECT id AS prot_id,
86 description AS prot_description
87 FROM wsts WHERE kind = 2 AND river_id = ${river_id}
88 </dc:statement>
89 <dc:elements>
90 <fixation>
91 <dc:attribute name="name" value="${prot_description}"/>
92 <dc:attribute name="ids" value="fixations-wstv-A-${prot_id}"/>
93 <dc:attribute name="factory" value="wqinterpol"/>
94 </fixation>
95 </dc:elements>
96 </dc:context>
97 </fixations>
98 </dc:macro>
99
100 <dc:macro name="basedata_2_fixations_wqkms">
101 <fixations>
102 <dc:context>
103 <dc:statement>
104 SELECT id AS prot_id,
105 description AS prot_description
106 FROM wsts WHERE kind = 2 AND river_id = ${river_id}
107 </dc:statement>
108 <dc:elements>
109 <fixation>
110 <dc:attribute name="name" value="${prot_description}"/>
111 <dc:context>
112 <dc:statement>
113 SELECT id AS prot_column_id,
114 name AS prot_column_name,
115 position AS prot_rel_pos
116 FROM wst_columns WHERE wst_id = ${prot_id}
117 ORDER by position
118 </dc:statement>
119 <dc:elements>
120 <column>
121 <dc:attribute name="name" value="${prot_column_name}"/>
122 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/>
123 <dc:attribute name="factory" value="wqinterpol"/>
124 </column>
125 </dc:elements>
126 </dc:context>
127 </fixation>
128 </dc:elements>
129 </dc:context>
130 </fixations>
131 </dc:macro>
132
81 <dc:macro name="basedata_2_fixations"> 133 <dc:macro name="basedata_2_fixations">
82 <fixations> 134 <fixations>
83 <dc:context> 135 <dc:context>
84 <dc:statement> 136 <dc:statement>
85 SELECT id AS prot_id, 137 SELECT id AS prot_id,
109 </dc:elements> 161 </dc:elements>
110 </dc:context> 162 </dc:context>
111 </fixations> 163 </fixations>
112 </dc:macro> 164 </dc:macro>
113 165
114
115 <dc:macro name="basedata_4_heightmarks-points"> 166 <dc:macro name="basedata_4_heightmarks-points">
116 <heightmarks> 167 <heightmarks>
117 <dc:context> 168 <dc:context>
118 <dc:statement> 169 <dc:statement>
119 SELECT id AS prot_id, 170 SELECT id AS prot_id,
143 </dc:elements> 194 </dc:elements>
144 </dc:context> 195 </dc:context>
145 </heightmarks> 196 </heightmarks>
146 </dc:macro> 197 </dc:macro>
147 198
199 <dc:macro name="basedata_5_flood-protections">
200 <flood-protections>
201 <dc:attribute name="id" value="flood-protections-${river_id}"/>
202 <dc:context>
203 <dc:statement>
204 SELECT id AS prot_id,
205 description AS prot_description
206 FROM wsts WHERE kind = 5 AND river_id = ${river_id}
207 </dc:statement>
208 <dc:elements>
209 <flood-protection>
210 <dc:attribute name="name" value="${prot_description}"/>
211 <dc:attribute name="db-id" value="${prot_id}"/>
212 <dc:attribute name="factory" value="staticwkms"/>
213 <columns>
214 <dc:context>
215 <dc:statement>
216 SELECT id AS prot_column_id,
217 name AS prot_column_name,
218 position AS prot_rel_pos
219 FROM wst_columns WHERE wst_id = ${prot_id}
220 ORDER by position
221 </dc:statement>
222 <dc:elements>
223 <column>
224 <dc:attribute name="name" value="${prot_column_name}"/>
225 <dc:attribute name="ids" value="flood_protection-wstv-${prot_rel_pos}-${prot_id}"/>
226 <dc:attribute name="factory" value="staticwkms"/>
227 </column>
228 </dc:elements>
229 </dc:context>
230 </columns>
231 </flood-protection>
232 </dc:elements>
233 </dc:context>
234 </flood-protections>
235 </dc:macro>
236
148 <dc:macro name="mainvalues"> 237 <dc:macro name="mainvalues">
149 <mainvalue> 238 <mainvalue>
150 <dc:attribute name="factory" value="mainvalue"/> 239 <dc:attribute name="factory" value="mainvalue"/>
151 <dc:attribute name="ids" value="${river_id}"/> 240 <dc:attribute name="ids" value="${river_id}"/>
152 </mainvalue> 241 </mainvalue>
188 </dc:if> 277 </dc:if>
189 <dc:if test="dc:contains($artifact-outs, 'discharge_longitudinal_section')"> 278 <dc:if test="dc:contains($artifact-outs, 'discharge_longitudinal_section')">
190 <dc:call-macro name="basedata_0"/> 279 <dc:call-macro name="basedata_0"/>
191 <dc:call-macro name="basedata_4_heightmarks-points"/> 280 <dc:call-macro name="basedata_4_heightmarks-points"/>
192 </dc:if> 281 </dc:if>
282 <dc:if test="dc:contains($artifact-outs, 'computed_discharge_curve')">
283 <dc:call-macro name="basedata_0"/>
284 <dc:call-macro name="basedata_4_heightmarks-points"/>
285 </dc:if>
193 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section') or (dc:contains($artifact-outs, 'w_differences'))"> 286 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section') or (dc:contains($artifact-outs, 'w_differences'))">
194 <dc:call-macro name="basedata_0"/> 287 <dc:call-macro name="basedata_0"/>
195 <dc:call-macro name="basedata_1_additionals"/> 288 <dc:call-macro name="basedata_1_additionals"/>
196 <dc:comment comment=" FIXATIONS ---------------------------"/> 289 <dc:comment comment=" FIXATIONS ---------------------------"/>
197 <dc:call-macro name="basedata_2_fixations"/> 290 <dc:call-macro name="basedata_2_fixations"/>
202 </dc:otherwise> 295 </dc:otherwise>
203 </dc:choose> 296 </dc:choose>
204 297
205 298
206 <dc:if test="dc:contains($artifact-outs, 'waterlevels')"> 299 <dc:if test="dc:contains($artifact-outs, 'waterlevels')">
207 <flood-protections> 300
208 <dc:attribute name="id" value="flood-protections-${river_id}"/>
209 <dc:context>
210 <dc:statement>
211 SELECT id AS prot_id,
212 description AS prot_description
213 FROM wsts WHERE kind = 5 AND river_id = ${river_id}
214 </dc:statement>
215 <dc:elements>
216 <flood-protection>
217 <dc:attribute name="name" value="${prot_description}"/>
218 <dc:attribute name="db-id" value="${prot_id}"/>
219 <dc:attribute name="factory" value="staticwkms"/>
220 <columns>
221 <dc:context>
222 <dc:statement>
223 SELECT id AS prot_column_id,
224 name AS prot_column_name,
225 position AS prot_rel_pos
226 FROM wst_columns WHERE wst_id = ${prot_id}
227 ORDER by position
228 </dc:statement>
229 <dc:elements>
230 <column>
231 <dc:attribute name="name" value="${prot_column_name}"/>
232 <dc:attribute name="ids" value="flood_protection-wstv-${prot_rel_pos}-${prot_id}"/>
233 <dc:attribute name="factory" value="staticwkms"/>
234 </column>
235 </dc:elements>
236 </dc:context>
237 </columns>
238 </flood-protection>
239 </dc:elements>
240 </dc:context>
241 </flood-protections>
242 <!-- base data --> 301 <!-- base data -->
243 <dc:call-macro name="basedata_0"/> 302 <dc:call-macro name="basedata_0"/>
244 <!--extra-longitudinal-sections--> 303
304 <!-- extra-longitudinal-sections -->
245 <dc:call-macro name="basedata_1_additionals"/> 305 <dc:call-macro name="basedata_1_additionals"/>
246 306
247 <!-- fixations --> 307 <!-- fixations -->
248 <dc:call-macro name="basedata_2_fixations"/> 308 <dc:call-macro name="basedata_2_fixations"/>
249 309
250 <!-- flood water marks--> 310 <!-- flood water marks-->
251 <dc:call-macro name="basedata_4_heightmarks-points"/> 311 <dc:call-macro name="basedata_4_heightmarks-points"/>
312
313 <!-- flood protection -->
314 <dc:call-macro name="basedata_5_flood-protections"/>
315
252 </dc:if> 316 </dc:if>
317 <dc:if test="dc:contains($artifact-outs, 'computed_discharge_curve') and (dc:contains($parameters, 'recommended'))">
318 <!--dc:call-macro name="basedata_2_fixations_wst"/-->
319 </dc:if>
320
253 <dc:if test="dc:contains($artifact-outs, 'computed_discharge_curve') and not (dc:contains($parameters, 'recommended'))"> 321 <dc:if test="dc:contains($artifact-outs, 'computed_discharge_curve') and not (dc:contains($parameters, 'recommended'))">
254 <discharge-table-nn> 322 <discharge-table-nn>
255 <discharge-table-gauge> 323 <discharge-table-gauge>
256 <dc:context> 324 <dc:context>
257 <dc:statement> 325 <dc:statement>
283 </dc:context> 351 </dc:context>
284 </gauge> 352 </gauge>
285 </dc:elements> 353 </dc:elements>
286 </dc:context> 354 </dc:context>
287 </discharge-table-gauge> 355 </discharge-table-gauge>
288 <fixations>
289 <dc:attribute name="id" value="fixations-${river_id}"/>
290 <dc:context>
291 <dc:statement>
292 SELECT id AS fix_id,
293 description AS fix_description
294 FROM wsts WHERE kind = 2 AND river_id = ${river_id}
295 </dc:statement>
296 <dc:elements>
297 <fixation>
298 <dc:attribute name="name" value="${fix_description}"/>
299 <dc:attribute name="db-id" value="${fix_id}"/>
300 <columns>
301 <dc:context>
302 <dc:statement>
303 SELECT id AS fix_column_id,
304 name AS fix_column_name
305 FROM wst_columns WHERE wst_id = ${fix_id}
306 ORDER by position
307 </dc:statement>
308 <dc:elements>
309 <column>
310 <dc:attribute name="name" value="${fix_column_name}"/>
311 <dc:attribute name="db-id" value="${fix_column_id}"/>
312 </column>
313 </dc:elements>
314 </dc:context>
315 </columns>
316 </fixation>
317 </dc:elements>
318 </dc:context>
319 </fixations>
320 <flood-protections>
321 <dc:attribute name="id" value="flood-protections-${river_id}"/>
322 <dc:context>
323 <dc:statement>
324 SELECT id AS prot_id,
325 description AS prot_description
326 FROM wsts WHERE kind = 5 AND river_id = ${river_id}
327 </dc:statement>
328 <dc:elements>
329 <flood-protection>
330 <dc:attribute name="name" value="${prot_description}"/>
331 <dc:attribute name="db-id" value="${prot_id}"/>
332 <columns>
333 <dc:context>
334 <dc:statement>
335 SELECT id AS prot_column_id,
336 name AS prot_column_name
337 FROM wst_columns WHERE wst_id = ${prot_id}
338 ORDER by position
339 </dc:statement>
340 <dc:elements>
341 <column>
342 <dc:attribute name="name" value="${prot_column_name}"/>
343 <dc:attribute name="db-id" value="${prot_column_id}"/>
344 <dc:attribute name="factory" value="staticwkms"/>
345 </column>
346 </dc:elements>
347 </dc:context>
348 </columns>
349 </flood-protection>
350 </dc:elements>
351 </dc:context>
352 </flood-protections>
353
354 <!-- ex. waterlevels -->
355 <dc:call-macro name="basedata_0"/>
356
357 <dc:call-macro name="basedata_1_additionals"/>
358
359 <!-- ex. flood-water-marks -->
360 <dc:call-macro name="basedata_4_heightmarks-points"/>
361 356
362 </discharge-table-nn> 357 </discharge-table-nn>
358
359 <dc:call-macro name="basedata_2_fixations_wst"/>
360
361 <dc:call-macro name="basedata_5_flood-protections"/>
362
363 <!-- former waterlevels -->
364 <dc:call-macro name="basedata_0"/>
365
366 <dc:call-macro name="basedata_1_additionals"/>
367
368 <!-- former flood-water-marks -->
369 <dc:call-macro name="basedata_4_heightmarks-points"/>
363 </dc:if> 370 </dc:if>
364 <dc:if test="dc:contains($artifact-outs, 'computed_discharge_curve')"> 371 <dc:if test="dc:contains($artifact-outs, 'computed_discharge_curve')"><!-- or (dc:contains($artifact-outs, 'discharge_curve'))"-->
372 <!-- && parameter contains recommended/ation -->
365 <computed-discharge-curve> 373 <computed-discharge-curve>
366 <dc:call-macro name="mainvalues"/> 374 <dc:call-macro name="mainvalues"/>
367 </computed-discharge-curve> 375 </computed-discharge-curve>
376 <dc:call-macro name="basedata_2_fixations_wst"/>
368 </dc:if> 377 </dc:if>
378
369 <dc:if test="dc:contains($artifact-outs, 'duration_curve')"> 379 <dc:if test="dc:contains($artifact-outs, 'duration_curve')">
370 <dc:call-macro name="mainvalues"/> 380 <dc:call-macro name="mainvalues"/>
371 </dc:if> 381 </dc:if>
372 382
373 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section')"> 383 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section')">
585 <dc:comment> 595 <dc:comment>
586 User specific part 596 User specific part
587 ------------------ 597 ------------------
588 </dc:comment> 598 </dc:comment>
589 <dc:when test="dc:contains($parameters, 'user-id')"> 599 <dc:when test="dc:contains($parameters, 'user-id')">
600
590 601
591 <old_calculations> 602 <old_calculations>
592 <dc:context connection="user"> 603 <dc:context connection="user">
593 <dc:comment> 604 <dc:comment>
594 Get the user and collection-id. 605 Get the user and collection-id.

http://dive4elements.wald.intevation.org