changeset 9136:38e68e72cfb8

Zusammenführen
author gernotbelger
date Thu, 07 Jun 2018 17:49:45 +0200
parents ec1c8d3f3116 (diff) af73fdd96920 (current diff)
children 3bbc687e6cb8
files gwt-client/src/test/java/test/SinfoFlowdepthTest.java
diffstat 6 files changed, 55 insertions(+), 46 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/doc/conf/artifacts/manualpoints.xml	Thu Jun 07 11:41:10 2018 +0200
+++ b/artifacts/doc/conf/artifacts/manualpoints.xml	Thu Jun 07 17:49:45 2018 +0200
@@ -35,6 +35,12 @@
             <facet name="sq_relation_e.manualpoints" />
             <facet name="bed_longitudinal_section.manualpoints" />
             <facet name="sq_relation_f.manualpoints" />
+
+            <facet name="sinfo_flow_depth.manualpoints" />
+            <facet name="sinfo_flow_depth_minmax.manualpoints" />
+            <facet name="sinfo_flow_depth_development.manualpoints" />
+            <facet name="sinfo_flow_depth_development_peryear.manualpoints" />
+            <facet name="sinfo_tkk" />
           </facets>
         </outputmode>
       </outputmodes>
--- a/artifacts/doc/conf/artifacts/sinfo.xml	Thu Jun 07 11:41:10 2018 +0200
+++ b/artifacts/doc/conf/artifacts/sinfo.xml	Thu Jun 07 17:49:45 2018 +0200
@@ -69,6 +69,8 @@
             <facet name="sinfo_facet_tkh" description="Facet for tkh" />
 
             <facet name="longitudinal_section.annotations" description="facet.longitudinal_section.annotations" />
+
+            <facet name="sinfo_flow_depth.manualpoints" description="Manual Points" />
           </facets>
         </outputmode>
 
@@ -120,6 +122,8 @@
             <facet name="sinfo_facet_flow_depth_max" description="max flow depth" />
 
             <facet name="longitudinal_section.annotations" description="facet.longitudinal_section.annotations" />
+            
+            <facet name="sinfo_flow_depth_minmax.manualpoints" description="Manual Points" />            
           </facets>
         </outputmode>
 
@@ -187,6 +191,8 @@
             <facet name="sinfo_facet_flow_depth_historical" description="flow depth historical" />
 
             <facet name="longitudinal_section.annotations" description="facet.longitudinal_section.annotations" />
+            
+            <facet name="sinfo_flow_depth_development.manualpoints" description="Manual Points" />            
           </facets>
         </outputmode>
 
@@ -196,6 +202,8 @@
             <facet name="sinfo_facet_flow_depth_development_per_year" description="flow depth development per year" />
 
             <facet name="longitudinal_section.annotations" description="facet.longitudinal_section.annotations" />
+            
+            <facet name="sinfo_flow_depth_development_peryear.manualpoints" description="Manual Points" />            
           </facets>
         </outputmode>
 
@@ -214,9 +222,6 @@
       </outputmodes>
     </state>
 
-
-
-
     <!-- Calculation Mode: Grundberührungen -->
 
     <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition">
@@ -248,8 +253,6 @@
       <condition data="ye_select" value="state.sinfo.epoch" operator="equal" />
     </transition>
 
-
-
     <state id="state.sinfo.load.year" description="state.sinfo.load.year" state="org.dive4elements.river.artifacts.sinfo.collision.LoadMultipleYearSelectState" helpText="help.state.sinfo.load.year">
       <data name="years" type="String" /> 
     </state>
@@ -258,7 +261,6 @@
       <data name="epochs" type="String" />
     </state>
 
-
     <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition">
       <from state="state.sinfo.load.year" />
       <to state="state.sinfo.collision" />
@@ -271,13 +273,11 @@
       <condition data="calculation_mode" value="sinfo_calc_collision" operator="equal" />
     </transition>
 
-
     <state id="state.sinfo.collision" description="state.sinfo.collision" state="org.dive4elements.river.artifacts.sinfo.collision.CollisionState" helpText="help.state.sinfo.collision">
       <outputmodes>
-        <outputmode name="collision" description="output.collision" mime-type="image/png" type="chart">
+        <outputmode name="sinfo_collision" description="output.sinfo_collision" mime-type="image/png" type="chart">
           <facets>
-            <!-- REMARK: id's that ends with 'filtered' are handled differently
-              ' -->
+          <!-- 
             <facet name="sinfo_facet_flow_depth.filtered" description="flow depth, filtered by current zoom state" />
             <facet name="sinfo_facet_flow_depth" description="flow depth" />
 
@@ -287,27 +287,25 @@
             <facet name="sinfo_facet_tkh" description="Facet for tkh" />
 
             <facet name="longitudinal_section.annotations" description="facet.longitudinal_section.annotations" />
+           -->
           </facets>
         </outputmode>
 
-        <outputmode name="sinfo_flowdepth_export" description="output.sinfo_flowdepth_export" mime-type="text/plain" type="export">
+        <outputmode name="sinfo_collision_export" description="output.sinfo_collision_export" mime-type="text/plain" type="export">
           <facets>
