comparison artifacts/doc/conf/meta-data.xml @ 6401:f369d69e3488

Datacage: Rewrote the loading of the official lines based on the latest changes. Untested!
author Sascha L. Teichmann <teichmann@intevation.de>
date Sat, 22 Jun 2013 00:03:18 +0200
parents abed7e091762
children b02f3a948858
comparison
equal deleted inserted replaced
6400:25230bc3137c 6401:f369d69e3488
2316 </dc:context> 2316 </dc:context>
2317 </buildings> 2317 </buildings>
2318 </dc:macro> 2318 </dc:macro>
2319 2319
2320 <dc:macro name="officiallines_user"> 2320 <dc:macro name="officiallines_user">
2321 <dc:comment comment=".wst -------------------------------"> 2321 <dc:if test="dc:contains($parameters, 'official-lines')">
2322 <!-- =============== THIS IS BROKEN! ============== --> 2322 <dc:container-context container="official-lines">
2323 <officiallines> 2323 <dc:properties>
2324 <dc:for-each> 2324 <dc:property name="name" alias="olname"/>
2325 <dc:context> 2325 <dc:property name="wst" alias="wstid"/>
2326 <dc:statement> 2326 <dc:property name="columnPos" alias="wstcolpos"/>
2327 SELECT m.id AS a_id, 2327 </dc:properties>
2328 m.state AS a_state, 2328 <dc:if test="dc:has-result()">
2329 m.gid AS a_gid, 2329 <officiallines>
2330 m.creation AS a_creation, 2330 <dc:for-each>
2331 ardg.v AS gaugy, 2331 <dc:element name="${olname}">
2332 arv.v AS wqsingle 2332 <dc:attribute name="name" value="${olname}"/>
2333 FROM master_artifacts m, 2333 <dc:attribute name="ids" value="additionals-wstv-${wstcolpos}-${wstid}"/>
2334 artifact_data ardg, 2334 <dc:attribute name="factory" value="staticwkms"/>
2335 artifact_data arv 2335 <dc:attribute name="target_out" value="${out}"/>
2336 WHERE m.collection_id = ${collection_id} 2336 <dc:attribute name="out" value="${out}"/>
2337 AND m.gid = CAST(${artifact-id} AS uuid) 2337 </dc:element>
2338 AND ardg.artifact_id = m.id 2338 </dc:for-each>
2339 AND ardg.k = 'ld_gaugename' 2339 </officiallines>
2340 AND arv.artifact_id = m.id 2340 </dc:if>
2341 AND arv.k = 'wq_single' 2341 </dc:container-context>
2342 AND EXISTS ( 2342 </dc:if>
2343 SELECT id
2344 FROM artifact_data ad
2345 WHERE ad.artifact_id = m.id
2346 AND k = 'river'
2347 AND v = ${river})
2348 </dc:statement>
2349 <dc:for-each>
2350 <dc:context connection="system">
2351 <dc:statement>
2352 SELECT ol.wst_id AS wstid,
2353 ol.wst_column_pos AS wstcolpos,
2354 ol.name AS olname,
2355 ol.value AS oval
2356 FROM official_q_values ol
2357 WHERE ol.value = CAST(${wqsingle} AS NUMERIC(10,2))
2358 AND ol.gauge_name = ${gaugy}
2359 </dc:statement>
2360 <dc:for-each>
2361 <dc:element name="${olname}">
2362 <dc:attribute name="name" value="${olname}"/>
2363 <dc:attribute name="ids" value="additionals-wstv-${wstcolpos}-${wstid}"/>
2364 <dc:attribute name="factory" value="staticwkms"/>
2365 <dc:attribute name="target_out" value="${out}"/>
2366 <dc:attribute name="out" value="${out}"/>
2367 </dc:element>
2368 </dc:for-each>
2369 </dc:context>
2370 </dc:for-each>
2371 </dc:context>
2372 </dc:for-each>
2373 </officiallines>
2374 </dc:comment>
2375 </dc:macro> 2343 </dc:macro>
2376 2344
2377 <!-- Common stuff --> 2345 <!-- Common stuff -->
2378 2346
2379 <dc:macro name="km-filtered-wsts"> 2347 <dc:macro name="km-filtered-wsts">

http://dive4elements.wald.intevation.org