changeset 2690:15c6f79ca3e2

Add duration_curve.q loading via datacage. flys-artifacts/trunk@4394 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Sun, 13 May 2012 21:13:45 +0000
parents 3ab7b593c6e5
children a7a4d3b2e2b0
files flys-artifacts/doc/conf/meta-data.xml
diffstat 1 files changed, 34 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/doc/conf/meta-data.xml	Fri May 11 12:14:36 2012 +0000
+++ b/flys-artifacts/doc/conf/meta-data.xml	Sun May 13 21:13:45 2012 +0000
@@ -1029,7 +1029,7 @@
         </dc:if>
 
 
-        <dc:if test="dc:contains($artifact-outs, 'longitudinal_section') or (dc:contains($artifact-outs, 'discharge_longitudinal_section') or (dc:contains($artifact-outs, 'w_differences')))">
+        <dc:if test="dc:contains($artifact-outs, 'longitudinal_section') or (dc:contains($artifact-outs, 'discharge_longitudinal_section') or (dc:contains($artifact-outs, 'w_differences')) or (dc:contains($artifact-outs, 'cross_section')))">
           <waterlevels>
             <dc:elements>
               <dc:context>
@@ -1076,6 +1076,39 @@
           </waterlevels>
         </dc:if>
 
+        <dc:if test="dc:contains($artifact-outs, 'duration_curve')">
+          <computed_discharge_curves>
+            <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 a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description
+                          FROM outs as o, facets as f, artifacts as a
+                          WHERE f.name = 'duration_curve.q' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id}
+                        </dc:statement>
+                        <dc:elements>
+                          <dc:element name="${facet_name}">
+                            <dc:attribute name="description" value="${facet_description}"/>
+                            <dc:attribute name="factory"     value="winfo"/>
+                            <dc:attribute name="artifact-id" value="${aid}"/>
+                            <dc:attribute name="ids"         value="${aid}"/>
+                            <dc:attribute name="out"         value="duration_curve"/>
+                          </dc:element>
+                        </dc:elements>
+                      </dc:context>
+                  </dc:elements>
+                </dc:context>
+            </dc:elements>
+          </computed_discharge_curves>
+        </dc:if>
         <dc:comment>
            WATERLEVELS - ONLY SHOW Ws
         </dc:comment>

http://dive4elements.wald.intevation.org