diff artifacts/doc/conf/meta-data.xml @ 8377:64b21db73846

Q-symmetric datacage configuration for user-data.
author Tom Gottfried <tom@intevation.de>
date Fri, 03 Oct 2014 10:26:58 +0200
parents b9fa8124583c
children 1e1b08d033f4
line wrap: on
line diff
--- a/artifacts/doc/conf/meta-data.xml	Thu Oct 02 19:31:09 2014 +0200
+++ b/artifacts/doc/conf/meta-data.xml	Fri Oct 03 10:26:58 2014 +0200
@@ -281,7 +281,7 @@
                       </dc:comment>
                     </dc:when>
                     <dc:when test="$out = 'waterlevels_panel'">
-                      <dc:call-macro name="waterlevels-fix"/>
+                      <dc:call-macro name="waterlevels-user"/>
                       <dc:comment comment="Candidate for:">
                         <dc:call-macro name="longitudinal-section-user-prototype"/>
                       </dc:comment>
@@ -322,24 +322,20 @@
                     </dc:when>
                     <dc:comment> Discharge curves </dc:comment>
                     <dc:when test="$out = 'computed_discharge_curve'">
-                      <dc:call-macro name="computed-discharge-curve"/>
-                      <dc:call-macro name="fix-wq-curve"/>
-                      <dc:call-macro name="discharge-curve"/>
-                      <dc:call-macro name="extreme-wq-curve"/>
+                      <dc:call-macro name="discharge-curve-user-prototype"/>
                     </dc:when>
                     <dc:when test="$out = 'fix_derivate_curve'">
-                      <dc:call-macro name="fix-derivate-curve"/>
+                      <dc:call-macro name="discharge-curve-user-prototype"/>
                     </dc:when>
                     <dc:when test="$out = 'fix_wq_curve'">
-                      <dc:call-macro name="fix-wq-curve"/>
-                      <dc:call-macro name="waterlevels-fix"/>
+                      <dc:call-macro name="discharge-curve-user-prototype"/>
                     </dc:when>
                     <dc:when test="$out = 'historical_discharge_wq'">
-                      <dc:call-macro name="historical-discharge-wq-user"/>
+                      <dc:call-macro name="discharge-curve-user-prototype"/>
                     </dc:when>
                     <dc:when test="starts-with($out, 'sq_relation') or
                                  $out = 'sq_overview'">
-                      <dc:call-macro name="sqrelations_user"/>
+                      <dc:call-macro name="discharge-curve-user-prototype"/>
                     </dc:when>
                     <dc:comment> Time series </dc:comment>
                     <dc:when test="$out = 'fix_deltawt_curve'">
@@ -401,29 +397,6 @@
       </dc:filter>
     </dc:macro>
 
-    <dc:macro name="historical-discharge-wq-user">
-      <dc:filter expr="$out = 'historical_discharge_wq' and starts-with($facet_name, 'historical_discharge.wq')">
-        <dc:if test="dc:has-result()">
-          <historical_discharges>
-            <dc:call-macro name="collection-group">
-              <discharges description="{dc:group-key()}">
-                <dc:for-each>
-                  <dc:element name="${facet_name}">
-                    <dc:attribute name="description" value="${facet_description}"/>
-                    <dc:attribute name="factory" value="winfo"/>
-                    <dc:attribute name="target_out" value="${out}"/>
-                    <dc:attribute name="artifact-id" value="${a_gid}"/>
-                    <dc:attribute name="ids" value="${facet_num}"/>
-                    <dc:attribute name="out" value="historical_discharge"/>
-                  </dc:element>
-                </dc:for-each>
-              </discharges>
-            </dc:call-macro>
-          </historical_discharges>
-        </dc:if>
-      </dc:filter>
-    </dc:macro>
-
     <dc:macro name="differences">
       <dc:filter expr="$facet_name = 'w_differences' or $facet_name = 'w_differences.filtered'">
         <dc:if test="dc:has-result()">
