diff artifacts/src/main/java/org/dive4elements/river/exports/process/WOutProcessor.java @ 8860:28df64078f27

Merge with 0862ea5d66baf60e7eee496d130a35157cc9ec12
author gernotbelger
date Fri, 19 Jan 2018 11:23:42 +0100
parents 5e38e2924c07
children 1cc7653ca84f 0a5239a1e46e
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/WOutProcessor.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/WOutProcessor.java	Fri Jan 19 11:23:42 2018 +0100
@@ -53,13 +53,17 @@
         CallContext context = generator.getCallContext();
         Object data = bundle.getData(context);
 
-        XYSeries series = new StyledXYSeries(bundle.getFacetDescription(), theme);
+        XYSeries series = new StyledXYSeries(
+            bundle.getFacetDescription(), theme);
 
         // Handle non WKms data.
-        if (bundle.getFacetName().equals(FacetTypes.FLOW_VELOCITY_WATERLEVEL)) {
+        if (
+            bundle.getFacetName().equals(FacetTypes.FLOW_VELOCITY_WATERLEVEL)
+        ) {
             FastFlowVelocityMeasurementValue fData =
                 (FastFlowVelocityMeasurementValue) data;
-            double[][] points = new double[][] {{fData.getStation()},{fData.getW()}};
+            double[][] points = new double[][] {
+                {fData.getStation()},{fData.getW()}};
             StyledSeriesBuilder.addPoints(series, points, true);
             generator.addAxisSeries(series, axisName, visible);
             return;
@@ -68,7 +72,9 @@
         // Handle WKms data.
         WKms wkms = (WKms) data;
 
-        if (bundle.getFacetName().equals(FacetTypes.DISCHARGE_LONGITUDINAL_C)) {
+        if (
+            bundle.getFacetName().equals(FacetTypes.DISCHARGE_LONGITUDINAL_C)
+        ) {
             // Add corrected values
             WQCKms wqckms = (WQCKms) data;
             int size = wqckms.size();
@@ -90,17 +96,21 @@
             StyledSeriesBuilder.addUpperBand(seriesUp, wkms, bandWidth);
             StyledSeriesBuilder.addLowerBand(seriesDown, wkms, bandWidth);
 
-            StyledAreaSeriesCollection area = new StyledAreaSeriesCollection(theme);
+            StyledAreaSeriesCollection area =
+                new StyledAreaSeriesCollection(theme);
             area.addSeries(seriesUp);
             area.addSeries(seriesDown);
             area.setMode(StyledAreaSeriesCollection.FILL_MODE.BETWEEN);
             generator.addAreaSeries(area, axisName, visible);
         }
 
-        if (bundle.getFacetName().equals(FacetTypes.LONGITUDINAL_W) ||
-            bundle.getFacetName().equals(FacetTypes.DISCHARGE_LONGITUDINAL_W) ||
-            bundle.getFacetName().equals(FacetTypes.STATIC_WQKMS_W) ||
-            bundle.getFacetName().equals(FacetTypes.DISCHARGE_LONGITUDINAL_C)) {
+        if (bundle.getFacetName().equals(FacetTypes.LONGITUDINAL_W)
+            || bundle.getFacetName().equals(
+                FacetTypes.DISCHARGE_LONGITUDINAL_W)
+            || bundle.getFacetName().equals(
+                FacetTypes.STATIC_WQKMS_W)
+            || bundle.getFacetName().equals(
+                FacetTypes.DISCHARGE_LONGITUDINAL_C)) {
             /* Only use W values to check if the diagram should be inverted
              * see flys/issue1290 for details */
             log.debug("Check for RTL data: "+ wkms.guessRTLData());
@@ -120,7 +130,8 @@
 
         CallContext context = generator.getCallContext();
 
-        XYSeries series = new StyledXYSeries(bundle.getFacetDescription(), theme);
+        XYSeries series = new StyledXYSeries(
+            bundle.getFacetDescription(), theme);
 
         WKms wkms = (WKms) bundle.getData(context);
 
@@ -137,16 +148,19 @@
             StyledSeriesBuilder.addUpperBand(seriesUp, wkms, bandWidth);
             StyledSeriesBuilder.addLowerBand(seriesDown, wkms, bandWidth);
 
-            StyledAreaSeriesCollection area = new StyledAreaSeriesCollection(theme);
+            StyledAreaSeriesCollection area =
+                new StyledAreaSeriesCollection(theme);
             area.addSeries(seriesUp);
             area.addSeries(seriesDown);
             area.setMode(StyledAreaSeriesCollection.FILL_MODE.BETWEEN);
             generator.addAreaSeries(area, index, visible);
         }
 
-        if (bundle.getFacetName().equals(FacetTypes.LONGITUDINAL_W) ||
-            bundle.getFacetName().equals(FacetTypes.DISCHARGE_LONGITUDINAL_W) ||
-            bundle.getFacetName().equals(FacetTypes.STATIC_WQKMS_W)) {
+        if (bundle.getFacetName().equals(FacetTypes.LONGITUDINAL_W)
+            || bundle.getFacetName().equals(
+                FacetTypes.DISCHARGE_LONGITUDINAL_W)
+            || bundle.getFacetName().equals(
+                FacetTypes.STATIC_WQKMS_W)) {
             /* Only use W values to check if the diagram should be inverted
              * see flys/issue1290 for details */
             generator.setInverted(wkms.guessRTLData());

http://dive4elements.wald.intevation.org