comparison flys-artifacts/doc/conf/meta-data-template.xml @ 947:db8d93cb65fd

Made meta data template configurable. flys-artifacts/trunk@2363 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 19 Jul 2011 16:39:32 +0000
parents
children ff6ce301c472
comparison
equal deleted inserted replaced
946:854620e52971 947:db8d93cb65fd
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 <discharge-table-nn>
14 <discharge-table-gauge>
15 <dc:context>
16 <dc:statement>
17 SELECT id AS gauge_id,
18 name AS gauge_name
19 FROM gauges WHERE river_id = ${river_id}
20 </dc:statement>
21 <dc:elements>
22 <gauge>
23 <dc:attribute name="name" value="${gauge_name}"/>
24 <dc:attribute name="db-id" value="${gauge_id}"/>
25 <dc:context>
26 <dc:statement>
27 SELECT description AS gauge_desc,
28 d.id AS discharge_id,
29 ti.start_time AS g_start,
30 ti.stop_time AS g_stop
31 FROM discharge_tables d JOIN time_intervals ti
32 ON d.time_interval_id = ti.id
33 WHERE d.gauge_id = ${gauge_id} AND d.kind = 1
34 </dc:statement>
35 <dc:elements>
36 <historical>
37 <dc:attribute name="name" value="${gauge_desc}"/>
38 <dc:attribute name="from" value="${g_start}"/>
39 <dc:attribute name="to" value="${g_stop}"/>
40 <dc:attribute name="db-id" value="${discharge_id}"/></historical>
41 </dc:elements>
42 </dc:context>
43 </gauge>
44 </dc:elements>
45 </dc:context>
46 </discharge-table-gauge>
47 <fixations>
48 <dc:attribute name="id" value="fixations-${river_id}"/>
49 <dc:context>
50 <dc:statement>
51 SELECT id AS fix_id,
52 description AS fix_description
53 FROM wsts WHERE kind = 2 AND river_id = ${river_id}
54 </dc:statement>
55 <dc:elements>
56 <fixation>
57 <dc:attribute name="name" value="${fix_description}"/>
58 <dc:attribute name="db-id" value="${fix_id}"/>
59 <columns>
60 <dc:context>
61 <dc:statement>
62 SELECT id AS fix_column_id,
63 name AS fix_column_name
64 FROM wst_columns WHERE wst_id = ${fix_id}
65 ORDER by position
66 </dc:statement>
67 <dc:elements>
68 <column>
69 <dc:attribute name="name" value="${fix_column_name}"/>
70 <dc:attribute name="db-id" value="${fix_column_id}"/></column>
71 </dc:elements>
72 </dc:context>
73 </columns>
74 </fixation>
75 </dc:elements>
76 </dc:context>
77 </fixations>
78 <flood-protections>
79 <dc:attribute name="id" value="flood-protections-${river_id}"/>
80 <dc:context>
81 <dc:statement>
82 SELECT id AS prot_id,
83 description AS prot_description
84 FROM wsts WHERE kind = 5 AND river_id = ${river_id}
85 </dc:statement>
86 <dc:elements>
87 <flood-protection>
88 <dc:attribute name="name" value="${prot_description}"/>
89 <dc:attribute name="db-id" value="${prot_id}"/>
90 <columns>
91 <dc:context>
92 <dc:statement>
93 SELECT id AS prot_column_id,
94 name AS prot_column_name
95 FROM wst_columns WHERE wst_id = ${prot_id}
96 ORDER by position
97 </dc:statement>
98 <dc:elements>
99 <column>
100 <dc:attribute name="name" value="${prot_column_name}"/>
101 <dc:attribute name="db-id" value="${prot_column_id}"/></column>
102 </dc:elements>
103 </dc:context>
104 </columns>
105 </flood-protection>
106 </dc:elements>
107 </dc:context>
108 </flood-protections>
109 <flood-water-marks>
110 <dc:attribute name="id" value="flood-water-marks-${river_id}"/>
111 <dc:context>
112 <dc:statement>
113 SELECT id AS fw_id,
114 description AS fw_description
115 FROM wsts WHERE kind = 4 AND river_id = ${river_id}
116 </dc:statement>
117 <dc:elements>
118 <flood-water-mark>
119 <dc:attribute name="name" value="${fw_description}"/>
120 <dc:attribute name="db-id" value="${fw_id}"/>
121 <columns>
122 <dc:context>
123 <dc:statement>
124 SELECT id AS fw_column_id,
125 name AS fw_column_name
126 FROM wst_columns WHERE wst_id = ${fw_id}
127 ORDER by position
128 </dc:statement>
129 <dc:elements>
130 <column>
131 <dc:attribute name="name" value="${fw_column_name}"/>
132 <dc:attribute name="db-id" value="${fw_column_id}"/></column>
133 </dc:elements>
134 </dc:context>
135 </columns>
136 </flood-water-mark>
137 </dc:elements>
138 </dc:context>
139 </flood-water-marks>
140 <water-levels>
141 <dc:attribute name="id" value="water-levels-${river_id}"/>
142 <dc:context>
143 <dc:statement>
144 SELECT id AS wl_id,
145 description AS wl_description
146 FROM wsts WHERE kind = 0 AND river_id = ${river_id}
147 </dc:statement>
148 <dc:elements>
149 <water-level>
150 <dc:attribute name="name" value="${wl_description}"/>
151 <dc:attribute name="db-id" value="${wl_id}"/>
152 <columns>
153 <dc:context>
154 <dc:statement>
155 SELECT id AS wl_column_id,
156 name AS wl_column_name
157 FROM wst_columns WHERE wst_id = ${wl_id}
158 ORDER by position
159 </dc:statement>
160 <dc:elements>
161 <column>
162 <dc:attribute name="name" value="${wl_column_name}"/>
163 <dc:attribute name="db-id" value="${wl_column_id}"/></column>
164 </dc:elements>
165 </dc:context>
166 </columns>
167 </water-level>
168 </dc:elements>
169 </dc:context>
170 </water-levels>
171 <extra-longitudinal-sections>
172 <dc:attribute name="id" value="extra-longitudinal-sections-${river_id}"/>
173 <dc:context>
174 <dc:statement>
175 SELECT id AS els_id,
176 description AS els_description
177 FROM wsts WHERE kind = 1 AND river_id = ${river_id}
178 </dc:statement>
179 <dc:elements>
180 <extra-longitudinal-section>
181 <dc:attribute name="name" value="${els_description}"/>
182 <dc:attribute name="db-id" value="${els_id}"/>
183 <columns>
184 <dc:context>
185 <dc:statement>
186 SELECT id AS els_column_id,
187 name AS els_column_name
188 FROM wst_columns WHERE wst_id = ${els_id}
189 ORDER by position
190 </dc:statement>
191 <dc:elements>
192 <column>
193 <dc:attribute name="name" value="${els_column_name}"/>
194 <dc:attribute name="db-id" value="${els_column_id}"/></column>
195 </dc:elements>
196 </dc:context>
197 </columns>
198 </extra-longitudinal-section>
199 </dc:elements>
200 </dc:context>
201 </extra-longitudinal-sections>
202 </discharge-table-nn>
203 <longitudinal-section>
204 <fixations><dc:attribute name="ref" value="fixations-${river_id}"/></fixations>
205 <flood-protections><dc:attribute name="ref" value="flood-protections-${river_id}"/></flood-protections>
206 <flood-water-marks><dc:attribute name="ref" value="flood-water-marks-${river_id}"/></flood-water-marks>
207 <water-levels><dc:attribute name="ref" value="water-levels-${river_id}"/></water-levels>
208 <extra-longitudinal-sections><dc:attribute name="ref" value="extra-longitudinal-sections-${river_id}"/></extra-longitudinal-sections>
209 </longitudinal-section>
210 </river>
211 </dc:elements>
212 </dc:context>
213 </datacage>
214 </dc:template>
215

http://dive4elements.wald.intevation.org