Mercurial > dive4elements > river
comparison flys-artifacts/doc/conf/meta-data-system.xml @ 1015:9a1a3080ad98
Bring user specific meta data service to life.
flys-artifacts/trunk@2461 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 03 Aug 2011 16:40:04 +0000 |
parents | |
children | a60d2a46f0a8 |
comparison
equal
deleted
inserted
replaced
1014:66473e72d321 | 1015:9a1a3080ad98 |
---|---|
1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
2 <dc:template xmlns:dc="http://www.intevation.org/2011/Datacage"> | |
3 <datacage> | |
4 <dc:context> | |
5 <dc:statement> | |
6 SELECT id AS river_id, name as river_name FROM rivers | |
7 WHERE name ILIKE ${river} | |
8 </dc:statement> | |
9 <dc:elements> | |
10 <river> | |
11 <dc:attribute name="name" value="${river_name}"/> | |
12 <dc:attribute name="db-id" value="${river_id}"/> | |
13 <dc:if test="dc:contains($artifact-outs, 'computed_discharge_curve')"> | |
14 <discharge-table-nn> | |
15 <discharge-table-gauge> | |
16 <dc:context> | |
17 <dc:statement> | |
18 SELECT id AS gauge_id, | |
19 name AS gauge_name | |
20 FROM gauges WHERE river_id = ${river_id} | |
21 </dc:statement> | |
22 <dc:elements> | |
23 <gauge> | |
24 <dc:attribute name="name" value="${gauge_name}"/> | |
25 <dc:attribute name="db-id" value="${gauge_id}"/> | |
26 <dc:context> | |
27 <dc:statement> | |
28 SELECT description AS gauge_desc, | |
29 d.id AS discharge_id, | |
30 ti.start_time AS g_start, | |
31 ti.stop_time AS g_stop | |
32 FROM discharge_tables d JOIN time_intervals ti | |
33 ON d.time_interval_id = ti.id | |
34 WHERE d.gauge_id = ${gauge_id} AND d.kind = 1 | |
35 </dc:statement> | |
36 <dc:elements> | |
37 <historical> | |
38 <dc:attribute name="name" value="${gauge_desc}"/> | |
39 <dc:attribute name="from" value="${g_start}"/> | |
40 <dc:attribute name="to" value="${g_stop}"/> | |
41 <dc:attribute name="db-id" value="${discharge_id}"/></historical> | |
42 </dc:elements> | |
43 </dc:context> | |
44 </gauge> | |
45 </dc:elements> | |
46 </dc:context> | |
47 </discharge-table-gauge> | |
48 <fixations> | |
49 <dc:attribute name="id" value="fixations-${river_id}"/> | |
50 <dc:context> | |
51 <dc:statement> | |
52 SELECT id AS fix_id, | |
53 description AS fix_description | |
54 FROM wsts WHERE kind = 2 AND river_id = ${river_id} | |
55 </dc:statement> | |
56 <dc:elements> | |
57 <fixation> | |
58 <dc:attribute name="name" value="${fix_description}"/> | |
59 <dc:attribute name="db-id" value="${fix_id}"/> | |
60 <columns> | |
61 <dc:context> | |
62 <dc:statement> | |
63 SELECT id AS fix_column_id, | |
64 name AS fix_column_name | |
65 FROM wst_columns WHERE wst_id = ${fix_id} | |
66 ORDER by position | |
67 </dc:statement> | |
68 <dc:elements> | |
69 <column> | |
70 <dc:attribute name="name" value="${fix_column_name}"/> | |
71 <dc:attribute name="db-id" value="${fix_column_id}"/></column> | |
72 </dc:elements> | |
73 </dc:context> | |
74 </columns> | |
75 </fixation> | |
76 </dc:elements> | |
77 </dc:context> | |
78 </fixations> | |
79 <flood-protections> | |
80 <dc:attribute name="id" value="flood-protections-${river_id}"/> | |
81 <dc:context> | |
82 <dc:statement> | |
83 SELECT id AS prot_id, | |
84 description AS prot_description | |
85 FROM wsts WHERE kind = 5 AND river_id = ${river_id} | |
86 </dc:statement> | |
87 <dc:elements> | |
88 <flood-protection> | |
89 <dc:attribute name="name" value="${prot_description}"/> | |
90 <dc:attribute name="db-id" value="${prot_id}"/> | |
91 <columns> | |
92 <dc:context> | |
93 <dc:statement> | |
94 SELECT id AS prot_column_id, | |
95 name AS prot_column_name | |
96 FROM wst_columns WHERE wst_id = ${prot_id} | |
97 ORDER by position | |
98 </dc:statement> | |
99 <dc:elements> | |
100 <column> | |
101 <dc:attribute name="name" value="${prot_column_name}"/> | |
102 <dc:attribute name="db-id" value="${prot_column_id}"/></column> | |
103 </dc:elements> | |
104 </dc:context> | |
105 </columns> | |
106 </flood-protection> | |
107 </dc:elements> | |
108 </dc:context> | |
109 </flood-protections> | |
110 <flood-water-marks> | |
111 <dc:attribute name="id" value="flood-water-marks-${river_id}"/> | |
112 <dc:context> | |
113 <dc:statement> | |
114 SELECT id AS fw_id, | |
115 description AS fw_description | |
116 FROM wsts WHERE kind = 4 AND river_id = ${river_id} | |
117 </dc:statement> | |
118 <dc:elements> | |
119 <flood-water-mark> | |
120 <dc:attribute name="name" value="${fw_description}"/> | |
121 <dc:attribute name="db-id" value="${fw_id}"/> | |
122 <columns> | |
123 <dc:context> | |
124 <dc:statement> | |
125 SELECT id AS fw_column_id, | |
126 name AS fw_column_name | |
127 FROM wst_columns WHERE wst_id = ${fw_id} | |
128 ORDER by position | |
129 </dc:statement> | |
130 <dc:elements> | |
131 <column> | |
132 <dc:attribute name="name" value="${fw_column_name}"/> | |
133 <dc:attribute name="db-id" value="${fw_column_id}"/></column> | |
134 </dc:elements> | |
135 </dc:context> | |
136 </columns> | |
137 </flood-water-mark> | |
138 </dc:elements> | |
139 </dc:context> | |
140 </flood-water-marks> | |
141 <water-levels> | |
142 <dc:attribute name="id" value="water-levels-${river_id}"/> | |
143 <dc:context> | |
144 <dc:statement> | |
145 SELECT id AS wl_id, | |
146 description AS wl_description | |
147 FROM wsts WHERE kind = 0 AND river_id = ${river_id} | |
148 </dc:statement> | |
149 <dc:elements> | |
150 <water-level> | |
151 <dc:attribute name="name" value="${wl_description}"/> | |
152 <dc:attribute name="db-id" value="${wl_id}"/> | |
153 <columns> | |
154 <dc:context> | |
155 <dc:statement> | |
156 SELECT id AS wl_column_id, | |
157 name AS wl_column_name | |
158 FROM wst_columns WHERE wst_id = ${wl_id} | |
159 ORDER by position | |
160 </dc:statement> | |
161 <dc:elements> | |
162 <column> | |
163 <dc:attribute name="name" value="${wl_column_name}"/> | |
164 <dc:attribute name="db-id" value="${wl_column_id}"/></column> | |
165 </dc:elements> | |
166 </dc:context> | |
167 </columns> | |
168 </water-level> | |
169 </dc:elements> | |
170 </dc:context> | |
171 </water-levels> | |
172 <extra-longitudinal-sections> | |
173 <dc:attribute name="id" value="extra-longitudinal-sections-${river_id}"/> | |
174 <dc:context> | |
175 <dc:statement> | |
176 SELECT id AS els_id, | |
177 description AS els_description | |
178 FROM wsts WHERE kind = 1 AND river_id = ${river_id} | |
179 </dc:statement> | |
180 <dc:elements> | |
181 <extra-longitudinal-section> | |
182 <dc:attribute name="name" value="${els_description}"/> | |
183 <dc:attribute name="db-id" value="${els_id}"/> | |
184 <columns> | |
185 <dc:context> | |
186 <dc:statement> | |
187 SELECT id AS els_column_id, | |
188 name AS els_column_name | |
189 FROM wst_columns WHERE wst_id = ${els_id} | |
190 ORDER by position | |
191 </dc:statement> | |
192 <dc:elements> | |
193 <column> | |
194 <dc:attribute name="name" value="${els_column_name}"/> | |
195 <dc:attribute name="db-id" value="${els_column_id}"/></column> | |
196 </dc:elements> | |
197 </dc:context> | |
198 </columns> | |
199 </extra-longitudinal-section> | |
200 </dc:elements> | |
201 </dc:context> | |
202 </extra-longitudinal-sections> | |
203 </discharge-table-nn> | |
204 </dc:if> | |
205 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section')"> | |
206 <longitudinal-section> | |
207 <fixations><dc:attribute name="ref" value="fixations-${river_id}"/></fixations> | |
208 <flood-protections><dc:attribute name="ref" value="flood-protections-${river_id}"/></flood-protections> | |
209 <flood-water-marks><dc:attribute name="ref" value="flood-water-marks-${river_id}"/></flood-water-marks> | |
210 <water-levels><dc:attribute name="ref" value="water-levels-${river_id}"/></water-levels> | |
211 <extra-longitudinal-sections><dc:attribute name="ref" value="extra-longitudinal-sections-${river_id}"/></extra-longitudinal-sections> | |
212 </longitudinal-section> | |
213 </dc:if> | |
214 <dc:if test="dc:contains($artifact-outs, 'floodmap')"> | |
215 <floodmap> | |
216 <dc:choose> | |
217 <dc:when test="dc:contains($parameters, 'recommended')"> | |
218 <dc:call-macro name="flood-map-recommended"/> | |
219 </dc:when> | |
220 <dc:otherwise> | |
221 <dc:call-macro name="flood-map-complete"/> | |
222 </dc:otherwise> | |
223 </dc:choose> | |
224 </floodmap> | |
225 <dc:macro name="flood-map-recommended"> | |
226 <kilometrage> | |
227 <riveraxis> | |
228 <dc:attribute name="factory" value="riveraxis"/> | |
229 <dc:attribute name="db-ids" value="${river_id}"/> | |
230 </riveraxis> | |
231 </kilometrage> | |
232 <rastermap> | |
233 <background> | |
234 <dc:attribute name="factory" value="wmsbackground"/> | |
235 <dc:attribute name="db-ids" value="${river_id}"/> | |
236 </background> | |
237 </rastermap> | |
238 </dc:macro> | |
239 <dc:macro name="flood-map-complete"> | |
240 <kilometrage> | |
241 <riveraxis> | |
242 <dc:attribute name="factory" value="riveraxis"/> | |
243 <dc:attribute name="db-ids" value="${river_id}"/> | |
244 </riveraxis> | |
245 </kilometrage> | |
246 <rastermap> | |
247 <background> | |
248 <dc:attribute name="factory" value="wmsbackground"/> | |
249 <dc:attribute name="db-ids" value="${river_id}"/> | |
250 </background> | |
251 </rastermap> | |
252 </dc:macro> | |
253 </dc:if> | |
254 </river> | |
255 </dc:elements> | |
256 </dc:context> | |
257 </datacage> | |
258 </dc:template> |