[PATCH 2 of 2] S-Info flood duration theme rename, and more infrastructure themes in the duration curve

Wald Commits scm-commit at wald.intevation.org
Fri Aug 3 17:02:55 CEST 2018


# HG changeset patch
# User mschaefer
# Date 1533308558 -7200
# Node ID f318359b81a26fd8a245c3c9c11b4a2dd2619806
# Parent  a0a2e68a1e1142d121fb0c0bdb84427247bedbc9
S-Info flood duration theme rename, and more infrastructure themes in the duration curve

diff -r a0a2e68a1e11 -r f318359b81a2 artifacts/doc/conf/artifacts/sinfo.xml
--- a/artifacts/doc/conf/artifacts/sinfo.xml	Fri Aug 03 17:00:45 2018 +0200
+++ b/artifacts/doc/conf/artifacts/sinfo.xml	Fri Aug 03 17:02:38 2018 +0200
@@ -380,7 +380,10 @@
           <facets>
             <facet name="duration_curve.w" description="facet.duration_curve.w"/>
             <facet name="duration_curve.q" description="facet.duration_curve.q"/>
-            <facet name="infrastructure.wq" description="w and q of the infrastructure"/>
+            <facet name="infrastructure.w.left" description="w of the left bank infrastructure"/>
+            <facet name="infrastructure.w.right" description="w of the right bank infrastructure"/>
+            <facet name="infrastructure.q.left" description="q of the left bank infrastructure"/>
+            <facet name="infrastructure.q.right" description="q of the right bank infrastructure"/>
             <facet name="sinfo.mainvalues.w" description="W Main Values"/>
             <facet name="sinfo.mainvalues.q" description="Q Main Values at optional second axis"/>
 
diff -r a0a2e68a1e11 -r f318359b81a2 artifacts/doc/conf/themes.xml
--- a/artifacts/doc/conf/themes.xml	Fri Aug 03 17:00:45 2018 +0200
+++ b/artifacts/doc/conf/themes.xml	Fri Aug 03 17:02:38 2018 +0200
@@ -452,7 +452,10 @@
         <mapping from="mainvalue.w" to="SInfoMainValues" />
         <mapping from="sinfo.mainvalues.q" to="SInfoMainValuesQ" />
         <mapping from="sinfo.mainvalues.w" to="SInfoMainValuesW" />
-        <mapping from="infrastructure.wq" to="InfrastructureWQ" />
+        <mapping from="infrastructure.w.left" to="InfrastructureWLeft" />
+        <mapping from="infrastructure.w.right" to="InfrastructureWRight" />
+        <mapping from="infrastructure.q.left" to="InfrastructureQLeft" />
+        <mapping from="infrastructure.q.right" to="InfrastructureQRight" />
         
         <mapping from="sinfo_facet_predefined_channel_width" to="SInfoPredefinedChannelWidth" />
         <mapping from="sinfo_facet_predefined_channel_depth" to="SInfoPredefinedChannelDepth" />
diff -r a0a2e68a1e11 -r f318359b81a2 artifacts/doc/conf/themes/default.xml
--- a/artifacts/doc/conf/themes/default.xml	Fri Aug 03 17:00:45 2018 +0200
+++ b/artifacts/doc/conf/themes/default.xml	Fri Aug 03 17:02:38 2018 +0200
@@ -2883,7 +2883,7 @@
   <theme name="SInfoMainValuesQ">
     <inherits>
       <inherit from="Lines" />
-      <inherit from="Label" />      
+      <inherit from="Label" />
     </inherits>
     <fields>
       <field name="linecolor" type="Color" display="Farbe" default="51, 204, 0" />
@@ -2894,7 +2894,7 @@
   <theme name="SInfoMainValuesW">
     <inherits>
       <inherit from="Lines" />
-      <inherit from="Label" />      
+      <inherit from="Label" />
     </inherits>
     <fields>
       <field name="linecolor" type="Color" display="Farbe" default="0, 102, 204" />
@@ -2902,13 +2902,46 @@
       <field name="showlinelabel" type="boolean" display="Linienbeschriftung anzeigen" default="true" />
     </fields>
   </theme>
-  <theme name="InfrastructureWQ">
+  <theme name="InfrastructureWLeft">
     <inherits>
       <inherit from="Lines" />
