changeset 4379:8c7e76521904

Add datacage logic for MINFO bed differences The datacage will display already calculated fixanalysis data for longitudinal section curves.
author Björn Ricks <bjoern.ricks@intevation.de>
date Fri, 02 Nov 2012 15:52:45 +0100
parents 8eb1d6dc96a9
children 19754e5227c8
files flys-artifacts/doc/conf/meta-data.xml
diffstat 1 files changed, 43 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/doc/conf/meta-data.xml	Fri Nov 02 15:50:35 2012 +0100
+++ b/flys-artifacts/doc/conf/meta-data.xml	Fri Nov 02 15:52:45 2012 +0100
@@ -1939,6 +1939,49 @@
           </floodmap>
         </dc:if>
 
+        <dc:comment>
+          MINFO bedheight difference
+        </dc:comment>
+
+        <dc:if test="dc:contains($artifact-outs, 'bed_difference_year') or dc:contains($artifact-outs, 'bed_difference_height_year')">
+          <fix_longitudinal_section_curve>
+            <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 = 'fix_sector_average_ls_0' or f.name = 'fix_sector_average_ls_1' or f.name = 'fix_sector_average_ls_2'
+                                 or f.name = 'fix_sector_average_ls_3' or f.name = 'fix_analysis_events_ls' or f.name = 'fix_reference_events_ls')
+                                and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id}
+                        </dc:statement>
+                        <fix_longitudinal_section_curve>
+                            <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="factory"     value="fixanalysis"/>
+                                <dc:attribute name="artifact-id" value="${aid}"/>
+                                <dc:attribute name="ids"         value="${facet_num}"/>
+                                <dc:attribute name="out"         value="fix_longitudinal_section_curve"/>
+                            </dc:element>
+                            </dc:elements>
+                        </fix_longitudinal_section_curve>
+                        </dc:context>
+                    </dc:elements>
+                </dc:context>
+            </dc:elements>
+          </fix_longitudinal_section_curve>
+        </dc:if>
+
       </dc:context>
       </old_calculations>
 

http://dive4elements.wald.intevation.org