annotate flys-artifacts/doc/conf/meta-data-user.xml @ 1044:a007a4368768

Datacage: Added view to schema to select master artifacts. flys-artifacts/trunk@2505 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 18 Aug 2011 14:19:30 +0000
parents 9c0f981cd22d
children ba840385ad2e
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')">
1021
3d36e6000915 Added <old_calculations> element
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1019
diff changeset
9 <old_calculations>
3d36e6000915 Added <old_calculations> element
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1019
diff changeset
10 <dc:context connection="user">
1043
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
11 <dc:statement>SELECT u.id AS user_id, c.id AS collection_id
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
12 FROM collections c JOIN users u ON c.user_id = u.id
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
13 WHERE u.gid = CAST(${user-id} AS uuid)
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
14 ORDER BY c.creation DESC
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
15 </dc:statement>
1021
3d36e6000915 Added <old_calculations> element
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1019
diff changeset
16 <dc:elements>
3d36e6000915 Added <old_calculations> element
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1019
diff changeset
17 <dc:context>
1043
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
18 <dc:statement>SELECT a.id AS a_id, a.state AS a_state, a.gid AS a_gid, a.creation AS a_creation
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
19 FROM collection_items ci JOIN artifacts a ON ci.artifact_id = a.id
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
20 WHERE collection_id = ${collection_id} AND a.gid &lt;&gt; CAST(${artifact-id} AS uuid)
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
21 AND EXISTS (SELECT id FROM artifact_data WHERE artifact_id = a.id AND k = 'river' AND v = ${river})
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
22 </dc:statement>
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
23 <dc:comment> --- TODO: We only need the 'master' artifacts! --- </dc:comment>
1021
3d36e6000915 Added <old_calculations> element
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1019
diff changeset
24 <dc:elements>
1043
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
25 <dc:choose>
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
26 <dc:when test="$current-state-id = 'state.winfo.waterlevel'">
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
27 <dc:context>
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
28 <dc:statement>SELECT id AS out_id FROM outs WHERE artifact_id = ${a_id} AND name = 'longitudinal_section'
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
29 </dc:statement>
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
30 <dc:elements>
1021
3d36e6000915 Added <old_calculations> element
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1019
diff changeset
31 <dc:context>
1043
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
32 <dc:statement>SELECT name AS facet_name, num as facet_num, description AS facet_description
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
33 FROM facets WHERE out_id = ${out_id} ORDER BY num ASC, name DESC
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
34 </dc:statement>
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
35 <longitudinal_section_columns>
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
36 <dc:attribute name="description" value="${river} ${a_creation}"/>
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
37 <dc:elements>
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
38 <dc:element name="${facet_name}">
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
39 <dc:attribute name="description" value="${facet_description}"/>
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
40 <dc:attribute name="num" value="${facet_num}"/>
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
41 <dc:attribute name="factory" value="TODO"/>
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
42 <dc:attribute name="artifact-id" value="${a_gid}"/>
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
43 </dc:element>
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
44 </dc:elements>
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
45 </longitudinal_section_columns>
1021
3d36e6000915 Added <old_calculations> element
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1019
diff changeset
46 </dc:context>
1043
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
47 </dc:elements>
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
48 </dc:context>
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
49 </dc:when>
9c0f981cd22d Datacage user template: Removed state filter because it was broken. Simplified by joining two contexts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1030
diff changeset
50 </dc:choose>
1021
3d36e6000915 Added <old_calculations> element
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1019
diff changeset
51 </dc:elements>
3d36e6000915 Added <old_calculations> element
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1019
diff changeset
52 </dc:context>
3d36e6000915 Added <old_calculations> element
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1019
diff changeset
53 </dc:elements>
3d36e6000915 Added <old_calculations> element
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1019
diff changeset
54 </dc:context>
3d36e6000915 Added <old_calculations> element
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1019
diff changeset
55 </old_calculations>
1018
d42fa223be48 Datacage: added first user specific config for cross sections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1017
diff changeset
56 </dc:if>
1015
9a1a3080ad98 Bring user specific meta data service to life.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
57 </datacage>
9a1a3080ad98 Bring user specific meta data service to life.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
58 </dc:template>

http://dive4elements.wald.intevation.org