-      <inherit from="Label" />      
+      <inherit from="Label" />
     </inherits>
     <fields>
-      <field name="linecolor" type="Color" display="Farbe" default="144, 48, 96" />
+      <field name="linecolor" type="Color" display="Farbe" default="68, 216, 40" />
+      <field name="textorientation" type="boolean" display="Textausrichtung" default="true" />
+      <field name="showlinelabel" type="boolean" display="Linienbeschriftung anzeigen" default="true" />
+    </fields>
+  </theme>
+  <theme name="InfrastructureWRight">
+    <inherits>
+      <inherit from="Lines" />
+      <inherit from="Label" />
+    </inherits>
+    <fields>
+      <field name="linecolor" type="Color" display="Farbe" default="192, 0, 0" />
+      <field name="textorientation" type="boolean" display="Textausrichtung" default="true" />
+      <field name="showlinelabel" type="boolean" display="Linienbeschriftung anzeigen" default="true" />
+    </fields>
+  </theme>
+  <theme name="InfrastructureQLeft">
+    <inherits>
+      <inherit from="Lines" />
+      <inherit from="Label" />
+    </inherits>
+    <fields>
+      <field name="linecolor" type="Color" display="Farbe" default="68, 216, 40" />
+      <field name="textorientation" type="boolean" display="Textausrichtung" default="true" />
+      <field name="showlinelabel" type="boolean" display="Linienbeschriftung anzeigen" default="true" />
+    </fields>
+  </theme>
+  <theme name="InfrastructureQRight">
+    <inherits>
+      <inherit from="Lines" />
+      <inherit from="Label" />
+    </inherits>
+    <fields>
+      <field name="linecolor" type="Color" display="Farbe" default="192, 0, 0" />
       <field name="textorientation" type="boolean" display="Textausrichtung" default="true" />
       <field name="showlinelabel" type="boolean" display="Linienbeschriftung anzeigen" default="true" />
     </fields>
diff -r a0a2e68a1e11 -r f318359b81a2 artifacts/doc/conf/themes/second.xml
--- a/artifacts/doc/conf/themes/second.xml	Fri Aug 03 17:00:45 2018 +0200
+++ b/artifacts/doc/conf/themes/second.xml	Fri Aug 03 17:02:38 2018 +0200
@@ -2871,7 +2871,7 @@
   <theme name="SInfoMainValuesQ">
     <inherits>
       <inherit from="Lines" />
-      <inherit from="Label" />      
+      <inherit from="Label" />
     </inherits>
     <fields>
       <field name="linecolor" type="Color" display="Farbe" default="51, 204, 0" />
@@ -2882,7 +2882,7 @@
   <theme name="SInfoMainValuesW">
     <inherits>
       <inherit from="Lines" />
-      <inherit from="Label" />      
+      <inherit from="Label" />
     </inherits>
     <fields>
       <field name="linecolor" type="Color" display="Farbe" default="0, 102, 204" />
@@ -2890,13 +2890,46 @@
       <field name="showlinelabel" type="boolean" display="Linienbeschriftung anzeigen" default="true" />
     </fields>
   </theme>
-  <theme name="InfrastructureWQ">
+  <theme name="InfrastructureWLeft">
     <inherits>
       <inherit from="Lines" />
-      <inherit from="Label" />      
+      <inherit from="Label" />
     </inherits>
     <fields>
