[PATCH 1 of 4] issue1394: meta-data.xml: Add DC-Config for (pseudo-)out "differenceable"

Wald Commits scm-commit at wald.intevation.org
Wed Jul 17 12:09:00 CEST 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1374055823 -7200
# Node ID 5f0e3e9cf6f32191f08c1dcd3ceccd2a43bf485b
# Parent  663c159f3b43d669879685701d43e379e7f1fd16
issue1394: meta-data.xml: Add DC-Config for (pseudo-)out "differenceable".

diff -r 663c159f3b43 -r 5f0e3e9cf6f3 artifacts/doc/conf/meta-data.xml
--- a/artifacts/doc/conf/meta-data.xml	Wed Jul 17 10:03:27 2013 +0200
+++ b/artifacts/doc/conf/meta-data.xml	Wed Jul 17 12:10:23 2013 +0200
@@ -271,6 +271,16 @@
                       <dc:call-macro name="bed-heights-epoch"/>
                     </bedheights>
                   </dc:when>
+                  <dc:when test="$out = 'differenceable'">
+                    <dc:if test="$current-state-id != 'state.winfo.uesk.wsp'">
+                      <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="basedata_5_flood-protections"/>
+                      <dc:call-macro name="minfo-heights"/>
+                    </dc:if>
+                  </dc:when>
                   <dc:when test="$out = 'waterlevels'">
                     <dc:if test="$current-state-id != 'state.winfo.uesk.wsp'">
                       <dc:call-macro name="basedata_0"/>
@@ -347,6 +357,9 @@
                     <dc:when test="$out = 'duration_curve'">
                       <dc:call-macro name="duration-curve"/>
                     </dc:when>
+                    <dc:when test="$out = 'differenceable'">
+                      <dc:call-macro name="differenceable-fix"/>
+                    </dc:when>
                     <dc:when test="$out = 'waterlevels'">
                       <dc:call-macro name="waterlevels-fix"/>
                     </dc:when>
@@ -713,6 +726,74 @@
       </dc:filter>
     </dc:macro>
 
+    <dc:comment comment="For building differences." />
+    <dc:macro name="differenceable-fix">
+      <beddifferences>
+         <dc:call-macro name="bedheight-differences"/>
+      </beddifferences>
+      <dc:filter expr="($out_name = 'longitudinal_section' and $facet_name = 'longitudinal_section.w') and
+        (not ($current-state-id = 'state.winfo.uesk.wsp' and $ld_m = 'location'))">
+        <dc:if test="dc:has-result()">
+          <vollmer-waterlevels>
+            <dc:group expr="concat($river, ' ', dc:date-format('dd.MM.yyyy - H:m:s', $a_creation), ' ', $collection_name)">
+              <waterlevels description="{dc:group-key()}">
+                <dc:for-each>
+                  <dc:choose>
+                    <dc:when test="$ld_m = 'location'">
+                      <dc:variable name="combined_desc" expr="concat($facet_description, ' an KM ', $deffrom)"/>
+                    </dc:when>
+                    <dc:otherwise>
+                      <dc:variable name="combined_desc" expr="concat($facet_description, ' von KM ',
+                        $deffrom, ' bis KM ', $defto)"/>
+                    </dc:otherwise>
+                 </dc:choose>
+                  <dc:comment comment="Vollmer curves need own factory"/>
+                  <dc:if test="$a_state = 'state.fix.vollmer.compute'">
+                    <dc:element name="${facet_name}">
+                      <dc:attribute name="description" value="${combined_desc}"/>
+                      <dc:attribute name="ids" value="${facet_num}"/>
+                      <dc:attribute name="factory" value="fixanalysis"/>
+                      <dc:attribute name="target_out" value="${out}"/>
+                      <dc:attribute name="artifact-id" value="${a_gid}"/>
+                      <dc:attribute name="out" value="longitudinal_section"/>
+                    </dc:element>
+                  </dc:if>
+                </dc:for-each>
+              </waterlevels>
+            </dc:group>
+          </vollmer-waterlevels>
+          <waterlevels>
+            <dc:group expr="concat($river, ' ', dc:date-format('dd.MM.yyyy - H:m:s', $a_creation), ' ', $collection_name)">
+                <waterlevels description="{dc:group-key()}">
+                  <dc:for-each>
+                    <dc:choose>
+                      <dc:when test="$ld_m = 'location'">
+                        <dc:variable name="combined_desc" expr="concat($facet_description, ' an KM ', $deffrom)"/>
+                      </dc:when>
+                      <dc:otherwise>
+                        <dc:variable name="combined_desc" expr="concat($facet_description, ' von KM ',
+                          $deffrom, ' bis KM ', $defto)"/>
+                      </dc:otherwise>
+                    </dc:choose>
+                    <dc:if test="not($a_state = 'state.fix.vollmer.compute')">
+                      <dc:element name="${facet_name}">
+                        <dc:attribute name="description" value="${combined_desc}"/>
+                        <dc:attribute name="ids" value="${facet_num}"/>
+                        <dc:attribute name="factory" value="winfo"/>
+                        <dc:attribute name="target_out" value="${out}"/>
+                        <dc:attribute name="artifact-id" value="${a_gid}"/>
+                        <dc:attribute name="out" value="longitudinal_section"/>
+                      </dc:element>
+                    </dc:if>
+                  </dc:for-each>
+                </waterlevels>
+            </dc:group>
+          </waterlevels>
+        </dc:if>
+      </dc:filter>
+    </dc:macro>
+
+
     <dc:macro name="floodmap-hws-user">
       <dc:comment>No grouping in this?</dc:comment>
       <dc:filter expr="$out_name = 'floodmap' and $facet_name = 'floodmap.usershape'">


More information about the Dive4elements-commits mailing list