diff artifacts/src/main/java/org/dive4elements/river/artifacts/MainValuesArtifact.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 47199406994a
children 669ab639c56b 0a5239a1e46e
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/MainValuesArtifact.java	Thu Jan 18 20:10:59 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/MainValuesArtifact.java	Thu Jan 18 20:12:01 2018 +0100
@@ -119,7 +119,8 @@
         spawnState();
         String restriction = getDatacageIDValue(data);
         log.debug("mainvalue restriction " + restriction);
-        boolean restricted = restriction.endsWith("q") || restriction.endsWith("w");
+        boolean restricted = restriction.endsWith("q")
+            || restriction.endsWith("w");
         if (!restricted || restriction.endsWith("q")) {
             fs.add(new MainValuesQFacet(
                     MAINVALUES_Q,
@@ -166,8 +167,11 @@
         try {
             Long officialNumber = Long.valueOf(gaugeref);
             Gauge gauge = Gauge.getGaugeByOfficialNumber(officialNumber);
-            addData("ld_locations", new DefaultStateData("ld_locations", null, null,
-                    String.valueOf(gauge.getStation())));
+            addData(
+                "ld_locations",
+                new DefaultStateData("ld_locations", null, null,
+                    String.valueOf(gauge.getStation()))
+            );
         } catch (NumberFormatException nfe) {
             log.debug("MainValuesArtifact could not parse gaugeref from doc.");
         }
@@ -194,7 +198,11 @@
 
     /** Get important data from the 'calling' artifact. */
     @Override
-    protected void initialize(Artifact artifact, Object context, CallMeta meta) {
+    protected void initialize(
+        Artifact artifact,
+        Object context,
+        CallMeta meta
+    ) {
         log.debug("MainValuesArtifact.initialize");
         D4EArtifact winfo = (D4EArtifact) artifact;
         River river = new RiverAccess(winfo).getRiver();
@@ -202,22 +210,30 @@
 
         if (locations != null) {
             double location = locations[0];
-            addData("ld_locations", new DefaultStateData("ld_locations", null, null,
-                    String.valueOf(location)));
+            addData(
+                "ld_locations",
+                new DefaultStateData("ld_locations", null, null,
+                    String.valueOf(location))
+            );
         }
         else {
             log.error("No location for mainvalues given.");
         }
         importData(winfo, "river");
-        // In the case of DischargeWQCurves, there are no locations, but a gauge.
+        // In the case of DischargeWQCurves, there are no locations,
+        // but a gauge.
         if (getDataAsString("ld_locations") == null) {
             // TODO its a tad difficult to remodel Range/Gauge-Access to
             // do this.
             String refGaugeID = winfo.getDataAsString("reference_gauge");
             if (refGaugeID != null) {
-                Gauge g = Gauge.getGaugeByOfficialNumber(Integer.parseInt(refGaugeID));
-                addData("ld_locations", new DefaultStateData("ld_locations", null, null,
-                    String.valueOf(g.getStation())));
+                Gauge g = Gauge.getGaugeByOfficialNumber(
+                    Integer.parseInt(refGaugeID));
+                addData(
+                    "ld_locations",
+                    new DefaultStateData("ld_locations", null, null,
+                        String.valueOf(g.getStation()))
+                );
             }
             else {
                 log.error("MainValuesArtifact: No location/gauge.");

http://dive4elements.wald.intevation.org