comparison flys-artifacts/doc/conf/meta-data.xml @ 4917:c499201a30a3 dc-km-filter

[branch dc-km-filter] meta-data.xml: Use global vars and art. data for wst-km-filter.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 30 Jan 2013 15:54:07 +0100
parents 137ff80f0a01
children
comparison
equal deleted inserted replaced
4916:2cec81e697e8 4917:c499201a30a3
9 wst_columns.description AS info, 9 wst_columns.description AS info,
10 wst_ranges.a AS deffrom, 10 wst_ranges.a AS deffrom,
11 wst_ranges.b AS defto 11 wst_ranges.b AS defto
12 FROM wst_columns, wst_ranges 12 FROM wst_columns, wst_ranges
13 WHERE wst_columns.wst_id = ${prot_id} AND wst_ranges.wst_column_id = wst_columns.id 13 WHERE wst_columns.wst_id = ${prot_id} AND wst_ranges.wst_column_id = wst_columns.id
14 AND ( CAST(${startkm} AS DOUBLE PRECISION) BETWEEN wst_ranges.a AND wst_ranges.b 14 AND ( CAST(${fromkm} AS DOUBLE PRECISION) BETWEEN wst_ranges.a AND wst_ranges.b
15 OR CAST(${endkm} AS DOUBLE PRECISION) BETWEEN wst_ranges.a AND wst_ranges.b 15 OR CAST(${tokm} AS DOUBLE PRECISION) BETWEEN wst_ranges.a AND wst_ranges.b
16 OR wst_ranges.a BETWEEN CAST(${startkm} AS DOUBLE PRECISION) AND CAST(${endkm} AS DOUBLE PRECISION) 16 OR wst_ranges.a BETWEEN CAST(${fromkm} AS DOUBLE PRECISION) AND CAST(${tokm} AS DOUBLE PRECISION)
17 ) 17 )
18 ORDER by wst_columns.position 18 ORDER by wst_columns.position
19 </dc:statement> 19 </dc:statement>
20 </dc:macro> 20 </dc:macro>
21 <dc:macro name="load-system"> 21 <dc:macro name="load-system">
22 <dc:variable name="fromkm" expr="dc:fromValue('', '', '')"/>
23 <dc:variable name="tokm" expr="dc:toValue('', '', '')"/>
24
25 <dc:if test="dc:contains($parameters, 'user-id')">
26 <dc:context connection="user">
27 <dc:statement>
28 SELECT COALESCE(ld_mode, '') AS ldm,
29 COALESCE(ld_locations, '') AS ldl,
30 COALESCE(ld_from, '') AS ldf,
31 COALESCE(ld_to, '') AS ldt
32 FROM master_artifacts_range
33 WHERE gid = CAST(${artifact-id} as uuid)
34 </dc:statement>
35 <dc:elements>
36 <dc:variable name="fromkm" expr="dc:fromValue($ldm, $ldl, $ldf)"/>
37 <dc:variable name="tokm" expr="dc:toValue($ldm, $ldl, $ldt)"/>
38 <debug>
39 <dc:attribute name="name" value="[${artifact-id} , ${fromkm} : ${tokm}"/>
40 </debug>
41 </dc:elements>
42 </dc:context>
43 </dc:if>
44
22 <dc:context connection="system"> 45 <dc:context connection="system">
23 <dc:statement> 46 <dc:statement>
24 SELECT id AS river_id, name as river_name FROM rivers 47 SELECT id AS river_id, name as river_name FROM rivers
25 WHERE lower(name) LIKE lower(${river}) 48 WHERE lower(name) LIKE lower(${river})
26 </dc:statement> 49 </dc:statement>

http://dive4elements.wald.intevation.org