-            <facet name="csv" description="facet.sinfo_flowdepth_export.csv" />
-            <facet name="pdf" description="facet.sinfo_flowdepth_export.pdf" />
+            <facet name="csv" description="facet.sinfo_collision_export.csv" />
+            <facet name="pdf" description="facet.sinfo_collision_export.pdf" />
           </facets>
         </outputmode>
 
-        <outputmode name="sinfo_flowdepth_report" description="output.sinfo_flowdepth_report" mime-type="text/xml" type="report">
+        <outputmode name="sinfo_collision_report" description="output.sinfo_collision_report" mime-type="text/xml" type="report">
           <facets>
-            <facet name="report" description="facet.sinfo_flowdepth_report" />
+            <facet name="report" description="facet.sinfo_collision_report" />
           </facets>
         </outputmode>
       </outputmodes>
     </state>
 
-
-
-
     <!-- Calculation Mode: Überflutungsdauern Infrastrukturen BWaStr -->
     <!-- Schrittweite benötigt für wq-state: TODO: vermutlich hier auch nicht? -->
     <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition">
@@ -342,7 +340,6 @@
       <condition data="calculation_mode" value="sinfo_calc_flood_duration" operator="equal" />
     </transition>
 
-
     <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition">
       <from state="state.sinfo.wspl" />
       <to state="state.sinfo.wq" />
@@ -361,14 +358,11 @@
       <condition data="calculation_mode" value="sinfo_calc_flood_duration" operator="equal" />
     </transition>
 
-
-
     <state id="state.sinfo.flood_duration" description="state.sinfo.flood_duration" state="org.dive4elements.river.artifacts.sinfo.flood_duration.FloodDurationState" helpText="help.state.sinfo.flood_duration">
       <outputmodes>
-        <outputmode name="flood" description="output.flood" mime-type="image/png" type="chart">
+        <outputmode name="sinfo_flood_duration" description="output.sinfo_flood_duration" mime-type="image/png" type="chart">
           <facets>
-            <!-- REMARK: id's that ends with 'filtered' are handled differently
-              ' -->
+<!-- 
             <facet name="sinfo_facet_flow_depth.filtered" description="flow depth, filtered by current zoom state" />
             <facet name="sinfo_facet_flow_depth" description="flow depth" />
 
@@ -378,32 +372,25 @@
             <facet name="sinfo_facet_tkh" description="Facet for tkh" />
 
             <facet name="longitudinal_section.annotations" description="facet.longitudinal_section.annotations" />
+ -->
           </facets>
         </outputmode>
 
-        <outputmode name="sinfo_flowdepth_export" description="output.sinfo_flowdepth_export" mime-type="text/plain" type="export">
+        <outputmode name="sinfo_flood_duration_export" description="output.sinfo_flood_duration_export" mime-type="text/plain" type="export">
           <facets>
-            <facet name="csv" description="facet.sinfo_flowdepth_export.csv" />
-            <facet name="pdf" description="facet.sinfo_flowdepth_export.pdf" />
+            <facet name="csv" description="facet.sinfo_flood_duration_export.csv" />
+            <facet name="pdf" description="facet.sinfo_flood_duration_export.pdf" />
           </facets>
         </outputmode>
 
-        <outputmode name="sinfo_flowdepth_report" description="output.sinfo_flowdepth_report" mime-type="text/xml" type="report">
+        <outputmode name="sinfo_flood_duration_report" description="output.sinfo_flood_duration_report" mime-type="text/xml" type="report">
           <facets>
-            <facet name="report" description="facet.sinfo_flowdepth_report" />
+            <facet name="report" description="facet.sinfo_flood_duration_report" />
           </facets>
         </outputmode>
       </outputmodes>
     </state>
 
-
-
-
-
-
-
-
-
     <!-- Calculation Mode: Transportkörperhöhen -->
     <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition">
       <from state="state.sinfo.calculation_mode" />
@@ -444,6 +431,8 @@
 
             <facet name="longitudinal_section.annotations" description="facet.longitudinal_section.annotations" />
 
+            <facet name="sinfo_tkk.manualpoints" description="Manual Points" />
+
             <facet name="sinfo_facet_flow_depth.filtered" description="mean flow depth" />
             <facet name="sinfo_facet_flow_depth" description="mean flow depth" />
 
--- a/artifacts/doc/conf/generators/longitudinal-diagrams.xml	Thu Jun 07 11:41:10 2018 +0200
+++ b/artifacts/doc/conf/generators/longitudinal-diagrams.xml	Thu Jun 07 17:49:45 2018 +0200
@@ -95,7 +95,7 @@
         <title key="sinfo.chart.flow_depth.section.title" default="h-Längsschnitt (DEFAULT)"/>
         &longitudinal-defaults;
         <processor class="org.dive4elements.river.exports.process.ManualPointsProcessor"
