diff artifacts/src/main/java/org/dive4elements/river/exports/process/FixWQProcessor.java @ 8856:5e38e2924c07 3.2.x

Fix code style.
author Tom Gottfried <tom@intevation.de>
date Thu, 18 Jan 2018 20:12:01 +0100
parents 07df414d5d88
children a805211690f7
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/FixWQProcessor.java	Thu Jan 18 20:10:59 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/FixWQProcessor.java	Thu Jan 18 20:12:01 2018 +0100
@@ -62,7 +62,8 @@
         // TODO: Simplify this processor and move general facets/data to
         // MiscDischargeProcessor or something...
         String facetType = bundle.getFacetName();
-        log.debug("facet: " + facetType + " name: " + bundle.getFacetDescription());
+        log.debug("facet: " + facetType
+            + " name: " + bundle.getFacetDescription());
         if(facetType.startsWith(FIX_SECTOR_AVERAGE_WQ)) {
             doSectorAverageOut(generator, bundle, theme, visible);
         }
@@ -101,7 +102,8 @@
         boolean visible
     ) {
         log.debug("doSectorAverageOut");
-        QWDDateRange qwdd = (QWDDateRange)bundle.getData(generator.getCallContext());
+        QWDDateRange qwdd = (QWDDateRange)bundle.getData(
+            generator.getCallContext());
         QWD qwd = qwdd != null ? qwdd.getQWD() : null;
 
         if(qwd != null) {
@@ -153,7 +155,7 @@
 
         // Force empty symbol.
         if (qwd.getInterpolated()) {
-            theme = new ThemeDocument(theme); // prevent potential side effects.
+            theme = new ThemeDocument(theme); // prevent potential side effects
             theme.setValue(ThemeDocument.USE_FILL_PAINT, "true");
         }
 
@@ -170,7 +172,8 @@
 
         if (visible && theme.parseShowPointLabel()) {
 
-            List<XYTextAnnotation> textAnnos = new ArrayList<XYTextAnnotation>();
+            List<XYTextAnnotation> textAnnos =
+                new ArrayList<XYTextAnnotation>();
 
             DateFormat dateFormat = DateFormat.getDateInstance(
                 DateFormat.SHORT);
@@ -180,7 +183,8 @@
                 qwd.getW());
             textAnnos.add(anno);
 
-            RiverAnnotation flysAnno = new RiverAnnotation(null, null, null, theme);
+            RiverAnnotation flysAnno =
+                new RiverAnnotation(null, null, null, theme);
             flysAnno.setTextAnnotations(textAnnos);
             generator.addAnnotations(flysAnno);
         }
@@ -196,13 +200,14 @@
 
         QWI qwd = (QWI)bundle.getData(generator.getCallContext());
         if (qwd == null) {
-            log.debug("doReferenceEventsOut: qwds == null in " + bundle.getFacetDescription());
+            log.debug("doReferenceEventsOut: qwds == null in "
+                + bundle.getFacetDescription());
             return;
         }
 
         // Force empty symbol.
         if (qwd.getInterpolated()) {
-            theme = new ThemeDocument(theme); // prevent potential side effects.
+            theme = new ThemeDocument(theme); // prevent potential side effects
             theme.setValue(ThemeDocument.USE_FILL_PAINT, "true");
         }
 
@@ -224,9 +229,11 @@
                 qwd.getQ(),
                 qwd.getW());
 
-            List<XYTextAnnotation> textAnnos = new ArrayList<XYTextAnnotation>();
+            List<XYTextAnnotation> textAnnos =
+                new ArrayList<XYTextAnnotation>();
             textAnnos.add(anno);
-            RiverAnnotation flysAnno = new RiverAnnotation(null, null, null, theme);
+            RiverAnnotation flysAnno =
+                new RiverAnnotation(null, null, null, theme);
             flysAnno.setTextAnnotations(textAnnos);
             generator.addAnnotations(flysAnno);
         }
@@ -330,7 +337,9 @@
         }
 
         List<?> qsectorsList = (List<?>) qsectorsObj;
