[PATCH] Datacage config for new sediment load structures. Missing: some facets and everything down from the innermost macros for sediment load at measurement stations

Wald Commits scm-commit at wald.intevation.org
Fri Aug 8 13:24:16 CEST 2014


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1407497051 -7200
# Node ID 1c57c9dc1661f771be4513dd85e4306294634bd1
# Parent  a403dbdb9e81001a78f41128c234a7ec75e5de43
Datacage config for new sediment load structures. Missing: some facets and everything down from the innermost macros for sediment load at measurement stations.

diff -r a403dbdb9e81 -r 1c57c9dc1661 artifacts/doc/conf/meta-data.xml
--- a/artifacts/doc/conf/meta-data.xml	Thu Aug 07 20:03:44 2014 +0200
+++ b/artifacts/doc/conf/meta-data.xml	Fri Aug 08 13:24:11 2014 +0200
@@ -1407,133 +1407,145 @@
       </densities>
     </dc:macro>
 
-    <dc:macro name="one-load">
-      <dc:for-each>
-          <dc:variable name="syear" type="string" expr="dc:date-format('yyyy', $year)"/>
-          <year description="{$syear}"
-                 factory="sedimentyield"
-                 target_out="{$out}"
-                 info="{$description}"
-                ids="{$syid}" />
-      </dc:for-each>
+    <dc:macro name="one-load_ls">
+      <dc:variable name="syear" type="string" expr="dc:date-format('yyyy', $year)"/>
+      <year description="{$syear}"
+            factory="sedimentyield"
+            target_out="{$out}"
+            info="{$description}"
+            ids="{$syid}" />
     </dc:macro>
 
-    <dc:macro name="epoch-load">
-      <dc:for-each>
-          <dc:variable name="syear" type="string" expr="dc:date-format('yyyy', $startyear)"/>
-          <dc:variable name="eyear" type="string" expr="dc:date-format('yyyy', $endyear)"/>
-          <year description="{$syear}-{$eyear}"
-                 factory="sedimentyield"
-                 target_out="{$out}"
-                 info="{$description}"
-                ids="{$syid}" />
-      </dc:for-each>
+    <dc:macro name="epoch-load_ls">
+      <dc:variable name="syear" type="string" expr="dc:date-format('yyyy', $startyear)"/>
+      <dc:variable name="eyear" type="string" expr="dc:date-format('yyyy', $endyear)"/>
+      <year description="{$syear}-{$eyear}"
+            factory="sedimentyield"
+            target_out="{$out}"
+            info="{$description}"
+            ids="{$syid}" />
     </dc:macro>
 
     <dc:macro name="loads">
      <dc:if test="dc:has-result()">
-       <dc:filter expr="$fraction='sand'">
-         <dc:if test="dc:has-result()">
-           <sand>
-             <dc:macro-body/>
-           </sand>
-         </dc:if>
-       </dc:filter>
-       <dc:filter expr="$fraction='fine_middle'">
-         <dc:if test="dc:has-result()">
-           <fine_middle>
-             <dc:macro-body/>
-           </fine_middle>
-         </dc:if>
-       </dc:filter>
-       <dc:filter expr="$fraction='coarse'">
-         <dc:if test="dc:has-result()">
-           <coarse>
-             <dc:macro-body/>
-           </coarse>
-         </dc:if>
-       </dc:filter>
-       <dc:filter expr="$fraction='suspended_sediment'">
-         <dc:if test="dc:has-result()">
-           <susp_sediment>
-             <dc:macro-body/>
-           </susp_sediment>
-         </dc:if>
-       </dc:filter>
-       <dc:filter expr="$fraction='susp_sand'">
-         <dc:if test="dc:has-result()">
-           <susp_sand>
-             <dc:macro-body/>
-           </susp_sand>
-         </dc:if>
-       </dc:filter>
-       <dc:filter expr="$fraction='susp_sand_bed'">
-         <dc:if test="dc:has-result()">
-           <susp_sand_bed>
-             <dc:macro-body/>
-           </susp_sand_bed>
-         </dc:if>
-       </dc:filter>
-       <dc:filter expr="$fraction='total'">
-         <dc:if test="dc:has-result()">
-           <total_load>
-             <dc:macro-body/>
-           </total_load>
-         </dc:if>
-       </dc:filter>
+       <dc:group expr="$fraction">
+         <dc:variable name="fraction_name" expr="concat('\${', dc:group-key(), '}')"/>
+         <fraction description="{$fraction_name}">
+           <dc:for-each>
+               <dc:macro-body/>
+           </dc:for-each>
+         </fraction>
+       </dc:group>
      </dc:if>
     </dc:macro>
-      
+
     <dc:macro name="yields">
       <yields>