@@ -664,72 +637,45 @@
       </dc:filter>
     </dc:macro>
 
-    <dc:macro name="fix-derivate-curve">
-      <dc:filter expr="$out_name = 'fix_derivate_curve' and $facet_name = 'fix_derivate_curve'">
+    <dc:macro name="fix-wq-curve">
+      <dc:filter expr="($out_name = 'fix_wq_curve' and
+                       (starts-with($facet_name, 'fix_analysis_events_wq') or
+                       starts-with($facet_name, 'fix_reference_events_wq') or
+                       starts-with($facet_name, 'fix_sector_average_wq') or
+                       $facet_name = 'fix_wq_curve')) or
+                       ($out_name = 'fix_derivate_curve' and
+                       $facet_name = 'fix_derivate_curve')">
         <dc:if test="dc:has-result()">
-          <waterlevels>
-            <dc:call-macro name="collection-group">
-              <waterlevels description="{dc:group-key()}">
-                <dc:for-each>
-                  <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="target_out" value="${out}"/>
-                    <dc:attribute name="artifact-id" value="${a_gid}"/>
-                    <dc:attribute name="out" value="fix_derivate_curve"/>
-                  </dc:element>
-                </dc:for-each>
-              </waterlevels>
-            </dc:call-macro>
-          </waterlevels>
-        </dc:if>
-      </dc:filter>
-    </dc:macro>
-
-    <dc:macro name="fix-wq-curve">
-      <dc:filter expr="$out_name = 'fix_wq_curve' and
-        (starts-with($facet_name, 'fix_analysis_events_wq') or
-        starts-with($facet_name, 'fix_reference_events_wq') or
-        starts-with($facet_name, 'fix_sector_average_wq') or
-        $facet_name = 'fix_wq_curve')">
-        <dc:if test="dc:has-result()">
-          <waterlevels>
+          <waterlevels_fix>
             <dc:call-macro name="collection-group">
-              <waterlevels description="{dc:group-key()}">
+              <projects description="{dc:group-key()}">
                 <dc:for-each>
-                  <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="target_out" value="${out}"/>
-                    <dc:attribute name="artifact-id" value="${a_gid}"/>
-                    <dc:attribute name="out" value="fix_wq_curve"/>
-                  </dc:element>
+                  <dc:choose>
+                    <dc:when test="$out_name = 'fix_wq_curve'">
+                      <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="target_out" value="${out}"/>
+                        <dc:attribute name="artifact-id" value="${a_gid}"/>
+                        <dc:attribute name="out" value="fix_wq_curve"/>
+                      </dc:element>
+                    </dc:when>
+                    <dc:when test="$out_name = 'fix_derivate_curve'">
+                      <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="target_out" value="${out}"/>
+                        <dc:attribute name="artifact-id" value="${a_gid}"/>
+                        <dc:attribute name="out" value="fix_derivate_curve"/>
+                      </dc:element>
+                    </dc:when>
+                  </dc:choose>
                 </dc:for-each>
-              </waterlevels>
+              </projects>
             </dc:call-macro>
-          </waterlevels>
-        </dc:if>
-      </dc:filter>
-    </dc:macro>
-
-
-    <dc:macro name="discharge-curve">
-      <dc:filter expr="$facet_name = 'discharge_curve.curve'">
-        <dc:if test="dc:has-result()">
-          <discharge_curves>
-            <dc:for-each>
-              <dc:element name="${facet_name}">
-                <dc:attribute name="description" value="${facet_description}"/>
-                <dc:attribute name="factory" value="winfo"/>
-                <dc:attribute name="target_out" value="${out}"/>
-                <dc:attribute name="artifact-id" value="${a_gid}"/>
-                <dc:attribute name="ids" value="${a_gid}"/>
-                <dc:attribute name="out" value="discharge_curve"/>
-              </dc:element>
-            </dc:for-each>
-          </discharge_curves>
+          </waterlevels_fix>
         </dc:if>
       </dc:filter>
     </dc:macro>
