changeset 9341:c9a4eb3afa4a

Facet filter added for S-Info collision and flood duration, db loaded artifacts renamed to predefined..
author mschaefer
date Mon, 30 Jul 2018 13:40:33 +0200
parents 85d08fb28d96
children 012ca0cf8756
files artifacts/doc/conf/meta-data.xml artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/collision/CollisionArtifact.java artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/InfrastructureArtifact.java gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties
diffstat 6 files changed, 50 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- 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 -->
--- 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.
--- 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.
--- 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();
 
--- 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
--- 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

http://dive4elements.wald.intevation.org