-      <dc:call-macro name="annotations_sediment_load_ls"/>
-      <years>
-      <dc:context>
-        <dc:statement>
-            SELECT DISTINCT
-                sy.id          AS syid,
-                sy.description AS description,
-                ti.start_time  AS year,
-                gf.name        AS fraction
-            FROM     sediment_load_ls sy
-                JOIN rivers r ON sy.river_id = r.id
-                JOIN sediment_load_ls_values syv ON sy.id = syv.sediment_load_ls_id
-                JOIN time_intervals ti ON sy.time_interval_id = ti.id
-                JOIN grain_fraction gf ON gf.id = sy.grain_fraction_id
-            WHERE   r.id = ${river_id}
-                AND ti.stop_time IS NULL
-                AND syv.station BETWEEN ${fromkm} AND ${tokm}
-            ORDER BY fraction, year DESC
-        </dc:statement>
-        <dc:call-macro name="loads">
-          <dc:call-macro name="one-load"/>
-        </dc:call-macro>
-      </dc:context>
-      </years>
-      <epochs>
-      <dc:context>
-        <dc:statement>
-            SELECT DISTINCT
-                sy.id          AS syid,
-                sy.description AS description,
-                ti.start_time  AS startyear,
-                ti.stop_time   AS endyear,
-                gf.name        AS fraction
-            FROM     sediment_load_ls sy
-                JOIN rivers r ON sy.river_id = r.id
-                JOIN sediment_load_ls_values syv ON sy.id = syv.sediment_load_ls_id
-                JOIN time_intervals ti ON sy.time_interval_id = ti.id
-                JOIN grain_fraction gf ON gf.id = sy.grain_fraction_id
-            WHERE   r.id = ${river_id}
-                AND ti.stop_time IS NOT NULL
-                AND syv.station BETWEEN ${fromkm} AND ${tokm}
-            ORDER BY fraction, startyear DESC, endyear DESC
-        </dc:statement>
-        <dc:call-macro name="loads">
-          <dc:call-macro name="epoch-load"/>
-        </dc:call-macro>
-      </dc:context>
-      </epochs>
+        <dc:call-macro name="annotations_sediment_load_ls"/>
+        <measurement_stations>
+          <years>
+            <dc:context>
+              <dc:statement>
+                SELECT DISTINCT
+                    sy.id          AS syid,
+                    sy.description AS description,
+                    ti.start_time  AS year,
+                    gf.name        AS fraction
+                FROM     sediment_load sy
+                    JOIN sediment_load_values syv
+                        ON sy.id = syv.sediment_load_id
+                    JOIN measurement_station ms
+                        ON ms.id = syv.measurement_station_id
+                    JOIN rivers r ON ms.river_id = r.id
+                    JOIN time_intervals ti ON sy.time_interval_id = ti.id
+                    JOIN grain_fraction gf ON gf.id = sy.grain_fraction_id
+                WHERE   r.id = ${river_id}
+                    AND ti.stop_time IS NULL
+                    AND ms.station BETWEEN ${fromkm} AND ${tokm}
+                ORDER BY fraction, year DESC
+              </dc:statement>
+              <dc:call-macro name="loads">
+                <dc:call-macro name="one-load"/>
+              </dc:call-macro>
+            </dc:context>
+          </years>
+          <epochs>
+            <dc:context>
+              <dc:statement>
+                SELECT DISTINCT
+                    sy.id          AS syid,
+                    sy.description AS description,
+                    ti.start_time  AS startyear,
+                    ti.stop_time   AS endyear,
+                    gf.name        AS fraction
+                FROM     sediment_load sy
+                    JOIN sediment_load_values syv
+                        ON sy.id = syv.sediment_load_id
+                    JOIN measurement_station ms
+                        ON ms.id = syv.measurement_station_id
+                    JOIN rivers r ON ms.river_id = r.id
+                    JOIN time_intervals ti ON sy.time_interval_id = ti.id
+                    JOIN grain_fraction gf ON gf.id = sy.grain_fraction_id
+                WHERE   r.id = ${river_id}
+                    AND ti.stop_time IS NOT NULL
+                    AND ms.station BETWEEN ${fromkm} AND ${tokm}
+                ORDER BY fraction, startyear DESC, endyear DESC
+              </dc:statement>
+              <dc:call-macro name="loads">
+                <dc:call-macro name="epoch-load"/>
+              </dc:call-macro>
+            </dc:context>
+          </epochs>
+        </measurement_stations>
+        <sediment_load_ls>
+          <years>
+            <dc:context>
+              <dc:statement>
+                SELECT DISTINCT
+                    sy.id          AS syid,
+                    sy.description AS description,
+                    ti.start_time  AS year,
+                    gf.name        AS fraction
+                FROM     sediment_load_ls sy
+                    JOIN rivers r ON sy.river_id = r.id
+                    JOIN sediment_load_ls_values syv ON sy.id = syv.sediment_load_ls_id
+                    JOIN time_intervals ti ON sy.time_interval_id = ti.id
+                    JOIN grain_fraction gf ON gf.id = sy.grain_fraction_id
+                WHERE   r.id = ${river_id}
+                    AND ti.stop_time IS NULL
+                    AND syv.station BETWEEN ${fromkm} AND ${tokm}
+                ORDER BY fraction, year DESC
+              </dc:statement>
+              <dc:call-macro name="loads">
+                <dc:call-macro name="one-load_ls"/>
+              </dc:call-macro>
+            </dc:context>
+          </years>
+          <epochs>
+            <dc:context>
+              <dc:statement>
+                SELECT DISTINCT
+                    sy.id          AS syid,
+                    sy.description AS description,
+                    ti.start_time  AS startyear,
+                    ti.stop_time   AS endyear,
+                    gf.name        AS fraction
+                FROM     sediment_load_ls sy
+                    JOIN rivers r ON sy.river_id = r.id
+                    JOIN sediment_load_ls_values syv ON sy.id = syv.sediment_load_ls_id
+                    JOIN time_intervals ti ON sy.time_interval_id = ti.id
+                    JOIN grain_fraction gf ON gf.id = sy.grain_fraction_id
+                WHERE   r.id = ${river_id}
+                    AND ti.stop_time IS NOT NULL
+                    AND syv.station BETWEEN ${fromkm} AND ${tokm}
+                ORDER BY fraction, startyear DESC, endyear DESC
+              </dc:statement>
+              <dc:call-macro name="loads">
+                <dc:call-macro name="epoch-load_ls"/>
+              </dc:call-macro>
+            </dc:context>
+          </epochs>
+        </sediment_load_ls>
       </yields>
     </dc:macro>
 
