comparison flys-artifacts/doc/conf/meta-data-user.xml @ 1021:3d36e6000915

Added <old_calculations> element around old calculations. flys-artifacts/trunk@2476 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 09 Aug 2011 10:25:45 +0000
parents aff2a0a29aa3
children 5cb84ceee2a0
comparison
equal deleted inserted replaced
1020:a776afdf1ec5 1021:3d36e6000915
4 <dc:comment> 4 <dc:comment>
5 User specific part 5 User specific part
6 ------------------ 6 ------------------
7 </dc:comment> 7 </dc:comment>
8 <dc:if test="dc:contains($parameters, 'user-id')"> 8 <dc:if test="dc:contains($parameters, 'user-id')">
9 <dc:context connection="user"> 9 <old_calculations>
10 <dc:statement>SELECT id as user_id FROM users WHERE gid = CAST(${user-id} AS uuid)</dc:statement> 10 <dc:context connection="user">
11 <dc:elements> 11 <dc:statement>SELECT id as user_id FROM users WHERE gid = CAST(${user-id} AS uuid)</dc:statement>
12 <dc:context> 12 <dc:elements>
13 <dc:statement>SELECT id AS collection_id FROM collections WHERE user_id = ${user_id}</dc:statement> 13 <dc:context>
14 <dc:elements> 14 <dc:statement>SELECT id AS collection_id FROM collections WHERE user_id = ${user_id}</dc:statement>
15 <dc:context> 15 <dc:elements>
16 <dc:statement>SELECT a.id AS a_id, a.state AS a_state, a.gid as a_gid FROM 16 <dc:context>
17 collection_items ci JOIN artifacts a ON ci.artifact_id = a.id 17 <dc:statement>SELECT a.id AS a_id, a.state AS a_state, a.gid as a_gid FROM
18 WHERE collection_id = ${collection_id} AND a.state = ${current-state-id} AND a.gid &lt;&gt; CAST(${artifact-id} AS uuid) 18 collection_items ci JOIN artifacts a ON ci.artifact_id = a.id
19 AND EXISTS (SELECT id FROM artifact_data WHERE artifact_id = a.id AND k = 'river' AND v = ${river}) 19 WHERE collection_id = ${collection_id} AND a.state = ${current-state-id} AND a.gid &lt;&gt; CAST(${artifact-id} AS uuid)
20 </dc:statement> 20 AND EXISTS (SELECT id FROM artifact_data WHERE artifact_id = a.id AND k = 'river' AND v = ${river})
21 <dc:comment> --- TODO: We only need the 'master' artifacts! --- </dc:comment> 21 </dc:statement>
22 <dc:elements> 22 <dc:comment> --- TODO: We only need the 'master' artifacts! --- </dc:comment>
23 <dc:choose> 23 <dc:elements>
24 <dc:when test="$current-state-id = 'state.winfo.waterlevel'"> 24 <dc:choose>
25 <dc:context> 25 <dc:when test="$current-state-id = 'state.winfo.waterlevel'">
26 <dc:statement>SELECT id AS out_id FROM outs WHERE artifact_id = ${a_id} AND name = 'longitudinal_section'</dc:statement> 26 <dc:context>
27 <dc:elements> 27 <dc:statement>SELECT id AS out_id FROM outs WHERE artifact_id = ${a_id} AND name = 'longitudinal_section'</dc:statement>
28 <dc:context> 28 <dc:elements>
29 <dc:statement>SELECT name AS facet_name, num as facet_num, description AS facet_description 29 <dc:context>
30 FROM facets WHERE out_id = ${out_id} ORDER BY num ASC, name DESC 30 <dc:statement>SELECT name AS facet_name, num as facet_num, description AS facet_description
31 </dc:statement> 31 FROM facets WHERE out_id = ${out_id} ORDER BY num ASC, name DESC
32 <dc:elements> 32 </dc:statement>
33 <dc:element name="${facet_name}"> 33 <dc:elements>
34 <dc:attribute name="description" value="${facet_description}"/> 34 <dc:element name="${facet_name}">
35 <dc:attribute name="num" value="${facet_num}"/> 35 <dc:attribute name="description" value="${facet_description}"/>
36 <dc:attribute name="factory" value="TODO"/> 36 <dc:attribute name="num" value="${facet_num}"/>
37 <dc:attribute name="artifact-id" value="${a_gid}"/> 37 <dc:attribute name="factory" value="TODO"/>
38 </dc:element> 38 <dc:attribute name="artifact-id" value="${a_gid}"/>
39 </dc:elements> 39 </dc:element>
40 </dc:context> 40 </dc:elements>
41 </dc:elements> 41 </dc:context>
42 </dc:context> 42 </dc:elements>
43 </dc:when> 43 </dc:context>
44 </dc:choose> 44 </dc:when>
45 </dc:elements> 45 </dc:choose>
46 </dc:context> 46 </dc:elements>
47 </dc:elements> 47 </dc:context>
48 </dc:context> 48 </dc:elements>
49 </dc:elements> 49 </dc:context>
50 </dc:context> 50 </dc:elements>
51 </dc:context>
52 </old_calculations>
51 </dc:if> 53 </dc:if>
52 </datacage> 54 </datacage>
53 </dc:template> 55 </dc:template>

http://dive4elements.wald.intevation.org