comparison flys-artifacts/doc/conf/meta-data.xml @ 1181:dd59431d648f

Repaired datacage configuration. The system specific stuff is also displayed if a user-id is given. flys-artifacts/trunk@2772 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 16 Sep 2011 09:51:02 +0000
parents 94df49614d92
children c5f494a9749d
comparison
equal deleted inserted replaced
1180:1aba1a75beb2 1181:dd59431d648f
1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> 1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2 <dc:template xmlns:dc="http://www.intevation.org/2011/Datacage"> 2 <dc:template xmlns:dc="http://www.intevation.org/2011/Datacage">
3 <datacage> 3 <datacage>
4 <dc:macro name="load-system">
5 <dc:context connection="system">
6 <dc:statement>
7 SELECT id AS river_id, name as river_name FROM rivers
8 WHERE lower(name) LIKE lower(${river})
9 </dc:statement>
10 <dc:elements>
11 <river>
12 <dc:attribute name="name" value="${river_name}"/>
13 <dc:attribute name="db-id" value="${river_id}"/>
14 <dc:if test="dc:contains($artifact-outs, 'computed_discharge_curve')">
15 <discharge-table-nn>
16 <discharge-table-gauge>
17 <dc:context>
18 <dc:statement>
19 SELECT id AS gauge_id,
20 name AS gauge_name
21 FROM gauges WHERE river_id = ${river_id}
22 </dc:statement>
23 <dc:elements>
24 <gauge>
25 <dc:attribute name="name" value="${gauge_name}"/>
26 <dc:attribute name="db-id" value="${gauge_id}"/>
27 <dc:context>
28 <dc:statement>
29 SELECT description AS gauge_desc,
30 d.id AS discharge_id,
31 ti.start_time AS g_start,
32 ti.stop_time AS g_stop
33 FROM discharge_tables d JOIN time_intervals ti
34 ON d.time_interval_id = ti.id
35 WHERE d.gauge_id = ${gauge_id} AND d.kind = 1
36 </dc:statement>
37 <dc:elements>
38 <historical>
39 <dc:attribute name="name" value="${gauge_desc}"/>
40 <dc:attribute name="from" value="${g_start}"/>
41 <dc:attribute name="to" value="${g_stop}"/>
42 <dc:attribute name="db-id" value="${discharge_id}"/></historical>
43 </dc:elements>
44 </dc:context>
45 </gauge>
46 </dc:elements>
47 </dc:context>
48 </discharge-table-gauge>
49 <fixations>
50 <dc:attribute name="id" value="fixations-${river_id}"/>
51 <dc:context>
52 <dc:statement>
53 SELECT id AS fix_id,
54 description AS fix_description
55 FROM wsts WHERE kind = 2 AND river_id = ${river_id}
56 </dc:statement>
57 <dc:elements>
58 <fixation>
59 <dc:attribute name="name" value="${fix_description}"/>
60 <dc:attribute name="db-id" value="${fix_id}"/>
61 <columns>
62 <dc:context>
63 <dc:statement>
64 SELECT id AS fix_column_id,
65 name AS fix_column_name
66 FROM wst_columns WHERE wst_id = ${fix_id}
67 ORDER by position
68 </dc:statement>
69 <dc:elements>
70 <column>
71 <dc:attribute name="name" value="${fix_column_name}"/>
72 <dc:attribute name="db-id" value="${fix_column_id}"/></column>
73 </dc:elements>
74 </dc:context>
75 </columns>
76 </fixation>
77 </dc:elements>
78 </dc:context>
79 </fixations>
80 <flood-protections>
81 <dc:attribute name="id" value="flood-protections-${river_id}"/>
82 <dc:context>
83 <dc:statement>
84 SELECT id AS prot_id,
85 description AS prot_description
86 FROM wsts WHERE kind = 5 AND river_id = ${river_id}
87 </dc:statement>
88 <dc:elements>
89 <flood-protection>
90 <dc:attribute name="name" value="${prot_description}"/>
91 <dc:attribute name="db-id" value="${prot_id}"/>
92 <columns>
93 <dc:context>
94 <dc:statement>
95 SELECT id AS prot_column_id,
96 name AS prot_column_name
97 FROM wst_columns WHERE wst_id = ${prot_id}
98 ORDER by position
99 </dc:statement>
100 <dc:elements>
101 <column>
102 <dc:attribute name="name" value="${prot_column_name}"/>
103 <dc:attribute name="db-id" value="${prot_column_id}"/></column>
104 </dc:elements>
105 </dc:context>
106 </columns>
107 </flood-protection>
108 </dc:elements>
109 </dc:context>
110 </flood-protections>
111 <flood-water-marks>
112 <dc:attribute name="id" value="flood-water-marks-${river_id}"/>
113 <dc:context>
114 <dc:statement>
115 SELECT id AS fw_id,
116 description AS fw_description
117 FROM wsts WHERE kind = 4 AND river_id = ${river_id}
118 </dc:statement>
119 <dc:elements>
120 <flood-water-mark>
121 <dc:attribute name="name" value="${fw_description}"/>
122 <dc:attribute name="db-id" value="${fw_id}"/>
123 <columns>
124 <dc:context>
125 <dc:statement>
126 SELECT id AS fw_column_id,
127 name AS fw_column_name
128 FROM wst_columns WHERE wst_id = ${fw_id}
129 ORDER by position
130 </dc:statement>
131 <dc:elements>
132 <column>
133 <dc:attribute name="name" value="${fw_column_name}"/>
134 <dc:attribute name="db-id" value="${fw_column_id}"/></column>
135 </dc:elements>
136 </dc:context>
137 </columns>
138 </flood-water-mark>
139 </dc:elements>
140 </dc:context>
141 </flood-water-marks>
142 <water-levels>
143 <dc:attribute name="id" value="water-levels-${river_id}"/>
144 <dc:context>
145 <dc:statement>
146 SELECT id AS wl_id,
147 description AS wl_description
148 FROM wsts WHERE kind = 0 AND river_id = ${river_id}
149 </dc:statement>
150 <dc:elements>
151 <water-level>
152 <dc:attribute name="name" value="${wl_description}"/>
153 <dc:attribute name="db-id" value="${wl_id}"/>
154 <columns>
155 <dc:context>
156 <dc:statement>
157 SELECT id AS wl_column_id,
158 name AS wl_column_name
159 FROM wst_columns WHERE wst_id = ${wl_id}
160 ORDER by position
161 </dc:statement>
162 <dc:elements>
163 <column>
164 <dc:attribute name="name" value="${wl_column_name}"/>
165 <dc:attribute name="db-id" value="${wl_column_id}"/></column>
166 </dc:elements>
167 </dc:context>
168 </columns>
169 </water-level>
170 </dc:elements>
171 </dc:context>
172 </water-levels>
173 <extra-longitudinal-sections>
174 <dc:attribute name="id" value="extra-longitudinal-sections-${river_id}"/>
175 <dc:context>
176 <dc:statement>
177 SELECT id AS els_id,
178 description AS els_description
179 FROM wsts WHERE kind = 1 AND river_id = ${river_id}
180 </dc:statement>
181 <dc:elements>
182 <extra-longitudinal-section>
183 <dc:attribute name="name" value="${els_description}"/>
184 <dc:attribute name="db-id" value="${els_id}"/>
185 <columns>
186 <dc:context>
187 <dc:statement>
188 SELECT id AS els_column_id,
189 name AS els_column_name
190 FROM wst_columns WHERE wst_id = ${els_id}
191 ORDER by position
192 </dc:statement>
193 <dc:elements>
194 <column>
195 <dc:attribute name="name" value="${els_column_name}"/>
196 <dc:attribute name="db-id" value="${els_column_id}"/></column>
197 </dc:elements>
198 </dc:context>
199 </columns>
200 </extra-longitudinal-section>
201 </dc:elements>
202 </dc:context>
203 </extra-longitudinal-sections>
204 </discharge-table-nn>
205 </dc:if>
206 <dc:if test="dc:contains($artifact-outs, 'computed_discharge_curve')">
207 <computed-discharge-curve>
208 <mainvalue>
209 <dc:attribute name="factory" value="mainvalue"/>
210 <dc:attribute name="db-ids" value="${river_id}"/>
211 </mainvalue>
212 </computed-discharge-curve>
213 </dc:if>
214 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section')">
215 <longitudinal-section>
216 <dc:call-macro name="longitudinal_section-recommended"/>
217 <fixations><dc:attribute name="ref" value="fixations-${river_id}"/></fixations>
218 <flood-protections><dc:attribute name="ref" value="flood-protections-${river_id}"/></flood-protections>
219 <flood-water-marks><dc:attribute name="ref" value="flood-water-marks-${river_id}"/></flood-water-marks>
220 <water-levels><dc:attribute name="ref" value="water-levels-${river_id}"/></water-levels>
221 <extra-longitudinal-sections><dc:attribute name="ref" value="extra-longitudinal-sections-${river_id}"/></extra-longitudinal-sections>
222 </longitudinal-section>
223 <dc:macro name="longitudinal_section-recommended">
224 <annotation>
225 <dc:attribute name="factory" value="annotations"/>
226 <dc:attribute name="ids" value="${river_id}"/>
227 </annotation>
228 </dc:macro>
229 </dc:if>
230 <dc:if test="dc:contains($artifact-outs, 'floodmap')">
231 <floodmap>
232 <dc:choose>
233 <dc:when test="dc:contains($parameters, 'recommended')">
234 <dc:call-macro name="flood-map-recommended"/>
235 </dc:when>
236 <dc:otherwise>
237 <dc:call-macro name="flood-map-complete"/>
238 </dc:otherwise>
239 </dc:choose>
240 </floodmap>
241 <dc:macro name="flood-map-recommended">
242 <dc:comment>
243 FIXME: Following two macros look identical to me.
244 </dc:comment>
245 <kilometrage>
246 <riveraxis>
247 <dc:attribute name="factory" value="riveraxis"/>
248 <dc:attribute name="ids" value="${river_id}"/>
249 </riveraxis>
250 </kilometrage>
251 <rastermap>
252 <background>
253 <dc:attribute name="factory" value="wmsbackground"/>
254 <dc:attribute name="ids" value="${river_id}"/>
255 </background>
256 </rastermap>
257 </dc:macro>
258 <dc:macro name="flood-map-complete">
259 <kilometrage>
260 <riveraxis>
261 <dc:attribute name="factory" value="riveraxis"/>
262 <dc:attribute name="ids" value="${river_id}"/>
263 </riveraxis>
264 </kilometrage>
265 <rastermap>
266 <background>
267 <dc:attribute name="factory" value="wmsbackground"/>
268 <dc:attribute name="ids" value="${river_id}"/>
269 </background>
270 </rastermap>
271 </dc:macro>
272 </dc:if>
273 </river>
274 </dc:elements>
275 </dc:context>
276 </dc:macro>
277
4 <dc:choose> 278 <dc:choose>
5 <dc:comment> 279 <dc:comment>
6 User specific part 280 User specific part
7 ------------------ 281 ------------------
8 </dc:comment> 282 </dc:comment>
53 </dc:elements> 327 </dc:elements>
54 </dc:context> 328 </dc:context>
55 </dc:elements> 329 </dc:elements>
56 </dc:context> 330 </dc:context>
57 </old_calculations> 331 </old_calculations>
332 <dc:comment>
333 System specific part
334 --------------------
335 </dc:comment>
336 <dc:call-macro name="load-system"/>
58 </dc:when> 337 </dc:when>
59 <dc:comment> 338 <dc:comment>
60 System specific part 339 System specific part only
61 -------------------- 340 -------------------------
62 </dc:comment> 341 </dc:comment>
63 <dc:otherwise> 342 <dc:otherwise>
64 <dc:context connection="system"> 343 <dc:call-macro name="load-system"/>
65 <dc:statement>
66 SELECT id AS river_id, name as river_name FROM rivers
67 WHERE lower(name) LIKE lower(${river})
68 </dc:statement>
69 <dc:elements>
70 <river>
71 <dc:attribute name="name" value="${river_name}"/>
72 <dc:attribute name="db-id" value="${river_id}"/>
73 <dc:if test="dc:contains($artifact-outs, 'computed_discharge_curve')">
74 <discharge-table-nn>
75 <discharge-table-gauge>
76 <dc:context>
77 <dc:statement>
78 SELECT id AS gauge_id,
79 name AS gauge_name
80 FROM gauges WHERE river_id = ${river_id}
81 </dc:statement>
82 <dc:elements>
83 <gauge>
84 <dc:attribute name="name" value="${gauge_name}"/>
85 <dc:attribute name="db-id" value="${gauge_id}"/>
86 <dc:context>
87 <dc:statement>
88 SELECT description AS gauge_desc,
89 d.id AS discharge_id,
90 ti.start_time AS g_start,
91 ti.stop_time AS g_stop
92 FROM discharge_tables d JOIN time_intervals ti
93 ON d.time_interval_id = ti.id
94 WHERE d.gauge_id = ${gauge_id} AND d.kind = 1
95 </dc:statement>
96 <dc:elements>
97 <historical>
98 <dc:attribute name="name" value="${gauge_desc}"/>
99 <dc:attribute name="from" value="${g_start}"/>
100 <dc:attribute name="to" value="${g_stop}"/>
101 <dc:attribute name="db-id" value="${discharge_id}"/></historical>
102 </dc:elements>
103 </dc:context>
104 </gauge>
105 </dc:elements>
106 </dc:context>
107 </discharge-table-gauge>
108 <fixations>
109 <dc:attribute name="id" value="fixations-${river_id}"/>
110 <dc:context>
111 <dc:statement>
112 SELECT id AS fix_id,
113 description AS fix_description
114 FROM wsts WHERE kind = 2 AND river_id = ${river_id}
115 </dc:statement>
116 <dc:elements>
117 <fixation>
118 <dc:attribute name="name" value="${fix_description}"/>
119 <dc:attribute name="db-id" value="${fix_id}"/>
120 <columns>
121 <dc:context>
122 <dc:statement>
123 SELECT id AS fix_column_id,
124 name AS fix_column_name
125 FROM wst_columns WHERE wst_id = ${fix_id}
126 ORDER by position
127 </dc:statement>
128 <dc:elements>
129 <column>
130 <dc:attribute name="name" value="${fix_column_name}"/>
131 <dc:attribute name="db-id" value="${fix_column_id}"/></column>
132 </dc:elements>
133 </dc:context>
134 </columns>
135 </fixation>
136 </dc:elements>
137 </dc:context>
138 </fixations>
139 <flood-protections>
140 <dc:attribute name="id" value="flood-protections-${river_id}"/>
141 <dc:context>
142 <dc:statement>
143 SELECT id AS prot_id,
144 description AS prot_description
145 FROM wsts WHERE kind = 5 AND river_id = ${river_id}
146 </dc:statement>
147 <dc:elements>
148 <flood-protection>
149 <dc:attribute name="name" value="${prot_description}"/>
150 <dc:attribute name="db-id" value="${prot_id}"/>
151 <columns>
152 <dc:context>
153 <dc:statement>
154 SELECT id AS prot_column_id,
155 name AS prot_column_name
156 FROM wst_columns WHERE wst_id = ${prot_id}
157 ORDER by position
158 </dc:statement>
159 <dc:elements>
160 <column>
161 <dc:attribute name="name" value="${prot_column_name}"/>
162 <dc:attribute name="db-id" value="${prot_column_id}"/></column>
163 </dc:elements>
164 </dc:context>
165 </columns>
166 </flood-protection>
167 </dc:elements>
168 </dc:context>
169 </flood-protections>
170 <flood-water-marks>
171 <dc:attribute name="id" value="flood-water-marks-${river_id}"/>
172 <dc:context>
173 <dc:statement>
174 SELECT id AS fw_id,
175 description AS fw_description
176 FROM wsts WHERE kind = 4 AND river_id = ${river_id}
177 </dc:statement>
178 <dc:elements>
179 <flood-water-mark>
180 <dc:attribute name="name" value="${fw_description}"/>
181 <dc:attribute name="db-id" value="${fw_id}"/>
182 <columns>
183 <dc:context>
184 <dc:statement>
185 SELECT id AS fw_column_id,
186 name AS fw_column_name
187 FROM wst_columns WHERE wst_id = ${fw_id}
188 ORDER by position
189 </dc:statement>
190 <dc:elements>
191 <column>
192 <dc:attribute name="name" value="${fw_column_name}"/>
193 <dc:attribute name="db-id" value="${fw_column_id}"/></column>
194 </dc:elements>
195 </dc:context>
196 </columns>
197 </flood-water-mark>
198 </dc:elements>
199 </dc:context>
200 </flood-water-marks>
201 <water-levels>
202 <dc:attribute name="id" value="water-levels-${river_id}"/>
203 <dc:context>
204 <dc:statement>
205 SELECT id AS wl_id,
206 description AS wl_description
207 FROM wsts WHERE kind = 0 AND river_id = ${river_id}
208 </dc:statement>
209 <dc:elements>
210 <water-level>
211 <dc:attribute name="name" value="${wl_description}"/>
212 <dc:attribute name="db-id" value="${wl_id}"/>
213 <columns>
214 <dc:context>
215 <dc:statement>
216 SELECT id AS wl_column_id,
217 name AS wl_column_name
218 FROM wst_columns WHERE wst_id = ${wl_id}
219 ORDER by position
220 </dc:statement>
221 <dc:elements>
222 <column>
223 <dc:attribute name="name" value="${wl_column_name}"/>
224 <dc:attribute name="db-id" value="${wl_column_id}"/></column>
225 </dc:elements>
226 </dc:context>
227 </columns>
228 </water-level>
229 </dc:elements>
230 </dc:context>
231 </water-levels>
232 <extra-longitudinal-sections>
233 <dc:attribute name="id" value="extra-longitudinal-sections-${river_id}"/>
234 <dc:context>
235 <dc:statement>
236 SELECT id AS els_id,
237 description AS els_description
238 FROM wsts WHERE kind = 1 AND river_id = ${river_id}
239 </dc:statement>
240 <dc:elements>
241 <extra-longitudinal-section>
242 <dc:attribute name="name" value="${els_description}"/>
243 <dc:attribute name="db-id" value="${els_id}"/>
244 <columns>
245 <dc:context>
246 <dc:statement>
247 SELECT id AS els_column_id,
248 name AS els_column_name
249 FROM wst_columns WHERE wst_id = ${els_id}
250 ORDER by position
251 </dc:statement>
252 <dc:elements>
253 <column>
254 <dc:attribute name="name" value="${els_column_name}"/>
255 <dc:attribute name="db-id" value="${els_column_id}"/></column>
256 </dc:elements>
257 </dc:context>
258 </columns>
259 </extra-longitudinal-section>
260 </dc:elements>
261 </dc:context>
262 </extra-longitudinal-sections>
263 </discharge-table-nn>
264 </dc:if>
265 <dc:if test="dc:contains($artifact-outs, 'computed_discharge_curve')">
266 <computed-discharge-curve>
267 <mainvalue>
268 <dc:attribute name="factory" value="mainvalue"/>
269 <dc:attribute name="db-ids" value="${river_id}"/>
270 </mainvalue>
271 </computed-discharge-curve>
272 </dc:if>
273 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section')">
274 <longitudinal-section>
275 <dc:call-macro name="longitudinal_section-recommended"/>
276 <fixations><dc:attribute name="ref" value="fixations-${river_id}"/></fixations>
277 <flood-protections><dc:attribute name="ref" value="flood-protections-${river_id}"/></flood-protections>
278 <flood-water-marks><dc:attribute name="ref" value="flood-water-marks-${river_id}"/></flood-water-marks>
279 <water-levels><dc:attribute name="ref" value="water-levels-${river_id}"/></water-levels>
280 <extra-longitudinal-sections><dc:attribute name="ref" value="extra-longitudinal-sections-${river_id}"/></extra-longitudinal-sections>
281 </longitudinal-section>
282 <dc:macro name="longitudinal_section-recommended">
283 <annotation>
284 <dc:attribute name="factory" value="annotations"/>
285 <dc:attribute name="ids" value="${river_id}"/>
286 </annotation>
287 </dc:macro>
288 </dc:if>
289 <dc:if test="dc:contains($artifact-outs, 'floodmap')">
290 <floodmap>
291 <dc:choose>
292 <dc:when test="dc:contains($parameters, 'recommended')">
293 <dc:call-macro name="flood-map-recommended"/>
294 </dc:when>
295 <dc:otherwise>
296 <dc:call-macro name="flood-map-complete"/>
297 </dc:otherwise>
298 </dc:choose>
299 </floodmap>
300 <dc:macro name="flood-map-recommended">
301 <dc:comment>
302 FIXME: Following two macros look identical to me.
303 </dc:comment>
304 <kilometrage>
305 <riveraxis>
306 <dc:attribute name="factory" value="riveraxis"/>
307 <dc:attribute name="ids" value="${river_id}"/>
308 </riveraxis>
309 </kilometrage>
310 <rastermap>
311 <background>
312 <dc:attribute name="factory" value="wmsbackground"/>
313 <dc:attribute name="ids" value="${river_id}"/>
314 </background>
315 </rastermap>
316 </dc:macro>
317 <dc:macro name="flood-map-complete">
318 <kilometrage>
319 <riveraxis>
320 <dc:attribute name="factory" value="riveraxis"/>
321 <dc:attribute name="ids" value="${river_id}"/>
322 </riveraxis>
323 </kilometrage>
324 <rastermap>
325 <background>
326 <dc:attribute name="factory" value="wmsbackground"/>
327 <dc:attribute name="ids" value="${river_id}"/>
328 </background>
329 </rastermap>
330 </dc:macro>
331 </dc:if>
332 </river>
333 </dc:elements>
334 </dc:context>
335 </dc:otherwise> 344 </dc:otherwise>
336 </dc:choose> 345 </dc:choose>
337 </datacage> 346 </datacage>
338 </dc:template> 347 </dc:template>

http://dive4elements.wald.intevation.org