[PATCH] Facet filter added for S-Info collision and flood duration, db loaded artifacts renamed to predefined

Wald Commits scm-commit at wald.intevation.org
Mon Jul 30 13:40:48 CEST 2018


# HG changeset patch
# User mschaefer
# Date 1532950833 -7200
# Node ID c9a4eb3afa4a1ba21f1904775432f8c21cfd4661
# Parent  85d08fb28d9616d28f984d0dcb9da2d3e41128ba
Facet filter added for S-Info collision and flood duration, db loaded artifacts renamed to predefined..

diff -r 85d08fb28d96 -r c9a4eb3afa4a artifacts/doc/conf/meta-data.xml
--- a/artifacts/doc/conf/meta-data.xml	Mon Jul 30 13:28:14 2018 +0200
+++ b/artifacts/doc/conf/meta-data.xml	Mon Jul 30 13:40:33 2018 +0200
@@ -319,10 +319,6 @@
                   <dc:when test="$out = 'sinfo_flood_height'">
                     <dc:call-macro name="longitudinal-section-prototype" />
                   </dc:when>
-                  <!-- FIXME: macht das sinn? die duration_cuve hat ja keine längsschnittdaten  -->
-                  <dc:when test="$out = 'sinfo_flood_duration_curve'">
-                    <dc:call-macro name="longitudinal-section-prototype" />
-                  </dc:when>
 
                   <dc:when test="$out = 'uinfo_salix_line'">
                     <dc:call-macro name="longitudinal-section-prototype" />
@@ -1659,17 +1655,17 @@
           <dc:call-macro name="sinfo_predefined_flowdepth-m" />
         </sinfo_predefined_flowdepths>
 
-        <sinfo_collisions>
-          <dc:call-macro name="sinfo_collisions" />
-        </sinfo_collisions>
+        <sinfo_predefined_collision>
+          <dc:call-macro name="sinfo_predefined_collision" />
+        </sinfo_predefined_collision>
 
         <sinfo_predefined_channel>
           <dc:call-macro name="sinfo_predefined_channel" />
         </sinfo_predefined_channel>
 
-        <sinfo_infrastructure>
-          <dc:call-macro name="sinfo_infrastructure" />
-        </sinfo_infrastructure>
+        <sinfo_predefined_infrastructure>
+          <dc:call-macro name="sinfo_predefined_infrastructure" />
+        </sinfo_predefined_infrastructure>
 
         <sinfo_predefined_tkh>
           <dc:call-macro name="sinfo_predefined_tkh-berechnung" />
@@ -1706,6 +1702,9 @@
       <dc:call-macro name="bedquality" />
       <dc:call-macro name="flow-velocity" />
       <dc:call-macro name="sediment-load" />
+      
+      <dc:comment> UINFO </dc:comment>
+      <dc:call-macro name="uinfo_salix_line" />
     </dc:macro>
 
     <!-- porosities -->
@@ -3328,6 +3327,7 @@
       <dc:macro-body />
     </dc:macro>
 
+    <!-- S-INFO -->
     <dc:macro name="sinfo_flowdepths">
       <dc:filter expr="$a_state = 'state.sinfo.flow_depth' and 
                        ( $facet_name = 'sinfo_facet_flow_depth' or $facet_name = 'sinfo_facet_flow_depth.filtered' or 
@@ -3439,7 +3439,8 @@
     </dc:macro>
 
     <dc:macro name="sinfo_collision">
-      <dc:filter expr="$a_state = 'state.sinfo.collision'">
+      <dc:filter expr="$a_state = 'state.sinfo.collision' and ($facet_name = 'sinfo_facet_collision_calc_count'
+          or $facet_name = 'sinfo_facet_collision_calc_count.2' or $facet_name = 'sinfo_facet_collision_calc_count.3')">
         <dc:if test="dc:has-result()">
           <sinfo_collision>
             <dc:for-each>
@@ -3458,7 +3459,10 @@
     </dc:macro>
 
     <dc:macro name="sinfo_flood_duration">
-      <dc:filter expr="$a_state = 'state.sinfo.flood_duration'">
+      <dc:filter expr="$a_state = 'state.sinfo.flood_duration'
+          and ($facet_name = 'sinfo_facet_flood_duration.left' or $facet_name = 'sinfo_facet_flood_duration.right'
+          or $facet_name = 'mainvalue.duration' or $facet_name = 'sinfo_facet_flood_height.left'
+          or $facet_name = 'sinfo_facet_flood_height.right' or $facet_name = 'mainvalue.w')">
         <dc:if test="dc:has-result()">
           <sinfo_flood_duration>
             <dc:for-each>
@@ -3620,7 +3624,7 @@
     </dc:macro>
 
     <!-- infrastructure height imported from CSV-files for S-INFO -->
-    <dc:macro name="sinfo_infrastructure">
+    <dc:macro name="sinfo_predefined_infrastructure">
       <dc:context>
         <dc:statement>
           SELECT s.id AS id, MIN(s.filename) AS seriesname, MIN(v.station) AS km_min, MAX(v.station) AS km_max,
@@ -3646,7 +3650,7 @@
     </dc:macro>
 
     <!-- collisions imported from CSV-files for S-INFO -->
