changeset 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 a776afdf1ec5
children 930a9ce24294
files flys-artifacts/ChangeLog flys-artifacts/doc/conf/meta-data-user.xml
diffstat 2 files changed, 49 insertions(+), 42 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Tue Aug 09 10:23:04 2011 +0000
+++ b/flys-artifacts/ChangeLog	Tue Aug 09 10:25:45 2011 +0000
@@ -1,3 +1,8 @@
+2011-08-09  Sascha L. Teichmann <sascha.teichmann@intevation.de>
+
+	* doc/conf/meta-data-user.xml: Added <old_calculations> element
+	  around old calculations.
+
 2011-08-09  Sascha L. Teichmann <sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/model/QRangeTree.java:
--- a/flys-artifacts/doc/conf/meta-data-user.xml	Tue Aug 09 10:23:04 2011 +0000
+++ b/flys-artifacts/doc/conf/meta-data-user.xml	Tue Aug 09 10:25:45 2011 +0000
@@ -6,48 +6,50 @@
     ------------------
   </dc:comment>
   <dc:if test="dc:contains($parameters, 'user-id')">
-    <dc:context connection="user">
-      <dc:statement>SELECT id as user_id FROM users WHERE gid = CAST(${user-id} AS uuid)</dc:statement>
-      <dc:elements>
-        <dc:context>
-          <dc:statement>SELECT id AS collection_id FROM collections WHERE user_id = ${user_id}</dc:statement>
-          <dc:elements>
-            <dc:context>
-              <dc:statement>SELECT a.id AS a_id, a.state AS a_state, a.gid as a_gid FROM 
-                            collection_items ci JOIN artifacts a ON ci.artifact_id = a.id
-                            WHERE collection_id = ${collection_id} AND a.state = ${current-state-id} AND a.gid &lt;&gt; CAST(${artifact-id} AS uuid)
-                            AND EXISTS (SELECT id FROM artifact_data WHERE artifact_id = a.id AND k = 'river' AND v = ${river})
-              </dc:statement>
-              <dc:comment> --- TODO: We only need the 'master' artifacts! --- </dc:comment>
-              <dc:elements>
-                <dc:choose>
-                  <dc:when test="$current-state-id = 'state.winfo.waterlevel'">
-                    <dc:context>
-                      <dc:statement>SELECT id AS out_id FROM outs WHERE artifact_id = ${a_id} AND name = 'longitudinal_section'</dc:statement>
-                      <dc:elements>
-                        <dc:context>
-                          <dc:statement>SELECT name AS facet_name, num as facet_num, description AS facet_description
-                                        FROM facets WHERE out_id = ${out_id} ORDER BY num ASC, name DESC
-                          </dc:statement>
-                          <dc:elements>
-                            <dc:element name="${facet_name}">
-                              <dc:attribute name="description" value="${facet_description}"/>
-                              <dc:attribute name="num" value="${facet_num}"/>
-                              <dc:attribute name="factory" value="TODO"/>
-                              <dc:attribute name="artifact-id" value="${a_gid}"/>
-                            </dc:element>
-                          </dc:elements>
-                        </dc:context>
-                      </dc:elements>
-                    </dc:context>
-                  </dc:when>
-                </dc:choose>
-              </dc:elements>
-            </dc:context>
-          </dc:elements>
-        </dc:context>
-      </dc:elements>
-    </dc:context>
+    <old_calculations>
+      <dc:context connection="user">
+        <dc:statement>SELECT id as user_id FROM users WHERE gid = CAST(${user-id} AS uuid)</dc:statement>
+        <dc:elements>
+          <dc:context>
+            <dc:statement>SELECT id AS collection_id FROM collections WHERE user_id = ${user_id}</dc:statement>
+            <dc:elements>
+              <dc:context>
+                <dc:statement>SELECT a.id AS a_id, a.state AS a_state, a.gid as a_gid FROM 
+                              collection_items ci JOIN artifacts a ON ci.artifact_id = a.id
+                              WHERE collection_id = ${collection_id} AND a.state = ${current-state-id} AND a.gid &lt;&gt; CAST(${artifact-id} AS uuid)
+                              AND EXISTS (SELECT id FROM artifact_data WHERE artifact_id = a.id AND k = 'river' AND v = ${river})
+                </dc:statement>
+                <dc:comment> --- TODO: We only need the 'master' artifacts! --- </dc:comment>
+                <dc:elements>
+                  <dc:choose>
+                    <dc:when test="$current-state-id = 'state.winfo.waterlevel'">
+                      <dc:context>
+                        <dc:statement>SELECT id AS out_id FROM outs WHERE artifact_id = ${a_id} AND name = 'longitudinal_section'</dc:statement>
+                        <dc:elements>
+                          <dc:context>
+                            <dc:statement>SELECT name AS facet_name, num as facet_num, description AS facet_description
+                                          FROM facets WHERE out_id = ${out_id} ORDER BY num ASC, name DESC
+                            </dc:statement>
+                            <dc:elements>
+                              <dc:element name="${facet_name}">
+                                <dc:attribute name="description" value="${facet_description}"/>
+                                <dc:attribute name="num" value="${facet_num}"/>
+                                <dc:attribute name="factory" value="TODO"/>
+                                <dc:attribute name="artifact-id" value="${a_gid}"/>
+                              </dc:element>
+                            </dc:elements>
+                          </dc:context>
+                        </dc:elements>
+                      </dc:context>
+                    </dc:when>
+                  </dc:choose>
+                </dc:elements>
+              </dc:context>
+            </dc:elements>
+          </dc:context>
+        </dc:elements>
+      </dc:context>
+    </old_calculations>
   </dc:if>
 </datacage>
 </dc:template>

http://dive4elements.wald.intevation.org