diff flys-artifacts/doc/conf/meta-data.xml @ 2736:8839086c4b7b

Modify Cross-Section DC conf to allow loading of waterlevels, fixations and heightmarks. flys-artifacts/trunk@4469 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 23 May 2012 08:12:49 +0000
parents 7311d0336600
children 5eb3edb4f37b
line wrap: on
line diff
--- a/flys-artifacts/doc/conf/meta-data.xml	Wed May 23 08:10:55 2012 +0000
+++ b/flys-artifacts/doc/conf/meta-data.xml	Wed May 23 08:12:49 2012 +0000
@@ -402,6 +402,8 @@
               <dc:if test="dc:contains($artifact-outs, 'cross_section')">
                  <dc:call-macro name="basedata_0"/>
                  <dc:call-macro name="basedata_1_additionals"/>
+                 <dc:call-macro name="basedata_2_fixations"/>
+                 <dc:call-macro name="basedata_4_heightmarks-points"/>
                  <dc:call-macro name="cross_sections"/>
                  <dc:call-macro name="hyks"/>
               </dc:if>
@@ -1094,9 +1096,60 @@
             </dc:elements>
           </computed_discharge_curves>
         </dc:if>
+        
+        <dc:comment>
+          CROSS SECTION
+        </dc:comment>
+
+        <dc:if test="dc:contains($artifact-outs, 'cross_section')">
+          <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 = 'cross_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>
+                         <longitudinal_section_columns>
+                             <dc:attribute name="description" value="${river} ${a_creation}"/>
+                             <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="winfo"/>
+                                 <dc:attribute name="artifact-id" value="${a_gid}"/>
+                                 <dc:attribute name="out" value="cross_section"/>
+                               </dc:element>
+                             </dc:elements>
+                         </longitudinal_section_columns>
+                       </dc:context>
+                     </dc:elements>
+                   </dc:context>
+                 </dc:elements>
+               </dc:context>
+             </dc:elements>
+          </waterlevels>
+        </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')) or (dc:contains($artifact-outs, 'cross_section')))">
+        <dc:if test="dc:contains($artifact-outs, 'longitudinal_section') or (dc:contains($artifact-outs, 'discharge_longitudinal_section') or (dc:contains($artifact-outs, 'w_differences')))">
           <waterlevels>
             <dc:elements>
               <dc:context>

http://dive4elements.wald.intevation.org