-        if (qsectorsList.size() == 0 || !(qsectorsList.get(0) instanceof NamedDouble)) {
+        if (qsectorsList.size() == 0
+            || !(qsectorsList.get(0) instanceof NamedDouble)
+        ) {
             log.warn("No QSectors coming from data.");
             return;
         }
@@ -394,8 +403,10 @@
             log.debug("Got double[][]");
             double [][] values = (double [][]) data;
             for (int i = 0; i< values[0].length; i++) {
-                xy.add(new StickyAxisAnnotation(bundle.getFacetDescription(),
-                        (float) values[1][i], StickyAxisAnnotation.SimpleAxis.Y_AXIS));
+                xy.add(new StickyAxisAnnotation(
+                        bundle.getFacetDescription(),
+                        (float) values[1][i],
+                        StickyAxisAnnotation.SimpleAxis.Y_AXIS));
             }
 
             if (visible) {
@@ -411,7 +422,8 @@
             WKms wkms = (WKms) data;
 
             Double ckm =
-                (Double) generator.getCallContext().getContextValue(FixChartGenerator.CURRENT_KM);
+                (Double)generator.getCallContext().getContextValue(
+                    FixChartGenerator.CURRENT_KM);
             double location = (ckm != null)
                     ? ckm.doubleValue()
                     : getRange()[0];
@@ -439,7 +451,8 @@
             WQKms wqkms = (WQKms)data;
             // TODO As in doEventsOut, the value-searching should
             // be delivered by the facet already
-            XYSeries series = new StyledXYSeries(bundle.getFacetDescription(), theme);
+            XYSeries series = new StyledXYSeries(
+                bundle.getFacetDescription(), theme);
             Double ckm = (Double) generator.getCallContext()
                 .getContextValue(CURRENT_KM);
 
@@ -456,13 +469,16 @@
                     series.add(wqkms.getQ(i), wqkms.getW(i), false);
                     generator.addAxisSeries(series, axisName, visible);
                     if(visible && theme.parseShowPointLabel()) {
-                        List<XYTextAnnotation> textAnnos = new ArrayList<XYTextAnnotation>();
-                        XYTextAnnotation anno = new CollisionFreeXYTextAnnotation(
-                            bundle.getFacetDescription(),
-                            wqkms.getQ(i),
-                            wqkms.getW(i));
+                        List<XYTextAnnotation> textAnnos =
+                            new ArrayList<XYTextAnnotation>();
+                        XYTextAnnotation anno =
+                            new CollisionFreeXYTextAnnotation(
+                                bundle.getFacetDescription(),
+                                wqkms.getQ(i),
+                                wqkms.getW(i));
                         textAnnos.add(anno);
-                        RiverAnnotation flysAnno = new RiverAnnotation(null, null, null, theme);
+                        RiverAnnotation flysAnno =
+                            new RiverAnnotation(null, null, null, theme);
                         flysAnno.setTextAnnotations(textAnnos);
                         generator.addAnnotations(flysAnno);
                     }
@@ -474,7 +490,8 @@
             log.debug("FixWQCurveGenerator: doWQOut: double[][]");
             double [][] values = (double [][]) data;
 
-            XYSeries series = new StyledXYSeries(bundle.getFacetDescription(), false, true, theme);
+            XYSeries series = new StyledXYSeries(
+                bundle.getFacetDescription(), false, true, theme);
             StyledSeriesBuilder.addPoints(series, values, true);
 
             generator.addAxisSeries(series, axisName, visible);
@@ -502,7 +519,8 @@
     public String getAxisLabel(DiagramGenerator generator) {
         CallMeta meta = generator.getCallContext().getMeta();
 
-        RiverAccess access = new RiverAccess((D4EArtifact)generator.getMaster());
+        RiverAccess access = new RiverAccess((D4EArtifact)generator
+            .getMaster());
         String unit = access.getRiver().getWstUnit().getName();
         return Resources.getMsg(
                 meta,

http://dive4elements.wald.intevation.org