-    <dc:macro name="sinfo_collisions">
+    <dc:macro name="sinfo_predefined_collision">
       <dc:context>
         <dc:statement>
           SELECT s.id AS id, MIN(s.filename) AS seriesname, MIN(v.station) AS km_min, MAX(v.station) AS km_max, MIN(s.year) AS year,
@@ -3669,6 +3673,29 @@
       </dc:context>
     </dc:macro>
 
+    <!-- U-INFO -->
+    <dc:macro name="uinfo_salix_line">
+      <dc:filter expr="$a_state = 'state.uinfo.salix_line'
+          and ($facet_name = 'uinfo_facet_salix_line' or $facet_name = 'uinfo_facet_salix_line.filtered'
+          or $facet_name = 'uinfo_facet_salix_mnwmw' or $facet_name = 'uinfo_facet_salix_mnwmw.filtered'
+          or $facet_name = 'uinfo_facet_salix_scenario' or $facet_name = 'uinfo_facet_salix_scenario.filtered')">
+        <dc:if test="dc:has-result()">
+          <uinfo_salix_line>
+            <dc:for-each>
+              <dc:element name="${facet_name}">
+                <dc:attribute name="factory" value="uinfo" />
+                <dc:attribute name="target_out" value="${out}" />
+                <dc:attribute name="description" value="${facet_description}" />
+                <dc:attribute name="ids" value="${facet_num}" />
+                <dc:attribute name="artifact-id" value="${a_gid}" />
+                <dc:attribute name="out" value="${out_name}" />
+              </dc:element>
+            </dc:for-each>
+          </uinfo_salix_line>
+        </dc:if>
+      </dc:filter>
+    </dc:macro>
+
     <!-- Vegetation zones, edited by the user -->
     <dc:macro name="vegetationzones">
       <dc:filter expr="$a_state = 'state.uinfo.vegetation_zones' and $facet_name = 'csv'"> <!-- we misuse the csv-facet -->
diff -r 85d08fb28d96 -r c9a4eb3afa4a artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/collision/CollisionArtifact.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/collision/CollisionArtifact.java	Mon Jul 30 13:28:14 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/collision/CollisionArtifact.java	Mon Jul 30 13:40:33 2018 +0200
@@ -48,7 +48,7 @@
         FacetActivity.Registry.getInstance().register(NAME, FacetActivity.INACTIVE);
     }
 
-    public static final String STATIC_STATE_NAME = "state.collision.static";
+    public static final String STATIC_STATE_NAME = "state.predefined_collision.static";
 
     /**
      * Trivial Constructor.
diff -r 85d08fb28d96 -r c9a4eb3afa4a artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/InfrastructureArtifact.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/InfrastructureArtifact.java	Mon Jul 30 13:28:14 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/InfrastructureArtifact.java	Mon Jul 30 13:40:33 2018 +0200
@@ -47,7 +47,7 @@
         FacetActivity.Registry.getInstance().register(NAME, FacetActivity.INACTIVE);
     }
 
-    public static final String STATIC_STATE_NAME = "state.infrastructure.static";
+    public static final String STATIC_STATE_NAME = "state.predefined_infrastructure.static";
 
     /**
      * Trivial Constructor.
diff -r 85d08fb28d96 -r c9a4eb3afa4a 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	Mon Jul 30 13:28:14 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java	Mon Jul 30 13:40:33 2018 +0200
@@ -1495,9 +1495,9 @@
 
     String sinfo_predefined_flowdepth();
 
-    String sinfo_infrastructure();
-
-    String sinfo_collisions();
+    String sinfo_predefined_infrastructure();
+
+    String sinfo_predefined_collision();
 
     String sinfo_collision();
 
diff -r 85d08fb28d96 -r c9a4eb3afa4a 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	Mon Jul 30 13:28:14 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties	Mon Jul 30 13:40:33 2018 +0200
@@ -813,9 +813,9 @@
 sinfo_predefined_flowdepths = Modellierte Datens\u00e4tze
 sinfo_predefined_flowdepth = Flie\u00dftiefen
 
-sinfo_infrastructure = Infrastrukturen BWaStr
+sinfo_predefined_infrastructure = Infrastrukturen BWaStr
 
-sinfo_collisions = Grundber\u00fchrungen
+sinfo_predefined_collision = Grundber\u00fchrungen
 sinfo_collision = Grundber\u00fchrungen
 
 sinfo_flood_duration = \u00dcberflutungsdauer Infrastrukturen BWaStr
diff -r 85d08fb28d96 -r c9a4eb3afa4a 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	Mon Jul 30 13:28:14 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties	Mon Jul 30 13:40:33 2018 +0200
@@ -813,9 +813,9 @@
 sinfo_predefined_flowdepths = Modellierte Datens\u00e4tze
 sinfo_predefined_flowdepth = Flie\u00dftiefen
 
-sinfo_infrastructure = Infrastrukturen BWaStr
+sinfo_predefined_infrastructure = Infrastrukturen BWaStr
 
-sinfo_collisions = Grundber\u00fchrungen
+sinfo_predefined_collision = Grundber\u00fchrungen
 sinfo_collision = Grundber\u00fchrungen
 
 sinfo_flood_duration = \u00dcberflutungsdauer Infrastrukturen BWaStr


More information about the Dive4Elements-commits mailing list