annotate flys-artifacts/doc/conf/meta-data-user.xml @ 1018:d42fa223be48

Datacage: added first user specific config for cross sections. flys-artifacts/trunk@2464 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 04 Aug 2011 15:05:02 +0000
parents 8637756275e5
children aff2a0a29aa3
rev   line source
1015
9a1a3080ad98 Bring user specific meta data service to life.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
9a1a3080ad98 Bring user specific meta data service to life.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
2 <dc:template xmlns:dc="http://www.intevation.org/2011/Datacage">
9a1a3080ad98 Bring user specific meta data service to life.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
3 <datacage>
1018
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
4 <dc:comment>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
5 User specific part
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
6 ------------------
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
7 </dc:comment>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
8 <dc:if test="dc:contains($parameters, 'user-id')">
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
9 <dc:context connection="user">
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
10 <dc:statement>SELECT id as user_id FROM users WHERE gid = ${user-id}::uuid</dc:statement>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
11 <dc:elements>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
12 <dc:context>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
13 <dc:statement>SELECT id AS collection_id FROM collections WHERE user_id = ${user_id}</dc:statement>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
14 <dc:elements>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
15 <dc:context>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
16 <dc:statement>SELECT a.id AS a_id, a.state AS a_state, a.gid as a_gid FROM
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
17 collection_items ci JOIN artifacts a ON ci.artifact_id = a.id
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
18 WHERE collection_id = ${collection_id} AND a.state = ${current-state-id} AND a.gid &lt;&gt; ${artifact-id}::uuid
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
19 AND EXISTS (SELECT id FROM artifact_data WHERE artifact_id = a.id AND k = 'river' AND v = ${river})
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
20 </dc:statement>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
21 <dc:comment> --- TODO: We only need the 'master' artifacts! --- </dc:comment>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
22 <dc:elements>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
23 <dc:choose>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
24 <dc:when test="$current-state-id = 'state.winfo.waterlevel'">
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
25 <dc:context>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
26 <dc:statement>SELECT id AS out_id FROM outs WHERE artifact_id = ${a_id} AND name = 'longitudinal_section'</dc:statement>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
27 <dc:elements>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
28 <dc:context>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
29 <dc:statement>SELECT name AS facet_name, num as facet_num, description AS facet_description
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
30 FROM facets WHERE out_id = ${out_id} ORDER BY num ASC, name DESC
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
31 </dc:statement>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
32 <dc:elements>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
33 <dc:element name="${facet_name}">
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
34 <dc:attribute name="description" value="${facet_description}"/>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
35 <dc:attribute name="num" value="${facet_num}"/>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
36 <dc:attribute name="factory" value="TODO"/>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
37 <dc:attribute name="artifact-id" value="${a_gid}"/>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
38 </dc:element>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
39 </dc:elements>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
40 </dc:context>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
41 </dc:elements>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
42 </dc:context>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
43 </dc:when>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
44 </dc:choose>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
45 </dc:elements>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
46 </dc:context>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
47 </dc:elements>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
48 </dc:context>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
49 </dc:elements>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
50 </dc:context>
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
51 </dc:if>
1015
9a1a3080ad98 Bring user specific meta data service to life.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
52 </datacage>
9a1a3080ad98 Bring user specific meta data service to life.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
53 </dc:template>

http://dive4elements.wald.intevation.org