diff -r a403dbdb9e81 -r 1c57c9dc1661 gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java	Thu Aug 07 20:03:44 2014 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java	Fri Aug 08 13:24:11 2014 +0200
@@ -980,19 +980,27 @@
 
     String sediment_load();
 
-    String sand();
+    String sediment_load_ls();
+
+    String measurement_stations();
+
+    String coarse();
 
     String fine_middle();
 
-    String susp_sediment();
-
-    String coarse();
+    String sand();
 
     String susp_sand();
 
     String susp_sand_bed();
 
-    String total_load();
+    String suspended_sediment();
+
+    String total();
+
+    String bed_load();
+
+    String suspended_load();
 
     // Capabilities Information Panel
 
diff -r a403dbdb9e81 -r 1c57c9dc1661 gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties	Thu Aug 07 20:03:44 2014 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties	Fri Aug 08 13:24:11 2014 +0200
@@ -520,14 +520,20 @@
 years = years
 epochs = epochs
 densities = Sediment Densities
+
 sediment_load = Sediment Load
+sediment_load_ls = Longitudinal sections
+measurement_stations = Measurement stations
+coarse = Coarse
+fine_middle = Fine Middle
 sand = Sand
-fine_middle = Fine Middle
-susp_sediment = Suspended Sediment
-coarse = Coarse
 susp_sand = Suspended Sand
 susp_sand_bed = Suspended Sand (bed)
-total_load = Total load
+suspended_sediment = Suspended Sediment
+total = Total load
+bed_load = Bed load
+suspended_load = Suspended load
+
 # No translation for the pegelonline wms service layer names.
 gauge_points = Pegelpunkte (WSV)
 gauge_level = Aktueller Wasserstand (WSV)
diff -r a403dbdb9e81 -r 1c57c9dc1661 gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties	Thu Aug 07 20:03:44 2014 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties	Fri Aug 08 13:24:11 2014 +0200
@@ -525,14 +525,20 @@
 years = Einzeljahre
 epochs = Epochen
 densities = Sedimentdichte
+
 sediment_load = Sedimentfracht
+sediment_load_ls = L\u00e4ngsschnitte
+measurement_stations = Messstellen
+coarse = Geschiebe Grobkorn
+fine_middle = Geschiebe Fein Mittel Kies
 sand = Geschiebe Sand
-fine_middle = Geschiebe Fein Mittel Kies
-coarse = Geschiebe Grobkorn
 susp_sand = Susp. Sand
-susp_sediment = Susp. Sediment
 susp_sand_bed = Bettb. Anteil susp. Sand
-total_load = Gesamtfracht
+suspended_sediment = Susp. Sediment
+total = Gesamtfracht
+bed_load = Geschiebefracht
+suspended_load = Suspensionsfracht
+
 gauge_points = Pegelmessstelle (WMS)
 gauge_level = Wasserstand (WMS)
 gauge_names = Pegelname (WMS)
diff -r a403dbdb9e81 -r 1c57c9dc1661 gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_en.properties
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_en.properties	Thu Aug 07 20:03:44 2014 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_en.properties	Fri Aug 08 13:24:11 2014 +0200
@@ -505,14 +505,19 @@
 years = years
 epochs = epochs
 densities = Sediment Densities
+
 sediment_load = Sediment Load
+sediment_load_ls = Longitudinal sections
+measurement_stations = Measurement stations
+coarse = Coarse
+fine_middle = Fine Middle
 sand = Sand
-fine_middle = Fine Middle
-susp_sediment = Suspended Sediment
-coarse = Coarse
 susp_sand = Suspended Sand
 susp_sand_bed = Suspended Sand (bed)
-total_load = Total load
+suspended_sediment = Suspended Sediment
+total = Total load
+bed_load = Bed load
+suspended_load = Suspended load
 
 startcolor = Colorrange start color
 endcolor = Colorrange end color


More information about the Dive4Elements-commits mailing list