@@ -757,16 +703,20 @@
       <dc:filter expr="$facet_name = 'computed_discharge_curve.q'">
         <dc:if test="dc:has-result()">
           <computed_discharge_curves>
-            <dc:for-each>
-              <dc:element name="${facet_name}">
-                <dc:attribute name="description" value="${facet_description}"/>
-                <dc:attribute name="factory" value="winfo"/>
-                <dc:attribute name="target_out" value="${out}"/>
-                <dc:attribute name="artifact-id" value="${a_gid}"/>
-                <dc:attribute name="ids" value="${a_gid}"/>
-                <dc:attribute name="out" value="computed_discharge_curve"/>
-              </dc:element>
-            </dc:for-each>
+            <dc:call-macro name="collection-group">
+              <projects description="{dc:group-key()}">
+                <dc:for-each>
+                  <dc:element name="${facet_name}">
+                    <dc:attribute name="description" value="${facet_description}"/>
+                    <dc:attribute name="factory" value="winfo"/>
+                    <dc:attribute name="target_out" value="${out}"/>
+                    <dc:attribute name="artifact-id" value="${a_gid}"/>
+                    <dc:attribute name="ids" value="${a_gid}"/>
+                    <dc:attribute name="out" value="computed_discharge_curve"/>
+                  </dc:element>
+                </dc:for-each>
+              </projects>
+            </dc:call-macro>
           </computed_discharge_curves>
         </dc:if>
       </dc:filter>
@@ -791,10 +741,12 @@
       </dc:filter>
     </dc:macro>
 
-    <dc:comment>TODO doesnt work nicely for fix/wq-diags. Aheinecke (27.5.2013): Why?</dc:comment>
-    <dc:macro name="waterlevels-fix">
-      <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:macro name="waterlevels-user">
+      <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()">
           <waterlevels>
             <dc:call-macro name="collection-group">
@@ -802,11 +754,14 @@
                 <dc:for-each>
                   <dc:choose>
                     <dc:when test="$ld_m = 'location'">
-                      <dc:variable name="combined_desc" expr="concat($facet_description, ' an KM ', $deffrom)"/>
+                      <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:variable name="combined_desc"
+                                   expr="concat($facet_description, ' von KM ',
+                                         $deffrom, ' bis KM ', $defto)"/>
                     </dc:otherwise>
                   </dc:choose>
                   <dc:element name="${facet_name}">
@@ -1042,7 +997,7 @@
         ($out = 'sq_relation_e' and starts-with($facet_name, 'sq_e_')) or
         ($out = 'sq_relation_f' and starts-with($facet_name, 'sq_f_')) or
         ($out = 'sq_relation_g' and starts-with($facet_name, 'sq_g_'))) or
-        $out = 'sq_overview' and dc:contains($facet_name, 'overview')">
+        dc:contains($facet_name, 'overview')">
         <dc:if test="dc:has-result()">
           <sq_relations>
             <dc:call-macro name="collection-group">
@@ -1491,6 +1446,18 @@
         </minfo>
     </dc:macro>
 
+    <dc:macro name="discharge-curve-user-prototype">
+      <dc:call-macro name="waterlevels-user"/>
+      <dc:call-macro name="computed-discharge-curve"/>
+      <!-- TODO: macro for discharge longitudinal section -->
+      <dc:call-macro name="fix-wq-curve"/>
+      <!-- TODO: own macro for Vollmer-curve (extract from fix-wq-curve and waterlevels-user) -->
+      <dc:call-macro name="extreme-wq-curve"/>
+      <minfo>
+        <dc:call-macro name="sqrelations_user"/>
+      </minfo>
+    </dc:macro>
+
     <dc:macro name="longitudinal-section-prototype">
       <dc:call-macro name="basedata_0"/>
       <dc:call-macro name="basedata_1_additionals"/>

http://dive4elements.wald.intevation.org