-      <field name="linecolor" type="Color" display="Farbe" default="144, 48, 96" />
+      <field name="linecolor" type="Color" display="Farbe" default="68, 216, 40" />
+      <field name="textorientation" type="boolean" display="Textausrichtung" default="true" />
+      <field name="showlinelabel" type="boolean" display="Linienbeschriftung anzeigen" default="true" />
+    </fields>
+  </theme>
+  <theme name="InfrastructureWRight">
+    <inherits>
+      <inherit from="Lines" />
+      <inherit from="Label" />
+    </inherits>
+    <fields>
+      <field name="linecolor" type="Color" display="Farbe" default="192, 0, 0" />
+      <field name="textorientation" type="boolean" display="Textausrichtung" default="true" />
+      <field name="showlinelabel" type="boolean" display="Linienbeschriftung anzeigen" default="true" />
+    </fields>
+  </theme>
+  <theme name="InfrastructureQLeft">
+    <inherits>
+      <inherit from="Lines" />
+      <inherit from="Label" />
+    </inherits>
+    <fields>
+      <field name="linecolor" type="Color" display="Farbe" default="68, 216, 40" />
+      <field name="textorientation" type="boolean" display="Textausrichtung" default="true" />
+      <field name="showlinelabel" type="boolean" display="Linienbeschriftung anzeigen" default="true" />
+    </fields>
+  </theme>
+  <theme name="InfrastructureQRight">
+    <inherits>
+      <inherit from="Lines" />
+      <inherit from="Label" />
+    </inherits>
+    <fields>
+      <field name="linecolor" type="Color" display="Farbe" default="192, 0, 0" />
       <field name="textorientation" type="boolean" display="Textausrichtung" default="true" />
       <field name="showlinelabel" type="boolean" display="Linienbeschriftung anzeigen" default="true" />
     </fields>
diff -r a0a2e68a1e11 -r f318359b81a2 artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculation.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculation.java	Fri Aug 03 17:00:45 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculation.java	Fri Aug 03 17:02:38 2018 +0200
@@ -25,6 +25,7 @@
 import org.dive4elements.river.artifacts.sinfo.util.CalculationUtils;
 import org.dive4elements.river.artifacts.sinfo.util.RiverInfo;
 import org.dive4elements.river.jfree.StickyAxisAnnotation;
+import org.dive4elements.river.model.Attribute.AttributeKey;
 import org.dive4elements.river.model.River;
 
 /**
@@ -107,12 +108,13 @@
     /**
      * Calculates the annotations of the infrastructure(s) of a station for a flood duration calculation
      */
