annotate flys-artifacts/doc/conf/meta-data-user.xml @ 1030:c586b6220f35

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

http://dive4elements.wald.intevation.org