-            axis="FlowDepth"/>
+            axis="flowdepthAxis"/>
         <subtitle key="chart.w_differences.subtitle" default="-">
             <arg expr="artifact.river"/>
         </subtitle>
@@ -108,7 +108,7 @@
         <title key="sinfo.chart.flow_depth_minmax.section.title" default="min/max h-Längsschnitt (DEFAULT)"/>
         &longitudinal-defaults;
         <processor class="org.dive4elements.river.exports.process.ManualPointsProcessor"
-            axis="FlowDepth"/>
+            axis="flowdepthAxis"/>
         <subtitle key="chart.w_differences.subtitle" default="-">
             <arg expr="artifact.river"/>
         </subtitle>
@@ -121,7 +121,7 @@
         <title key="sinfo.chart.tkh.section.title" default="Transportkörperhöhen (DEFAULT)"/>
         &longitudinal-defaults;
         <processor class="org.dive4elements.river.exports.process.ManualPointsProcessor"
-            axis="FlowDepth"/>
+            axis="tkhAxis"/>
         <subtitle key="chart.w_differences.subtitle" default="-">
             <arg expr="artifact.river"/>
         </subtitle>
@@ -134,7 +134,7 @@
         <title key="sinfo.chart.flow_depth_development.section.title" default="Fließtiefenentwicklung (DEFAULT)"/>
         &longitudinal-defaults;
         <processor class="org.dive4elements.river.exports.process.ManualPointsProcessor"
-            axis="FlowDepth"/>
+            axis="flowdepthDevelopmentAxis"/>
         <subtitle key="chart.w_differences.subtitle" default="-">
             <arg expr="artifact.river"/>
         </subtitle>
@@ -147,7 +147,7 @@
         <title key="sinfo.chart.flow_depth_development_perYear.section.title" default="Fließtiefenentwicklung pro Jahr (DEFAULT)"/>
         &longitudinal-defaults;
         <processor class="org.dive4elements.river.exports.process.ManualPointsProcessor"
-            axis="FlowDepth"/>
+            axis="flowdepthDevelopmentPerYearAxis"/>
         <subtitle key="chart.w_differences.subtitle" default="-">
             <arg expr="artifact.river"/>
         </subtitle>
--- a/artifacts/doc/conf/themes.xml	Thu Jun 07 11:41:10 2018 +0200
+++ b/artifacts/doc/conf/themes.xml	Thu Jun 07 17:49:45 2018 +0200
@@ -450,5 +450,11 @@
         <mapping from="sinfo_facet_infrastructure_height" to="SInfoInfrastructureHeight" />
         <mapping from="sinfo_facet_collision_count" to="SInfoCollisionCount" />
         <mapping from="sinfo_facet_collision_gaugew" to="SInfoCollisionGaugeW" />
+        
+        <mapping from="sinfo_flow_depth.manualpoints" to="ManualPoints" />
+        <mapping from="sinfo_flow_depth_minmax.manualpoints" to="ManualPoints" />
+        <mapping from="sinfo_flow_depth_development.manualpoints" to="ManualPoints" />
+        <mapping from="sinfo_flow_depth_development_peryear.manualpoints" to="ManualPoints" />
+        <mapping from="sinfo_tkk" to="ManualPoints" />
     </mappings>
 </themes>
\ No newline at end of file
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/FacetTypes.java	Thu Jun 07 11:41:10 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/FacetTypes.java	Thu Jun 07 17:49:45 2018 +0200
@@ -153,7 +153,7 @@
 
             return false;
         }
-    };
+    }
 
     /** Available diagram/chart-types.  This enum is evaluated at certain
      * places to iterate over chart-types to e.g. dynamically generate
@@ -188,9 +188,14 @@
         SQE("sq_relation_e"),
         SQF("sq_relation_f"),
         HD("historical_discharge"),
-        HDWQ("historical_discharge_wq");
-        // FIXME: do we need this? and why?
-    	// SFD("sinfo_flow_depth");
+        HDWQ("historical_discharge_wq"),
+        SFD("sinfo_flow_depth"),
+        SFDMM("sinfo_flow_depth_minmax"),
+        SFDD("sinfo_flow_depth_development"),
+        SFDDPY("sinfo_flow_depth_development_peryear"),
+        SC("sinfo_collision"),
+        SFDUR("sinfo_flood_duration"),
+        STKH("sinfo_tkk");
 
         private String chartTypeString;
 
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/chart/ManualPointsEditor.java	Thu Jun 07 11:41:10 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/chart/ManualPointsEditor.java	Thu Jun 07 17:49:45 2018 +0200
@@ -200,6 +200,9 @@
                         (StringProperty)pg.getPropertyByName("label");
                     xAxis = name.getValue();
                 }
+                // FIXME: this always selects the first axis not named 'X' regardless of on what axis the manual points sit.
+                // Actually we do not have the information about the manual points axis
+                // One solution might be to add that axis as extra info into the chart settings: but would be a very special case
                 else if (yAxis.equals("Y")) {
                     StringProperty name =
                         (StringProperty)pg.getPropertyByName("label");

http://dive4elements.wald.intevation.org