-    public List<StickyAxisAnnotation> calcInfrastructureAnnotations(final double station, final FloodDurationCalculationResult result) {
+    public List<StickyAxisAnnotation> calcInfrastructureAnnotations(final double station, final AttributeKey riverside, final boolean isW,
+            final FloodDurationCalculationResult result) {
 
         final Calculation problems = new Calculation();
 
         final FloodDurationCalculator calculator = new FloodDurationCalculator(this.context, null);
-        return calculator.calcInfrastructureAnnotations(problems, station, result);
+        return calculator.calcInfrastructureAnnotations(problems, station, riverside, isW, result);
     }
 
     /**
diff -r a0a2e68a1e11 -r f318359b81a2 artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculator.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculator.java	Fri Aug 03 17:00:45 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculator.java	Fri Aug 03 17:02:38 2018 +0200
@@ -166,7 +166,7 @@
                 break;
             }
         }
-        final List<ResultRow> stationRows = searchStation(station1, result.getAllRows());
+        final List<ResultRow> stationRows = searchStation(station1, AttributeKey.NONE, result.getAllRows());
         if (stationRows.isEmpty()) {
             return new ArrayList<>();
         }
@@ -196,7 +196,7 @@
                 break;
             }
         }
-        final List<ResultRow> stationRows = searchStation(station1, result.getAllRows());
+        final List<ResultRow> stationRows = searchStation(station1, AttributeKey.NONE, result.getAllRows());
         if (stationRows.isEmpty()) {
             return new ArrayList<>();
         }
@@ -217,26 +217,30 @@
      * Calculate the data for the W and Q lines in the duration curve chart for the infrastructure height and add to result
      * collection
      */
-    public List<StickyAxisAnnotation> calcInfrastructureAnnotations(final Calculation problems, final double station,
-            final FloodDurationCalculationResult result) {
+    public List<StickyAxisAnnotation> calcInfrastructureAnnotations(final Calculation problems, final double station, final AttributeKey riverside,
+            final boolean isW, final FloodDurationCalculationResult result) {
 
         // Search the station in the previously calculated result rows and terminate if no infrastructure row found
         double station1 = station;
         if (Double.isNaN(station)) {
             for (final ResultRow row : result.getRows()) {
-                station1 = row.getDoubleValue(GeneralResultType.station);
-                break;
+                if (row.getValue(SInfoResultType.riverside) == riverside) {
+                    station1 = row.getDoubleValue(GeneralResultType.station);
+                    break;
+                }
             }
         }
-        final List<ResultRow> stationRows = searchStation(station1, result.getRows());
+        final List<ResultRow> stationRows = searchStation(station1, riverside, result.getRows());
         if (stationRows.isEmpty() || (stationRows.get(0).getValue(SInfoResultType.infrastructuretype) == null)) {
             return new ArrayList<>();
         }
         // Same way as in MainValueWFacet and ..QFacet
         final List<StickyAxisAnnotation> annotations = new ArrayList<>();
         for (final ResultRow row : stationRows) {
-            annotations.add(calcInfrastructureWAnnotation(row));
-            annotations.add(calcInfrastructureQAnnotation(row));
+            if (isW)
+                annotations.add(calcInfrastructureWAnnotation(row));
+            else
+                annotations.add(calcInfrastructureQAnnotation(row));
         }
         return annotations;
     }
@@ -244,12 +248,13 @@
     /**
      * Searches the one or two rows of a station in a result rows collection
      */
-    private List<ResultRow> searchStation(final double station, final Collection<ResultRow> rows) {
+    private List<ResultRow> searchStation(final double station, final AttributeKey riverside, final Collection<ResultRow> rows) {
         final List<ResultRow> found = new ArrayList<>();
         for (final ResultRow row : rows) {
             if (row.getDoubleValue(GeneralResultType.station) > station + 0.0001)
                 break;
-            else if (row.getDoubleValue(GeneralResultType.station) > station - 0.0001)
+            else if ((row.getDoubleValue(GeneralResultType.station) > station - 0.0001)
+                    && ((riverside == AttributeKey.NONE) || (row.getValue(SInfoResultType.riverside) == riverside)))
                 found.add(row);
         }
         return found;
diff -r a0a2e68a1e11 -r f318359b81a2 artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCurveGenerator.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCurveGenerator.java	Fri Aug 03 17:00:45 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCurveGenerator.java	Fri Aug 03 17:02:38 2018 +0200
@@ -170,7 +170,8 @@
         } else if (name.equals(FloodDurationCurveProcessor.FACET_FLOOD_DURATION_MAINVALUES_Q)
                 || name.equals(FloodDurationCurveProcessor.FACET_FLOOD_DURATION_MAINVALUES_W)) {
             doAnnotations((RiverAnnotation) artifactFacet.getData(context), artifactFacet, attr, visible);
-        } else if (name.equals(FloodDurationCurveProcessor.FACET_FLOOD_DURATION_INFRASTRUCTURE) && (artifactFacet.getData(context) != null)) {
+        }
+        else if (FloodDurationCurveProcessor.isInfrastructureFacet(name) && (artifactFacet.getData(context) != null)) {
             doAnnotations((RiverAnnotation) artifactFacet.getData(context), artifactFacet, attr, visible);
         }
         // else if (name.equals(RELATIVE_POINT)) {
diff -r a0a2e68a1e11 -r f318359b81a2 artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCurveProcessor.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCurveProcessor.java	Fri Aug 03 17:00:45 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCurveProcessor.java	Fri Aug 03 17:02:38 2018 +0200
@@ -20,6 +20,7 @@
 import org.dive4elements.river.exports.DiagramGenerator;
 import org.dive4elements.river.exports.DurationCurveGenerator;
 import org.dive4elements.river.exports.process.DefaultProcessor;
+import org.dive4elements.river.model.Attribute.AttributeKey;
 
 /**
  * Processor to generate the facet and data series of a flood duration curve
@@ -37,7 +38,13 @@
 
     public static final String FACET_FLOOD_DURATION_MAINVALUES_Q = "sinfo.mainvalues.q";
 
-    public static final String FACET_FLOOD_DURATION_INFRASTRUCTURE = "infrastructure.wq";
+    public static final String FACET_FLOOD_DURATION_INFRASTRUCTURE_W_LEFT = "infrastructure.w.left";
+
+    public static final String FACET_FLOOD_DURATION_INFRASTRUCTURE_W_RIGHT = "infrastructure.w.right";
+
+    public static final String FACET_FLOOD_DURATION_INFRASTRUCTURE_Q_LEFT = "infrastructure.q.left";
+
+    public static final String FACET_FLOOD_DURATION_INFRASTRUCTURE_Q_RIGHT = "infrastructure.q.right";
 
     private static final Set<String> HANDLED_FACET_TYPES = new HashSet<>();
 
@@ -46,7 +53,15 @@
         HANDLED_FACET_TYPES.add(FACET_FLOOD_DURATION_Q);
         HANDLED_FACET_TYPES.add(FACET_FLOOD_DURATION_MAINVALUES_W);
         HANDLED_FACET_TYPES.add(FACET_FLOOD_DURATION_MAINVALUES_Q);
-        HANDLED_FACET_TYPES.add(FACET_FLOOD_DURATION_INFRASTRUCTURE);
+        HANDLED_FACET_TYPES.add(FACET_FLOOD_DURATION_INFRASTRUCTURE_W_LEFT);
+        HANDLED_FACET_TYPES.add(FACET_FLOOD_DURATION_INFRASTRUCTURE_W_RIGHT);
+        HANDLED_FACET_TYPES.add(FACET_FLOOD_DURATION_INFRASTRUCTURE_Q_LEFT);
+        HANDLED_FACET_TYPES.add(FACET_FLOOD_DURATION_INFRASTRUCTURE_Q_RIGHT);
+    }
+
+    public static boolean isInfrastructureFacet(final String name) {
+        return name.equals(FACET_FLOOD_DURATION_INFRASTRUCTURE_W_LEFT) || name.equals(FACET_FLOOD_DURATION_INFRASTRUCTURE_W_RIGHT)
+                || name.equals(FACET_FLOOD_DURATION_INFRASTRUCTURE_Q_LEFT) || name.equals(FACET_FLOOD_DURATION_INFRASTRUCTURE_Q_RIGHT);
     }
 
     public static Facet createFloodDurationWCurveFacet(final CallContext context, final String hash, final String id, final AbstractCalculationResult result,
@@ -73,10 +88,21 @@
         return new FloodDurationMainValuesQFacet(FACET_FLOOD_DURATION_MAINVALUES_Q, description);
     }
 
-    public static Facet createInfrastructureWFacet(final CallContext context, final String hash, final String id, final AbstractCalculationResult result,
-            final int facetIndex, final int resultIndex, final String description) {
+    public static Facet createInfrastructureFacet(final CallContext context, final String hash, final String id, final AbstractCalculationResult result,
+            final int facetIndex, final int resultIndex, final String description, final AttributeKey riverside, final boolean isW) {
 
-        return new FloodDurationInfrastructureFacet(FACET_FLOOD_DURATION_INFRASTRUCTURE, description);
+        if (riverside == AttributeKey.LEFT) {
+            if (isW)
+                return new FloodDurationInfrastructureFacet(FACET_FLOOD_DURATION_INFRASTRUCTURE_W_LEFT, description, riverside, isW);
+            else
+                return new FloodDurationInfrastructureFacet(FACET_FLOOD_DURATION_INFRASTRUCTURE_Q_LEFT, description, riverside, isW);
+        }
+        else {
+            if (isW)
+                return new FloodDurationInfrastructureFacet(FACET_FLOOD_DURATION_INFRASTRUCTURE_W_RIGHT, description, riverside, isW);
+            else
+                return new FloodDurationInfrastructureFacet(FACET_FLOOD_DURATION_INFRASTRUCTURE_Q_RIGHT, description, riverside, isW);
+        }
     }
 
     @Override
diff -r a0a2e68a1e11 -r f318359b81a2 artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationInfrastructureFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationInfrastructureFacet.java	Fri Aug 03 17:00:45 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationInfrastructureFacet.java	Fri Aug 03 17:02:38 2018 +0200
@@ -22,6 +22,7 @@
 import org.dive4elements.river.exports.fixings.FixChartGenerator;
 import org.dive4elements.river.jfree.RiverAnnotation;
 import org.dive4elements.river.jfree.StickyAxisAnnotation;
+import org.dive4elements.river.model.Attribute.AttributeKey;
 
 
 /**
@@ -32,11 +33,16 @@
     /** Own log. */
     private static Logger log = Logger.getLogger(FloodDurationInfrastructureFacet.class);
 
-    /** Trivial Constructor. */
-    public FloodDurationInfrastructureFacet(final String name, final String description) {
+    private final AttributeKey riverBankKey;
+
+    private final boolean isW;
+
+    public FloodDurationInfrastructureFacet(final String name, final String description, final AttributeKey riverside, final boolean isW) {
         this.description = description;
         this.name = name;
         this.index = 0;
+        this.riverBankKey = riverside;
+        this.isW = isW;
     }
 
 
@@ -57,7 +63,7 @@
         final double currentKm = FixChartGenerator.getCurrentKm(context);
 
         final List<StickyAxisAnnotation> annotations = new FloodDurationCalculation(context).calcInfrastructureAnnotations(currentKm,
-                data.getResults().get(this.index));
+                this.riverBankKey, this.isW, data.getResults().get(this.index));
 
         return new RiverAnnotation(this.description, annotations);
     }
@@ -69,7 +75,7 @@
      */
     @Override
     public FloodDurationInfrastructureFacet deepCopy() {
-        final FloodDurationInfrastructureFacet copy = new FloodDurationInfrastructureFacet(this.name, this.description);
+        final FloodDurationInfrastructureFacet copy = new FloodDurationInfrastructureFacet(this.name, this.description, this.riverBankKey, this.isW);
         copy.set(this);
         return copy;
     }
diff -r a0a2e68a1e11 -r f318359b81a2 artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationState.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationState.java	Fri Aug 03 17:00:45 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationState.java	Fri Aug 03 17:02:38 2018 +0200
@@ -27,6 +27,7 @@
 import org.dive4elements.river.artifacts.sinfo.SINFOArtifact;
 import org.dive4elements.river.artifacts.sinfo.flood_duration.RiversideRadioChoice.RiversideChoiceKey;
 import org.dive4elements.river.artifacts.states.DefaultState;
+import org.dive4elements.river.model.Attribute.AttributeKey;
 
 /**
  * Last state of the S-Info flood duration workflow that calculates and outputs the result
@@ -125,8 +126,18 @@
                 facets.add(FloodDurationCurveProcessor.createMainValuesQFacet(context, hash, this.id, result, 1, resultIndex,
                         Resources.getMsg(context.getMeta(), "sinfo.chart.flood_duration.curve.mainq")));
             }
-            facets.add(FloodDurationCurveProcessor.createInfrastructureWFacet(context, hash, this.id, result, 0, resultIndex,
-                    Resources.getMsg(context.getMeta(), "sinfo.chart.flood_duration.curve.facet.infrastructure")));
+            if ((access.getRiverside() == RiversideChoiceKey.LEFT) || (access.getRiverside() == RiversideChoiceKey.BOTH)) {
+                facets.add(FloodDurationCurveProcessor.createInfrastructureFacet(context, hash, this.id, result, 0, resultIndex,
+                        Resources.getMsg(context.getMeta(), "sinfo_facet_flood_duration_curve.infra.w.left.description"), AttributeKey.LEFT, true));
+                facets.add(FloodDurationCurveProcessor.createInfrastructureFacet(context, hash, this.id, result, 0, resultIndex,
+                        Resources.getMsg(context.getMeta(), "sinfo_facet_flood_duration_curve.infra.q.left.description"), AttributeKey.LEFT, false));
+            }
+            if ((access.getRiverside() == RiversideChoiceKey.RIGHT) || (access.getRiverside() == RiversideChoiceKey.BOTH)) {
+                facets.add(FloodDurationCurveProcessor.createInfrastructureFacet(context, hash, this.id, result, 0, resultIndex,
+                        Resources.getMsg(context.getMeta(), "sinfo_facet_flood_duration_curve.infra.w.right.description"), AttributeKey.RIGHT, true));
+                facets.add(FloodDurationCurveProcessor.createInfrastructureFacet(context, hash, this.id, result, 0, resultIndex,
+                        Resources.getMsg(context.getMeta(), "sinfo_facet_flood_duration_curve.infra.q.right.description"), AttributeKey.RIGHT, false));
+            }
 
             facets.add(new DataFacet(FacetTypes.CSV, "CSV data", ComputeType.ADVANCE, hash, this.id));
             facets.add(new DataFacet(FacetTypes.PDF, "PDF data", ComputeType.ADVANCE, hash, this.id));
diff -r a0a2e68a1e11 -r f318359b81a2 artifacts/src/main/resources/messages.properties
--- a/artifacts/src/main/resources/messages.properties	Fri Aug 03 17:00:45 2018 +0200
+++ b/artifacts/src/main/resources/messages.properties	Fri Aug 03 17:02:38 2018 +0200
@@ -1184,7 +1184,7 @@
 sinfo.chart.flood_duration.section.title = \u00dcberflutungsdauer Infrastrukturen BWaStr
 sinfo.chart.flood_duration.section.yaxis.label = \u00dcberflutungsdauer [d/a]
 sinfo_facet_flood_duration = \u00dcberflutungsdauern
-sinfo_facet_flood_duration.description = \u00dcberflutungsdauern ({0})
+sinfo_facet_flood_duration.description = \u00dcberflutungsdauern Infrastrukturen BWaStr ({0})
 gauge_duration.missing = Keine Dauerzahlen vorhanden am Pegel {0}
 gauge_discharge_table.missing = No discharge table available for gauge {0}
 gauge_main_values.missing = No named main values available for gauge {0}
@@ -1200,7 +1200,10 @@
 sinfo.chart.flood_duration.curve.mainw = W (ausgew\u00e4hlte WSPL)
 sinfo.chart.flood_duration.curve.mainq = Q (ausgew\u00e4hlte WSPL)
 sinfo.chart.flood_duration.curve.infrastructure = Infrastruktur ({0})
-sinfo.chart.flood_duration.curve.facet.infrastructure = Infrastruktur
+sinfo_facet_flood_duration_curve.infra.w.left.description = Infrastruktur links, W(\u00dcberflutung)
+sinfo_facet_flood_duration_curve.infra.w.right.description = Infrastruktur rechts, W(\u00dcberflutung)
+sinfo_facet_flood_duration_curve.infra.q.left.description = Infrastruktur links, Q(\u00dcberflutung)
+sinfo_facet_flood_duration_curve.infra.q.right.description = Infrastruktur rechts, Q(\u00dcberflutung)
 
 bundu_bezugswst = Bezugswasserst\u00e4nde
 bundu_analysis = Fixinganalysis
diff -r a0a2e68a1e11 -r f318359b81a2 artifacts/src/main/resources/messages_de.properties
--- a/artifacts/src/main/resources/messages_de.properties	Fri Aug 03 17:00:45 2018 +0200
+++ b/artifacts/src/main/resources/messages_de.properties	Fri Aug 03 17:02:38 2018 +0200
@@ -1184,7 +1184,7 @@
 sinfo.chart.flood_duration.section.title = \u00dcberflutungsdauer Infrastrukturen BWaStr
 sinfo.chart.flood_duration.section.yaxis.label = \u00dcberflutungsdauer [d/a]
 sinfo_facet_flood_duration = \u00dcberflutungsdauern
-sinfo_facet_flood_duration.description = \u00dcberflutungsdauern ({0})
+sinfo_facet_flood_duration.description = \u00dcberflutungsdauern Infrastrukturen BWaStr ({0})
 gauge_duration.missing = Dauerzahlen fehlen am Pegel {0}
 gauge_discharge_table.missing = Abflusstafel fehlt am Pegel {0}
 gauge_main_values.missing = Hauptwerte fehlen am Pegel {0}
@@ -1200,7 +1200,10 @@
 sinfo.chart.flood_duration.curve.mainw = W (ausgew\u00e4hlte WSPL)
 sinfo.chart.flood_duration.curve.mainq = Q (ausgew\u00e4hlte WSPL)
 sinfo.chart.flood_duration.curve.infrastructure = Infrastruktur ({0})
-sinfo.chart.flood_duration.curve.facet.infrastructure = Infrastruktur
+sinfo_facet_flood_duration_curve.infra.w.left.description = Infrastruktur links, W(\u00dcberflutung)
+sinfo_facet_flood_duration_curve.infra.w.right.description = Infrastruktur rechts, W(\u00dcberflutung)
+sinfo_facet_flood_duration_curve.infra.q.left.description = Infrastruktur links, Q(\u00dcberflutung)
+sinfo_facet_flood_duration_curve.infra.q.right.description = Infrastruktur rechts, Q(\u00dcberflutung)
 
 bundu_bezugswst = Bezugswasserst\u00e4nde
 bundu_analysis = Fixierungsanalyse


More information about the Dive4Elements-commits mailing list