changeset 3589:ab447cd29b73

More former calculations in FixA DC. flys-artifacts/trunk@5205 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 15 Aug 2012 07:41:11 +0000
parents 76571c601d06
children 4f2470cbf72c
files flys-artifacts/ChangeLog flys-artifacts/doc/conf/meta-data.xml
diffstat 2 files changed, 55 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Tue Aug 14 14:02:28 2012 +0000
+++ b/flys-artifacts/ChangeLog	Wed Aug 15 07:41:11 2012 +0000
@@ -1,3 +1,7 @@
+2012-08-14	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	* doc/conf/meta-data.xml: More former calculations in fixA DC.
+
 2012-08-13	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	* doc/conf/artifacts/fixanalysis.xml: Add discharge curve facet to
--- a/flys-artifacts/doc/conf/meta-data.xml	Tue Aug 14 14:02:28 2012 +0000
+++ b/flys-artifacts/doc/conf/meta-data.xml	Wed Aug 15 07:41:11 2012 +0000
@@ -1522,7 +1522,7 @@
                        <dc:statement>
                          SELECT name AS facet_name, num as facet_num, description AS facet_description
                          FROM facets
-                         WHERE out_id = ${out_id} AND ( name LIKE 'fix_deviation_ls%' OR name LIKE 'fix_sector_average_ls%' )
+                         WHERE out_id = ${out_id} AND ( name LIKE 'fix_deviation_ls%' OR name LIKE 'fix_sector_average_ls%' OR name LIKE 'fix_analysis_events_ls%' OR name LIKE 'fix_reference_events_ls%' )
                          ORDER BY num ASC, name DESC
                        </dc:statement>
                        <waterlevels>
@@ -1594,6 +1594,54 @@
           </waterlevels>
         </dc:if>
 
+        <dc:if test="dc:contains($artifact-outs, 'fix_derivate_curve')">
+          <waterlevels>
+            <dc:elements>
+              <dc:context>
+                 <dc:statement>
+                   SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation
+                   FROM   master_artifacts m
+                   WHERE  m.collection_id = ${collection_id} AND m.gid &lt;&gt; CAST(${artifact-id} AS uuid)
+                   AND EXISTS (
+                       SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river})
+                 </dc:statement>
+                 <dc:elements>
+
+                   <dc:context>
+                   <dc:statement>
+                     SELECT id AS out_id
+                     FROM outs
+                     WHERE artifact_id = ${a_id} AND name = 'fix_derivate_curve'
+                   </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} and name = 'fix_derivate'
+                         ORDER BY num ASC, name DESC
+                       </dc:statement>
+                       <waterlevels>
+                         <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/>
+                         <dc:elements>
+                           <dc:element name="${facet_name}">
+                             <dc:attribute name="description" value="${facet_description}"/>
+                             <dc:attribute name="ids"         value="${facet_num}"/>
+                             <dc:attribute name="factory"     value="fixanalysis"/>
+                             <dc:attribute name="artifact-id" value="${a_gid}"/>
+                             <dc:attribute name="out"         value="fix_derivate_curve"/>
+                           </dc:element>
+                         </dc:elements>
+                       </waterlevels>
+                     </dc:context>
+                   </dc:elements>
+                  </dc:context>
+                 </dc:elements>
+                </dc:context>
+             </dc:elements>
+          </waterlevels>
+        </dc:if>
+
         <dc:if test="dc:contains($artifact-outs, 'fix_wq_curve')">
           <waterlevels>
             <dc:elements>
@@ -1679,7 +1727,8 @@
            WATERLEVELS - ONLY SHOW Ws
         </dc:comment>
 
-        <dc:if test="dc:contains($artifact-outs, 'waterlevels')">
+        <!-- TODO doesnt work nicely for fix/wq-diags. -->
+        <dc:if test="dc:contains($artifact-outs, 'waterlevels') or (dc:contains($artifact-outs, 'fix_wq_curve'))"> 
           <waterlevels>
             <dc:elements>
               <dc:context>

http://dive4elements.wald.intevation.org