changeset 8860:28df64078f27

Merge with 0862ea5d66baf60e7eee496d130a35157cc9ec12
author gernotbelger
date Fri, 19 Jan 2018 11:23:42 +0100
parents 7bbfb24e6eec (current diff) 0862ea5d66ba (diff)
children 571e5287dfbb
files artifacts/doc/conf/artifacts/manualpoints.xml artifacts/doc/conf/backend-db.xml artifacts/doc/conf/log4j.properties artifacts/doc/conf/seddb-db.xml artifacts/src/main/java/org/dive4elements/river/artifacts/model/FacetTypes.java artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/CalculationSelectSinfo.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/WDifferencesState.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelPairSelectState.java artifacts/src/main/java/org/dive4elements/river/exports/process/FlowVelocityProcessor.java artifacts/src/main/java/org/dive4elements/river/jfree/StyledXYSeries.java gwt-client/src/main/java/org/dive4elements/river/client/client/ui/AbstractUIProvider.java gwt-client/src/main/java/org/dive4elements/river/client/client/ui/CollectionView.java gwt-client/src/main/java/org/dive4elements/river/client/client/ui/DatacageTwinPanel.java gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ParameterList.java gwt-client/src/main/java/org/dive4elements/river/client/client/ui/minfo/BedHeightsDatacagePanel.java gwt-client/src/main/webapp/WEB-INF/log4j.properties
diffstat 467 files changed, 4131 insertions(+), 1823 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/doc/conf/artifacts/manualpoints.xml	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/doc/conf/artifacts/manualpoints.xml	Fri Jan 19 11:23:42 2018 +0100
@@ -35,6 +35,8 @@
             <facet name="sq_relation_e.manualpoints" />
             <facet name="bed_longitudinal_section.manualpoints" />
             <facet name="sq_relation_f.manualpoints" />
+            
+            <!--  brauchen wir .manualpoints für sinfo ergebnisse? -->
           </facets>
         </outputmode>
       </outputmodes>
--- a/artifacts/doc/conf/backend-db.xml	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/doc/conf/backend-db.xml	Fri Jan 19 11:23:42 2018 +0100
@@ -5,7 +5,7 @@
     <password>d4e</password>
     <dialect>org.hibernate.dialect.PostgreSQLDialect</dialect>
     <driver>org.postgresql.Driver</driver>
-    <url>jdbc:postgresql://localhost:5432/d4e</url>
+    <url>jdbc:postgresql://localhost:63333/d4e</url>
     <validation-query>select 1 from rivers</validation-query>
     <max-wait>30000</max-wait>
 </backend-database>
--- a/artifacts/doc/conf/log4j.properties	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/doc/conf/log4j.properties	Fri Jan 19 11:23:42 2018 +0100
@@ -4,7 +4,7 @@
 log4j.category.org.hibernate=WARN
 log4j.category.net.sf.ehcache=WARN
 log4j.category.org.eclipse=WARN
-log4j.category.org.restlet=INFO
+log4j.category.org.restlet=WARN
 
 
 ########## APPENDER SETTINGS
@@ -12,10 +12,7 @@
 log4j.appender.FLYS.layout.ConversionPattern=%d{HH:mm:ss} [%t] %-5p %c{1} - %m%n
 
 
-log4j.appender.FLYS=org.apache.log4j.RollingFileAppender
-log4j.appender.FLYS.File=/var/log/d4e-river/d4e-server.log
-log4j.appender.FLYS.MaxFileSize=5000KB
-log4j.appender.FLYS.MaxBackupIndex=1
+log4j.appender.FLYS=org.apache.log4j.ConsoleAppender
 
 log4j.logger.org.dive4elements.artifactdatabase.rest.Standalone=INFO, START
 log4j.appender.START=org.apache.log4j.ConsoleAppender
--- a/artifacts/doc/conf/seddb-db.xml	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/doc/conf/seddb-db.xml	Fri Jan 19 11:23:42 2018 +0100
@@ -5,7 +5,7 @@
     <password>seddb</password>
     <dialect>org.hibernate.dialect.PostgreSQLDialect</dialect>
     <driver>org.postgresql.Driver</driver>
-    <url>jdbc:postgresql://localhost:5432/seddb</url>
+    <url>jdbc:postgresql://localhost:63333/seddb</url>
     <validation-query>select 1 from gewaesser</validation-query>
     <max-wait>30000</max-wait>
     <!--
--- a/artifacts/pom.xml	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/pom.xml	Fri Jan 19 11:23:42 2018 +0100
@@ -42,6 +42,28 @@
           </descriptors>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <version>3.0.0</version>
+        <configuration>
+          <configLocation>../checkstyle.xml</configLocation>
+          <encoding>UTF-8</encoding>
+        </configuration>
+        <executions>
+          <execution>
+            <id>validate</id>
+            <phase>validate</phase>
+            <configuration>
+              <consoleOutput>true</consoleOutput>
+              <failsOnError>true</failsOnError>
+            </configuration>
+            <goals>
+              <goal>check</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 
--- a/artifacts/src/assembly/assembly.xml	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/assembly/assembly.xml	Fri Jan 19 11:23:42 2018 +0100
@@ -5,7 +5,7 @@
   <includeBaseDirectory>false</includeBaseDirectory>
   <formats>
     <format>tar</format>
-    <format>tar.bz2</format>
+    <!--<format>tar.bz2</format>-->
   </formats>
   <fileSets>
     <fileSet>
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/AbstractStaticStateArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/AbstractStaticStateArtifact.java	Fri Jan 19 11:23:42 2018 +0100
@@ -116,7 +116,8 @@
         root.appendChild(name);
         root.appendChild(createOutputModes(cc, desc, creator));
 
-        ProtocolUtils.appendDescribeHeader(creator, root, identifier(), hash());
+        ProtocolUtils.appendDescribeHeader(
+            creator, root, identifier(), hash());
 
         // Add the data to an anonymous state.
         Collection<StateData> datas = getAllData();
@@ -134,8 +135,10 @@
                 creator.addAttr(itemelent, "type", dataItem.getType(), true);
                 state.appendChild(itemelent);
                 Element valuement = creator.create("item");
-                creator.addAttr(valuement, "label", dataItem.getDescription(), true);
-                creator.addAttr(valuement, "value", dataItem.getValue().toString(), true);
+                creator.addAttr(
+                    valuement, "label", dataItem.getDescription(), true);
+                creator.addAttr(
+                    valuement, "value", dataItem.getValue().toString(), true);
                 itemelent.appendChild(valuement);
             }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/AnnotationArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/AnnotationArtifact.java	Fri Jan 19 11:23:42 2018 +0100
@@ -62,11 +62,15 @@
                     Facet    facet,
                     String   output
                 ) {
-                    if (output.contains(FacetTypes.ChartType.FLSC.toString())) {
+                    if (output.contains(
+                            FacetTypes.ChartType.FLSC.toString())
+                    ) {
                         // Longitudinal section chart
                         String name = facet.getName();
 
-                        if (name.contains(FacetTypes.LONGITUDINAL_ANNOTATION)) {
+                        if (name.contains(
+                                FacetTypes.LONGITUDINAL_ANNOTATION)
+                        ) {
                             return Boolean.FALSE;
                         }
                     }
@@ -162,7 +166,8 @@
 
         State current = getCurrentState(context);
 
-        ProtocolUtils.appendDescribeHeader(creator, root, identifier(), hash());
+        ProtocolUtils.appendDescribeHeader(
+            creator, root, identifier(), hash());
         ProtocolUtils.appendState(creator, root, current);
 
         Element name = ProtocolUtils.createArtNode(
@@ -251,7 +256,8 @@
                                 doc, outs, generated);
                         }
                         else{
-                            log.debug("Cannot append output to generated document.");
+                            log.debug(
+                                "Cannot append output to generated document.");
                         }
                     }
                     else {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/BedHeightsArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/BedHeightsArtifact.java	Fri Jan 19 11:23:42 2018 +0100
@@ -120,7 +120,8 @@
                         callMeta,
                         "facet.bedheight.sounding_width",
                         new Object[] { bedHName });
-                    facet = new BedHeightSoundingWidthFacet(facetType, bedHName);
+                    facet = new BedHeightSoundingWidthFacet(
+                        facetType, bedHName);
                 }
                 else {
                     facet = new BedHeightFacet(facetType, bedHName);
@@ -159,7 +160,11 @@
     }
 
     @Override
-    protected void initialize(Artifact artifact, Object context, CallMeta meta) {
+    protected void initialize(
+        Artifact artifact,
+        Object context,
+        CallMeta meta
+    ) {
         // do not clone facets, etc. from master artifact
 
         log.debug("initialize");
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/CollectionMonitor.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/CollectionMonitor.java	Fri Jan 19 11:23:42 2018 +0100
@@ -119,7 +119,10 @@
         return creator.create("recommended-artifacts");
     }
 
-    private static final String generateCacheKey(D4EArtifact artifact, String [] outs) {
+    private static final String generateCacheKey(
+        D4EArtifact artifact,
+        String [] outs
+    ) {
         StringBuilder sb = new StringBuilder(artifact.hash());
         // XXX: The hash really should be unique enough.
         for (String out: outs) {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/CrossSectionArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/CrossSectionArtifact.java	Fri Jan 19 11:23:42 2018 +0100
@@ -137,7 +137,9 @@
             // Find min-km of cross sections,
             // then set DATA_KM to min(DATA_KM, minCross).
             String dataKmValue = getDataAsString(DATA_KM);
-            double dataKm = (dataKmValue != null) ? Double.valueOf(dataKmValue) : Double.MIN_VALUE;
+            double dataKm = (dataKmValue != null)
+                ? Double.valueOf(dataKmValue)
+                : Double.MIN_VALUE;
             if (dataKm < csl.getKm().doubleValue()) {
                 addStringData(DATA_KM, csl.getKm().toString());
             }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/D4EArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/D4EArtifact.java	Fri Jan 19 11:23:42 2018 +0100
@@ -79,7 +79,7 @@
 
     public static final String COMPUTING_CACHE = "computed.values";
 
-    /** The XPath that points to the input data elements of the FEED document. */
+    /** XPath that points to the input data elements of the FEED document. */
     public static final String XPATH_FEED_INPUT =
         "/art:action/art:data/art:input";
 
@@ -97,7 +97,8 @@
     public static final String XPATH_IDS = "/art:action/art:ids/@value";
 
     /** Path to 'target_out' (data) in doc that comes from datacage. */
-    public static final String XPATH_TARGET_OUT = "/art:action/art:target_out/@value";
+    public static final String XPATH_TARGET_OUT =
+        "/art:action/art:target_out/@value";
 
     /** The constant string that shows that an operation was successful. */
     public static final String OPERATION_SUCCESSFUL = "SUCCESS";
@@ -180,7 +181,8 @@
 
 
     /**
-     * Initialize the artifact and insert new data if <code>data</code> contains
+     * Initialize the artifact and insert new data
+     * if <code>data</code> contains
      * information necessary for this artifact.
      *
      * @param identifier The UUID.
@@ -249,7 +251,11 @@
         this.facets.put(currentState, staticFacets);
     }
 
-    protected void handleInitModel(Document data, Object context, CallMeta callMeta) {
+    protected void handleInitModel(
+        Document data,
+        Object context,
+        CallMeta callMeta
+    ) {
         RiverContext flysContext = RiverUtils.getFlysContext(context);
 
         String model = XMLUtils.xpathString(
@@ -357,7 +363,8 @@
 
     /**
      * (called from setup).
-     * @param artifact master-artifact (if any, otherwise initialize is not called).
+     * @param artifact master-artifact
+     *                 (if any, otherwise initialize is not called).
      */
     protected void initialize(
         Artifact artifact,
@@ -377,7 +384,7 @@
         facets           = flys.cloneFacets();
         // Do not clone filter facets!
 
-        ArrayList<String> stateIds     = (ArrayList<String>) getPreviousStateIds();
+        ArrayList<String> stateIds = (ArrayList<String>) getPreviousStateIds();
         ArrayList<String> toInitialize = (ArrayList<String>) stateIds.clone();
 
         toInitialize.add(getCurrentStateId());
@@ -433,15 +440,17 @@
 
                 int index;
                 try {
-                    index = Integer.parseInt(facetElement.getAttribute("index"));
+                    index = Integer.parseInt(
+                        facetElement.getAttribute("index"));
                 }
                 catch (NumberFormatException nfe) {
                     log.warn(nfe);
                     index = 0;
                 }
                 if (log.isDebugEnabled()) {
-                    log.debug("Creating filter facet " + fName + " with  index " + index +
-                            " for out " + oName);
+                    log.debug("Creating filter facet " + fName
+                        + " with  index " + index
+                        + " for out " + oName);
                 }
                 facets.add(new DefaultFacet(index, fName, ""));
             }
@@ -535,7 +544,8 @@
 
         State current = getCurrentState(context);
 
-        ProtocolUtils.appendDescribeHeader(creator, root, identifier(), hash());
+        ProtocolUtils.appendDescribeHeader(
+            creator, root, identifier(), hash());
         ProtocolUtils.appendState(creator, root, current);
         ProtocolUtils.appendReachableStates(creator, root, reachable);
 
@@ -940,8 +950,8 @@
      *
      * @param name The name of the StateData object.
      *
-     * @return a Boolean representing the value of the data object or null if no
-     * such object is existing.
+     * @return a Boolean representing the value of the data object or
+     * null if no such object is existing.
      */
     public Boolean getDataAsBoolean(String name) {
         String value = getDataAsString(name);
@@ -964,7 +974,7 @@
     }
 
     /**
-     * This method returns all stored StateData in this artifact as a Collection
+     * Returns all stored StateData in this artifact as a Collection
      * @return a Collection of all StateData objects in this artifact
      */
     public Collection<StateData> getAllData() {
@@ -1103,7 +1113,8 @@
     protected boolean isStateReachable(String stateId, Object context) {
 
         if (log.isDebugEnabled()) {
-            log.debug("Determine if the state '" + stateId + "' is reachable.");
+            log.debug("Determine if the state '"
+                + stateId + "' is reachable.");
         }
 
         RiverContext flysContext = RiverUtils.getFlysContext(context);
@@ -1190,7 +1201,8 @@
             List<Facet> fFacets = filterFacets.get(outName);
             if (fFacets != null) {
                 if (debug) {
-                    log.debug("" + fFacets.size() + " filters for: " + outName);
+                    log.debug("" + fFacets.size()
+                        + " filters for: " + outName);
                     for (Facet tmp: fFacets) {
                         log.debug("   filter = '" + tmp.getName() + "'");
                     }
@@ -1430,8 +1442,9 @@
 
 
     /**
-     * Dispatches the computation request to compute(CallContext context, String
-     * hash) with the current hash value of the artifact which is provided by
+     * Dispatches the computation request to
+     * compute(CallContext context, String hash)
+     * with the current hash value of the artifact which is provided by
      * hash().
      *
      * @param context The CallContext.
@@ -1517,7 +1530,8 @@
             if (cache != null) {
                 net.sf.ehcache.Element element = cache.get(key);
                 if (element != null) {
-                    log.debug("Got computation result from cache for key: " + key);
+                    log.debug(
+                        "Got computation result from cache for key: " + key);
                     old = element.getValue();
                 }
             }
@@ -1534,7 +1548,8 @@
                     res = state.computeAdvance(this, key, context, fs, old);
                     break;
                 case INIT:
-                    res = state.computeInit(this, key, context, context.getMeta(), fs);
+                    res = state.computeInit(
+                        this, key, context, context.getMeta(), fs);
                 default:
                     res = null;
             }
@@ -1679,7 +1694,7 @@
             log.debug("D4EArtifact.endOfLife: " + identifier());
         }
 
-        ArrayList<String> ids       = (ArrayList<String>) getPreviousStateIds();
+        ArrayList<String> ids = (ArrayList<String>) getPreviousStateIds();
         ArrayList<String> toDestroy = (ArrayList<String>) ids.clone();
 
         toDestroy.add(getCurrentStateId());
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/FixationArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/FixationArtifact.java	Fri Jan 19 11:23:42 2018 +0100
@@ -66,7 +66,8 @@
         CallContext           context
     ) {
         FixRealizingResult result = (FixRealizingResult)
-            ((CalculationResult)this.compute(context, ComputeType.ADVANCE, false)).getData();
+            ((CalculationResult)this.compute(
+                context, ComputeType.ADVANCE, false)).getData();
 
         WKms wkms = result.getWQKms()[facetIdx];
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/FlowVelocityMeasurementArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/FlowVelocityMeasurementArtifact.java	Fri Jan 19 11:23:42 2018 +0100
@@ -75,7 +75,6 @@
      * Trivial Constructor.
      */
     public FlowVelocityMeasurementArtifact() {
-        log.debug("FlowVelocityMeasurementArtifact.FlowVelocityMeasurementArtifact");
     }
 
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/FlowVelocityModelArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/FlowVelocityModelArtifact.java	Fri Jan 19 11:23:42 2018 +0100
@@ -156,7 +156,8 @@
         String code = getDatacageIDValue(data);
 
         if (code != null) {
-            String name = FlowVelocityModel.getModelDescription(Integer.valueOf(code));
+            String name = FlowVelocityModel.getModelDescription(
+                Integer.valueOf(code));
 
             Facet facet = new FlowVelocityFacet(
                 0,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/GaugeDischargeArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/GaugeDischargeArtifact.java	Fri Jan 19 11:23:42 2018 +0100
@@ -191,17 +191,21 @@
             try {
                 tableId = Integer.parseInt(ids[1]);
             } catch (NumberFormatException e) {
-                log.error("Discharge tables ids string is wrong." +
-                        " Fromat is <gauge_name>;<discharge_table_id>;<facet_desc>" +
-                        " Fix your Datacage!");
+                log.error("Discharge tables ids string is wrong. "
+                    + "Format is "
+                    + "<gauge_name>;<discharge_table_id>;<facet_desc>"
+                    + " Fix your Datacage!");
                 // Let's rather break down completly then show the wrong data.
                 return null;
             }
-            DischargeTable table = DischargeTable.getDischargeTableById(tableId);
+            DischargeTable table = DischargeTable.getDischargeTableById(
+                tableId);
             map = new HashMap<String, double [][]>();
-            map.put(getGaugeName(), DischargeTables.loadDischargeTableValues(table));
+            map.put(getGaugeName(), DischargeTables.loadDischargeTableValues(
+                    table));
         } else {
-            DischargeTables dt = new DischargeTables(river.getName(), getGaugeName());
+            DischargeTables dt = new DischargeTables(
+                river.getName(), getGaugeName());
             map = dt.getValues();
         }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/GaugeDischargeCurveArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/GaugeDischargeCurveArtifact.java	Fri Jan 19 11:23:42 2018 +0100
@@ -47,9 +47,11 @@
         Logger.getLogger(GaugeDischargeCurveArtifact.class);
 
     public static final String XPATH_RIVER = "/art:action/art:river/@art:name";
-    public static final String XPATH_GAUGE = "/art:action/art:gauge/@art:reference";
+    public static final String XPATH_GAUGE =
+        "/art:action/art:gauge/@art:reference";
     public static final String NAME = "gaugedischargecurve";
-    public static final String STATIC_STATE_NAME = "state.gaugedischargecurve.static";
+    public static final String STATIC_STATE_NAME =
+        "state.gaugedischargecurve.static";
     public static final String UIPROVIDER = "gauge_discharge_curve";
     public static final String GAUGE_DISCHARGE_CURVE_FACET =
         "gauge_discharge_curve";
@@ -87,7 +89,8 @@
         log.debug("GaugeDischargeCurveArtifact.setup");
 
         if (log.isDebugEnabled()) {
-            log.debug("GaugeDischargeCurveArtifact.setup" + XMLUtils.toString(data));
+            log.debug("GaugeDischargeCurveArtifact.setup"
+                + XMLUtils.toString(data));
         }
         String gaugeref = XMLUtils.xpathString(data, XPATH_GAUGE,
                 ArtifactNamespaceContext.INSTANCE);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/MainValuesArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/MainValuesArtifact.java	Fri Jan 19 11:23:42 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.");
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/ManualPointsArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/ManualPointsArtifact.java	Fri Jan 19 11:23:42 2018 +0100
@@ -96,7 +96,11 @@
 
     /** Setup state and facet. */
     @Override
-    protected void initialize(Artifact artifact, Object context, CallMeta meta) {
+    protected void initialize(
+        Artifact artifact,
+        Object context,
+        CallMeta meta
+    ) {
         log.debug("ManualPointsArtifact.initialize");
         List<Facet> fs = new ArrayList<Facet>();
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/MapArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/MapArtifact.java	Fri Jan 19 11:23:42 2018 +0100
@@ -122,7 +122,8 @@
                 List<Output> list = cur.getOutputs();
                 if (list != null && list.size() > 0) {
                     log.debug(
-                        "Append output modes for current state: " + cur.getID());
+                        "Append output modes for current state: "
+                        + cur.getID());
 
                     List<Facet> fs = getFacets(cur.getID());
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/QSectorArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/QSectorArtifact.java	Fri Jan 19 11:23:42 2018 +0100
@@ -104,7 +104,10 @@
             log.debug(gr);
         }
 
-        for (int i = 0; i < FixingsKMChartService.I18N_Q_SECTOR_BOARDERS.length; ++i) {
+        for (int i = 0;
+             i < FixingsKMChartService.I18N_Q_SECTOR_BOARDERS.length;
+             ++i
+        ) {
             String key   = FixingsKMChartService.I18N_Q_SECTOR_BOARDERS[i];
             String def   = FixingsKMChartService.DEFAULT_Q_SECTOR_BORDERS[i];
             String label = Resources.getMsg(context.getMeta(), key, def);
@@ -118,7 +121,11 @@
 
     /** Setup state and facet. */
     @Override
-    protected void initialize(Artifact artifact, Object context, CallMeta meta) {
+    protected void initialize(
+        Artifact artifact,
+        Object context,
+        CallMeta meta
+    ) {
         log.debug("QSectorArtifact.initialize");
         List<Facet> fs = new ArrayList<Facet>();
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/RiverAxisArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/RiverAxisArtifact.java	Fri Jan 19 11:23:42 2018 +0100
@@ -118,7 +118,8 @@
                         getName(), Integer.parseInt(kind));
             } else {
                 if (reproject) {
-                    log.debug("Query extent for RiverAxis with Srid: " + getSrid());
+                    log.debug("Query extent for RiverAxis with Srid: "
+                        + getSrid());
                     return GeometryUtils.transform(
                             GeometryUtils.getRiverBoundary(river.getName()),
                             getSrid());
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/SQRelationArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/SQRelationArtifact.java	Fri Jan 19 11:23:42 2018 +0100
@@ -66,7 +66,8 @@
         if (code != null && !code.isEmpty()) {
             /* Case that we were instantiated from the datacage */
             addStringData("ids", code);
-            super.setup(identifier, factory, context, callmeta, data, loadFacets);
+            super.setup(
+                identifier, factory, context, callmeta, data, loadFacets);
             return;
         }
 
@@ -177,7 +178,10 @@
         return NAME;
     }
 
-    private boolean hasParameter(StaticSQRelation.Parameter p, List<Facet> fs) {
+    private boolean hasParameter(
+        StaticSQRelation.Parameter p,
+        List<Facet> fs
+    ) {
         for (Facet f : fs) {
             if (f.getName().equals("sq_" +
                 p.toString().toLowerCase() + "_curve")) {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/SedimentDensityArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/SedimentDensityArtifact.java	Fri Jan 19 11:23:42 2018 +0100
@@ -133,9 +133,11 @@
         String code = getDatacageIDValue(data);
 
         if (code != null) {
-            double[] depth = SedimentDensityFactory.getDepth(Integer.valueOf(code));
+            double[] depth = SedimentDensityFactory.getDepth(
+                Integer.valueOf(code));
 
-            String name = Resources.getMsg(callMeta, "sedimentdensity", "sedimentdensity");
+            String name = Resources.getMsg(
+                callMeta, "sedimentdensity", "sedimentdensity");
             name += " " + depth[0] + " - " + depth[1] + " cm";
             Facet facet = new SedimentDensityFacet(
                 0,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/StaticD4EArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/StaticD4EArtifact.java	Fri Jan 19 11:23:42 2018 +0100
@@ -64,7 +64,8 @@
 
         root.appendChild(name);
 
-        ProtocolUtils.appendDescribeHeader(creator, root, identifier(), hash());
+        ProtocolUtils.appendDescribeHeader(
+            creator, root, identifier(), hash());
         root.appendChild(createOutputModes(cc, desc, creator));
 
         // Add the data to an anonymous state.
@@ -79,8 +80,10 @@
                 creator.addAttr(itemelent, "name", dataItem.getName(), true);
                 creator.addAttr(itemelent, "type", dataItem.getType(), true);
                 Element valuement = creator.create("item");
-                creator.addAttr(valuement, "label", dataItem.getDescription(), true);
-                creator.addAttr(valuement, "value", dataItem.getValue().toString(), true);
+                creator.addAttr(
+                    valuement, "label", dataItem.getDescription(), true);
+                creator.addAttr(
+                    valuement, "value", dataItem.getValue().toString(), true);
                 itemelent.appendChild(valuement);
                 state.appendChild(itemelent);
             }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/StaticMorphWidthArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/StaticMorphWidthArtifact.java	Fri Jan 19 11:23:42 2018 +0100
@@ -111,7 +111,11 @@
     }
 
     @Override
-    protected void initialize(Artifact artifact, Object context, CallMeta meta) {
+    protected void initialize(
+        Artifact artifact,
+        Object context,
+        CallMeta meta
+    ) {
     }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/StaticWKmsArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/StaticWKmsArtifact.java	Fri Jan 19 11:23:42 2018 +0100
@@ -331,7 +331,13 @@
 
         // Do linear interpolation.
         int mod = kmIncreasing ? -1 : +1;
-        return Linear.linear(km, wkms.getKm(idx+mod), wkms.getKm(idx), wkms.getW(idx+mod), wkms.getW(idx));
+        return Linear.linear(
+            km,
+            wkms.getKm(idx+mod),
+            wkms.getKm(idx),
+            wkms.getW(idx+mod),
+            wkms.getW(idx)
+        );
     }
 
 
@@ -345,9 +351,15 @@
      * @param next the next available input km (-1 if unavailable).
      * @param prev the previous available input km (-1 if unavailable).
      *
-     * @return W in wkms that is closer to km than to next and prev, or Double.NaN.
+     * @return W in wkms that is closer to km than to next and prev,
+     *         or Double.NaN.
      */
-    public double getWAtCloseKm(WKms wkms, double km, double next, double prev) {
+    public double getWAtCloseKm(
+        WKms wkms,
+        double km,
+        double next,
+        double prev
+    ) {
         // TODO symbolic "-1" pr next/prev is a bad idea (tm), as we compare
         //      distances to these values later.
         // TODO issue888
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/StaticWQKmsArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/StaticWQKmsArtifact.java	Fri Jan 19 11:23:42 2018 +0100
@@ -71,7 +71,8 @@
                     String   outputName
                 ) {
                     String fname = facet.getName();
-                    return (fname.equals(STATIC_WQKMS) || fname.equals(STATIC_WQKMS_W));
+                    return (fname.equals(STATIC_WQKMS)
+                        || fname.equals(STATIC_WQKMS_W));
                 }});
     }
 
@@ -112,7 +113,8 @@
             String [] parts = code.split("-");
 
             if (parts.length >= 1) {
-                boolean official = parts[0].toLowerCase().startsWith("official");
+                boolean official = parts[0].toLowerCase()
+                    .startsWith("official");
                 addStringData("official", official ? "1" : "0");
             }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WINFOArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WINFOArtifact.java	Fri Jan 19 11:23:42 2018 +0100
@@ -79,7 +79,8 @@
     public static final String ARTIFACT_NAME = "winfo";
 
     /** XPath */
-    public static final String XPATH_STATIC_UI ="/art:result/art:ui/art:static";
+    public static final String XPATH_STATIC_UI =
+        "/art:result/art:ui/art:static";
 
     /** The default number of steps between the start end end of a selected Q
      * range. */
@@ -258,7 +259,8 @@
             log.debug("'free' calculation (km " + refKm + ")");
         }
         else {
-            Gauge gauge = river.determineRefGauge(range, rangeAccess.isRange());
+            Gauge gauge = river.determineRefGauge(
+                range, rangeAccess.isRange());
 
             if (gauge == null) {
                 return error(
@@ -425,7 +427,11 @@
     }
 
     /** Create CalculationResult with data and message with args. */
-    protected static final CalculationResult error(Object data, String msg, Object ... args) {
+    protected static final CalculationResult error(
+        Object data,
+        String msg,
+        Object ... args
+    ) {
         return new CalculationResult(data, new Calculation(msg, args));
     }
 
@@ -728,7 +734,8 @@
             log.debug("range: " + Arrays.toString(range));
         }
 
-        Gauge g = rangeAccess.getRiver().determineRefGauge(range, rangeAccess.isRange());
+        Gauge g = rangeAccess.getRiver().determineRefGauge(
+            range, rangeAccess.isRange());
         if (g == null) {
             log.warn("no gauge found for km: " + range[0]);
             return null;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSBackgroundArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSBackgroundArtifact.java	Fri Jan 19 11:23:42 2018 +0100
@@ -36,7 +36,11 @@
 
 
     @Override
-    protected void initialize(Artifact artifact, Object context, CallMeta meta) {
+    protected void initialize(
+        Artifact artifact,
+        Object context,
+        CallMeta meta
+    ) {
         log.debug("Initialize internal state with: "+ artifact.identifier());
 
         D4EArtifact flys = (D4EArtifact) artifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSBuildingsArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSBuildingsArtifact.java	Fri Jan 19 11:23:42 2018 +0100
@@ -91,7 +91,8 @@
             String kind = getIdPart(2);
 
             if (kind != null) {
-                buildings = Building.getBuildings(getRiverId(), Integer.parseInt(kind));
+                buildings = Building.getBuildings(
+                    getRiverId(), Integer.parseInt(kind));
             } else {
                 buildings = Building.getBuildings(getRiverId(), name);
             }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSDBArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSDBArtifact.java	Fri Jan 19 11:23:42 2018 +0100
@@ -239,7 +239,8 @@
         public void endOfLife(Artifact owner, Object context) {
             log.info("Destroy WMSDBState: " + getID());
 
-            String p = RiverUtils.getXPathString(RiverUtils.XPATH_FLOODMAP_SHAPEFILE_DIR);
+            String p = RiverUtils.getXPathString(
+                RiverUtils.XPATH_FLOODMAP_SHAPEFILE_DIR);
             File dir = new File(p, owner.identifier());
 
             if (dir != null && dir.exists()) {
@@ -250,10 +251,11 @@
         }
 
         /**
-         * This method returns the extent of a DB layer in the projection of the
-         * database.
+         * This method returns the extent of a DB layer
+         * in the projection of the database.
          *
-         * @return the extent of the DB layer in the projection of the database.
+         * @return the extent of the DB layer
+         *         in the projection of the database.
          */
         protected Envelope getExtent() {
             return getExtent(false);
@@ -267,8 +269,9 @@
         protected abstract String getSrid();
 
         /**
-         * This method returns the extent of the DB layer. The projection of the
-         * extent depends on the <i>reproject</i> parameter. If reproject is set,
+         * Returns the extent of the DB layer. The projection of the
+         * extent depends on the <i>reproject</i> parameter.
+         * If reproject is set,
          * the extent is reprojected into the original projection which is
          * specified in the configuration. Otherwise, the projection of the
          * database is used.
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSFloodmarksArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSFloodmarksArtifact.java	Fri Jan 19 11:23:42 2018 +0100
@@ -135,7 +135,8 @@
                 return "geom FROM flood_marks USING SRID " + srid;
             }
             else {
-                return "geom FROM flood_marks USING UNIQUE id USING SRID " + srid;
+                return "geom FROM flood_marks USING UNIQUE id USING SRID "
+                    + srid;
             }
         }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSHWSPointsArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSHWSPointsArtifact.java	Fri Jan 19 11:23:42 2018 +0100
@@ -141,7 +141,8 @@
                 return "geom FROM hws_points USING SRID " + srid;
             }
             else {
-                return "geom FROM hws_points USING UNIQUE id USING SRID " + srid;
+                return "geom FROM hws_points USING UNIQUE id USING SRID "
+                    + srid;
             }
         }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSHydrBoundaryArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSHydrBoundaryArtifact.java	Fri Jan 19 11:23:42 2018 +0100
@@ -61,7 +61,8 @@
     }
 
 
-    public static class HydrBoundaryState extends WMSDBState implements FacetTypes
+    public static class HydrBoundaryState
+        extends WMSDBState implements FacetTypes
     {
         private static final Logger log =
             Logger.getLogger(HydrBoundaryState.class);
@@ -97,7 +98,8 @@
                 boundaries = HydrBoundary.getHydrBoundaries(getRiverId(),
                         getName(), Integer.parseInt(kind));
             } else {
-                boundaries = HydrBoundary.getHydrBoundaries(getRiverId(), getName());
+                boundaries = HydrBoundary.getHydrBoundaries(
+                    getRiverId(), getName());
             }
 
             Envelope max = null;
@@ -138,7 +140,8 @@
                 return "geom FROM hydr_boundaries USING SRID " + srid;
             }
             else {
-                return "geom FROM hydr_boundaries USING UNIQUE id USING SRID " + srid;
+                return "geom FROM hydr_boundaries USING UNIQUE id USING SRID "
+                    + srid;
             }
         }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSHydrBoundaryPolyArtifact.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/WMSHydrBoundaryPolyArtifact.java	Fri Jan 19 11:23:42 2018 +0100
@@ -61,7 +61,8 @@
     }
 
 
-    public static class HydrBoundaryPolyState extends WMSDBState implements FacetTypes
+    public static class HydrBoundaryPolyState
+        extends WMSDBState implements FacetTypes
     {
         private static final Logger log =
             Logger.getLogger(HydrBoundaryPolyState.class);
@@ -170,7 +171,9 @@
                 return "geom FROM hydr_boundaries_poly USING SRID " + srid;
             }
             else {
-                return "geom FROM hydr_boundaries_poly USING UNIQUE id USING SRID " + srid;
+                return "geom FROM hydr_boundaries_poly "
+                    + "USING UNIQUE id USING SRID "
+                    + srid;
             }
         }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/Access.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/Access.java	Fri Jan 19 11:23:42 2018 +0100
@@ -56,7 +56,7 @@
         return (String)sd.getValue();
     }
 
-    /** Get a data entry as double, returns null if string not double valueoffable. */
+    /** Get a data entry as double, or null */
     protected Double getDouble(String key) {
         StateData sd = artifact.getData(key);
         if (sd == null) {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedDifferencesAccess.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedDifferencesAccess.java	Fri Jan 19 11:23:42 2018 +0100
@@ -58,7 +58,8 @@
                 String[] diff1parts = diff1.split(";");
                 String[] diff2parts = diff2.split(";");
                 if (log.isDebugEnabled()) {
-                    log.debug("creating 2 artifacts." + diff1parts[0] + "; " + diff2parts[0]);
+                    log.debug("creating 2 artifacts."
+                        + diff1parts[0] + "; " + diff2parts[0]);
                 }
                 differenceArtifactIds[i][0] = diff1parts[0];
                 differenceArtifactIds[i][1] = diff2parts[0];
@@ -87,8 +88,10 @@
         String [][] artifactsIds = getDifferenceArtifactIds();
         int [][] ids = new int[artifactsIds.length][2];
         for (int i = 0; i < artifactsIds.length; ++i) {
-            D4EArtifact a1 = RiverUtils.getArtifact(artifactsIds[i][0], context);
-            D4EArtifact a2 = RiverUtils.getArtifact(artifactsIds[i][1], context);
+            D4EArtifact a1 = RiverUtils.getArtifact(
+                artifactsIds[i][0], context);
+            D4EArtifact a2 = RiverUtils.getArtifact(
+                artifactsIds[i][1], context);
             ids[i][0] = getHeightId(a1);
             ids[i][1] = getHeightId(a2);
         }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedHeightAccess.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedHeightAccess.java	Fri Jan 19 11:23:42 2018 +0100
@@ -55,7 +55,8 @@
 
             for (String part: parts) {
                 if (part.indexOf(SoundingsSelect.PREFIX_SINGLE) >= 0) {
-                    String tmp = part.replace(SoundingsSelect.PREFIX_SINGLE, "");
+                    String tmp = part.replace(
+                        SoundingsSelect.PREFIX_SINGLE, "");
 
                     try {
                         int i = Integer.parseInt(tmp);
@@ -64,7 +65,8 @@
                         }
                     }
                     catch (NumberFormatException nfe) {
-                        log.warn("Cannot parse int from string: '" + tmp + "'");
+                        log.warn(
+                            "Cannot parse int from string: '" + tmp + "'");
                     }
                 }
             }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/DGMAccess.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/DGMAccess.java	Fri Jan 19 11:23:42 2018 +0100
@@ -1,3 +1,11 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
 package org.dive4elements.river.artifacts.access;
 
 import org.dive4elements.river.artifacts.D4EArtifact;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/ExtremeAccess.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/ExtremeAccess.java	Fri Jan 19 11:23:42 2018 +0100
@@ -91,12 +91,18 @@
                 return null;
             }
             ranges = new ArrayList<RangeWithValues>();
-            DoubleUtil.parseSegments(rangesS, new DoubleUtil.SegmentCallback() {
-                @Override
-                public void newSegment(double from, double to, double [] values) {
-                    ranges.add(new RangeWithValues(from, to, values));
-                }
-            });
+            DoubleUtil.parseSegments(
+                rangesS,
+                new DoubleUtil.SegmentCallback() {
+                    @Override
+                    public void newSegment(
+                        double from,
+                        double to,
+                        double [] values
+                    ) {
+                        ranges.add(new RangeWithValues(from, to, values));
+                    }
+                });
         }
 
         if (log.isDebugEnabled()) {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/IsOfficialAccess.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/IsOfficialAccess.java	Fri Jan 19 11:23:42 2018 +0100
@@ -11,7 +11,7 @@
 import org.dive4elements.river.artifacts.D4EArtifact;
 
 
-/** Access data used to mark whether a certain Wst columns is an official line. */
+/** Access data used to mark a certain Wst column as an official line. */
 public class IsOfficialAccess extends Access
 {
     protected Boolean isOfficial;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/RangeAccess.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/RangeAccess.java	Fri Jan 19 11:23:42 2018 +0100
@@ -87,7 +87,9 @@
         if (locationStr == null || locationStr.length() == 0) {
             if (getArtifact() instanceof WINFOArtifact) {
                 WINFOArtifact winfo = (WINFOArtifact) getArtifact();
-                if (winfo.getReferenceStartKm() != null && winfo.getReferenceEndKms() != null) {
+                if (winfo.getReferenceStartKm() != null
+                    && winfo.getReferenceEndKms() != null
+                ) {
                     return new double[]
                         {
                             winfo.getReferenceStartKm().doubleValue(),
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/SedimentLoadAccess.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/SedimentLoadAccess.java	Fri Jan 19 11:23:42 2018 +0100
@@ -18,7 +18,8 @@
 public class SedimentLoadAccess
 extends      RangeAccess
 {
-    private static final Logger log = Logger.getLogger(SedimentLoadAccess.class);
+    private static final Logger log = Logger.getLogger(
+        SedimentLoadAccess.class);
 
     private String time;
     private String unit;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/context/RiverContextFactory.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/context/RiverContextFactory.java	Fri Jan 19 11:23:42 2018 +0100
@@ -103,11 +103,14 @@
     public static final String XPATH_RIVER_WMS =
         "/artifact-database/floodmap/river";
 
-    public static final String XPATH_MODULES = "/artifact-database/modules/module";
+    public static final String XPATH_MODULES =
+        "/artifact-database/modules/module";
 
-    private static final String XPATH_ZOOM_SCALES = "/artifact-database/options/zoom-scales/zoom-scale";
+    private static final String XPATH_ZOOM_SCALES =
+        "/artifact-database/options/zoom-scales/zoom-scale";
 
-    private static final String XPATH_DGM_PATH = "/artifact-database/options/dgm-path/text()";
+    private static final String XPATH_DGM_PATH =
+        "/artifact-database/options/dgm-path/text()";
 
     private static GlobalContext GLOBAL_CONTEXT_INSTANCE;
 
@@ -205,7 +208,10 @@
      * @param config the config document.
      * @param context the RiverContext.
      */
-    protected void configureTransitions(Document config, RiverContext context) {
+    protected void configureTransitions(
+        Document config,
+        RiverContext context
+    ) {
         TransitionEngine engine = new TransitionEngine();
 
         List<Document> artifacts = getArtifactConfigurations(config);
@@ -231,7 +237,8 @@
                 "Artifact '" + artName + "' has " + trans + " transitions.");
 
             for (int i = 0; i < trans; i++) {
-                Transition t = TransitionFactory.createTransition(list.item(i));
+                Transition t = TransitionFactory.createTransition(
+                    list.item(i));
                 String     s = t.getFrom();
                 engine.addTransition(s, t);
             }
@@ -267,7 +274,8 @@
             if (!xlink.isEmpty()) {
                 File file = new File(xlink);
                 if (!file.isFile() || !file.canRead()) {
-                    log.warn("Artifact configuration '" + file + "' not found.");
+                    log.warn("Artifact configuration '"
+                        + file + "' not found.");
                 } else {
                     Document doc = XMLUtils.parseDocument(file);
                     if (doc != null) {
@@ -335,8 +343,10 @@
      * @param config the config document.
      * @param context the RiverContext.
      */
-    protected void configureOutGenerators(Document config, RiverContext context){
-
+    protected void configureOutGenerators(
+        Document config,
+        RiverContext context
+    ) {
         NodeList outGenerators = (NodeList) XMLUtils.xpath(
             config,
             XPATH_OUTPUT_GENERATORS,
@@ -403,7 +413,8 @@
                 cis = new ArrayList<ContextInjector>();
                 for (String injector: injectors.split("[\\s,]+")) {
                     try {
-                        ContextInjector ci = (ContextInjector)Class.forName(injector)
+                        ContextInjector ci = (ContextInjector)Class
+                            .forName(injector)
                             .newInstance();
                         ci.setup(item);
                         cis.add(ci);
@@ -511,11 +522,15 @@
 
         log.debug("Parse theme cfg: " + themeConfig);
 
-        return XMLUtils.parseDocument(new File(themeConfig), true, XMLUtils.CONF_RESOLVER);
+        return XMLUtils.parseDocument(
+            new File(themeConfig), true, XMLUtils.CONF_RESOLVER);
     }
 
 
-    protected void configureThemesMappings(Document cfg, RiverContext context) {
+    protected void configureThemesMappings(
+        Document cfg,
+        RiverContext context
+    ) {
         log.debug("RiverContextFactory.configureThemesMappings");
 
         Document config = getThemeConfig(cfg);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/DBConfig.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/DBConfig.java	Fri Jan 19 11:23:42 2018 +0100
@@ -58,7 +58,8 @@
 
 
     public static final String DEFAULT_URL =
-        "jdbc:h2:mem:datacage;INIT=RUNSCRIPT FROM '${artifacts.config.dir}/datacage.sql'";
+        "jdbc:h2:mem:datacage;"
+        + "INIT=RUNSCRIPT FROM '${artifacts.config.dir}/datacage.sql'";
 
     public static final String RESOURCE_PATH = "/datacage-sql";
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/Datacage.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/Datacage.java	Fri Jan 19 11:23:42 2018 +0100
@@ -262,7 +262,8 @@
             final String  collectionName,
             final Date    collectionCreated
         ) {
-            Integer c = getId(collections, collectionId, SQL_COLLECTION_BY_GID);
+            Integer c = getId(
+                collections, collectionId, SQL_COLLECTION_BY_GID);
 
             if (c != null) {
                 return c;
@@ -285,9 +286,10 @@
                     stmnt.setString(2, collectionId);
                     stmnt.setInt   (3, ownerId);
                     setString(stmnt, 4, collectionName);
-                    Timestamp timestamp = new Timestamp(collectionCreated != null
-                        ? collectionCreated.getTime()
-                        : System.currentTimeMillis());
+                    Timestamp timestamp =
+                        new Timestamp(collectionCreated != null
+                            ? collectionCreated.getTime()
+                            : System.currentTimeMillis());
                     stmnt.setTimestamp(5, timestamp);
                     stmnt.execute();
                     conn.commit();
@@ -504,7 +506,8 @@
         }
 
         if (!(artifact instanceof D4EArtifact)) {
-            log.warn("need D4EArtifact here (have " + artifact.getClass() + ")");
+            log.warn("need D4EArtifact here (have "
+                + artifact.getClass() + ")");
             return;
         }
 
@@ -551,7 +554,8 @@
     ) {
         log.debug("storedArtifact");
         if (!(artifact instanceof D4EArtifact)) {
-            log.warn("need D4EArtifact here but have a " + artifact.getClass());
+            log.warn("need D4EArtifact here but have a "
+                + artifact.getClass());
             return;
         }
 
@@ -905,7 +909,8 @@
         };
 
         if (!exec.runWrite()) {
-            log.error("storing state of artifact failed ("+artifactId+","+artifact.getCurrentStateId()+")");
+            log.error("storing state of artifact failed ("
+                + artifactId + "," + artifact.getCurrentStateId() + ")");
         }
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/Builder.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/Builder.java	Fri Jan 19 11:23:42 2018 +0100
@@ -218,7 +218,8 @@
 
                     String macroName = ((Element)node).getAttribute("name");
                     Node inMacroNode =
-                        findSelectNode(getMacroChildren(macroName), selectName);
+                        findSelectNode(
+                            getMacroChildren(macroName), selectName);
                     if (inMacroNode != null) {
                         return inMacroNode;
                     }
@@ -260,7 +261,8 @@
             String container = expand(current.getAttribute("container"));
 
             if (container.isEmpty()) {
-                log.warn("dc:container-context: no 'container' attribute found");
+                log.warn(
+                    "dc:container-context: no 'container' attribute found");
                 return;
             }
 
@@ -272,7 +274,8 @@
                 return;
             }
 
-            String [][] properties = extractProperties((Element)propertiesNode);
+            String [][] properties = extractProperties(
+                (Element)propertiesNode);
 
             if (properties.length == 0) {
                 log.warn("dc:properties: No properties defined.");
@@ -288,7 +291,8 @@
                 c = Arrays.asList((Object [])c);
             }
             if (!(c instanceof Collection)) {
-                log.warn("dc:container-context: container is not a collection.");
+                log.warn(
+                    "dc:container-context: container is not a collection.");
                 return;
             }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/BuilderPool.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/BuilderPool.java	Fri Jan 19 11:23:42 2018 +0100
@@ -72,7 +72,8 @@
             log.error(pce);
         }
 
-        log.error("Returning original document. This will lead to threading issues.");
+        log.error("Returning original document. "
+            + "This will lead to threading issues.");
 
         return document;
     }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/FunctionResolver.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/FunctionResolver.java	Fri Jan 19 11:23:42 2018 +0100
@@ -459,7 +459,10 @@
         return "";
     }
 
-    public static Set<String> allStateSuccessors(String artifactName, String stateId) {
+    public static Set<String> allStateSuccessors(
+        String artifactName,
+        String stateId
+    ) {
         GlobalContext gc = RiverContextFactory.getGlobalContext();
         if (gc == null) {
             return Collections.<String>emptySet();
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/TypeConverter.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/TypeConverter.java	Fri Jan 19 11:23:42 2018 +0100
@@ -58,7 +58,8 @@
                 return object;
             }
             try {
-                return new Timestamp((long)Double.parseDouble(object.toString()));
+                return new Timestamp(
+                    (long)Double.parseDouble(object.toString()));
             }
             catch (NumberFormatException nfe) {
                 log.warn(nfe);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/geom/Lines.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/geom/Lines.java	Fri Jan 19 11:23:42 2018 +0100
@@ -43,8 +43,10 @@
      * @return area of polygon with four vertices.
      */
     public static double area(Point2D p1, Point2D p2, Point2D p3, Point2D p4) {
-        double[] x = new double[] {p1.getX(), p2.getX(), p3.getX(), p4.getX(), p1.getX() };
-        double[] y = new double[] {p1.getY(), p2.getY(), p3.getY(), p4.getY(), p1.getY() };
+        double[] x = new double[] {
+            p1.getX(), p2.getX(), p3.getX(), p4.getX(), p1.getX() };
+        double[] y = new double[] {
+            p1.getY(), p2.getY(), p3.getY(), p4.getY(), p1.getY() };
         double area = 0d;
         for (int i=0; i <4; i++) {
             area += (x[i] * y[i+1]) - (x[i+1] * y[i]);
@@ -88,8 +90,10 @@
      * @return A list of Lines representing the water surface and the
      *         calculated area between water surface and river bed.
      */
-    public static ListWithArea fillWater(List<Point2D> points, double waterLevel) {
-
+    public static ListWithArea fillWater(
+        List<Point2D> points,
+        double waterLevel
+    ) {
         boolean debug = log.isDebugEnabled();
 
         if (debug) {
@@ -222,7 +226,8 @@
             // TODO trigger area calculation
             if (p1W || p2W) {
                 if (debug) {
-                    log.debug("water hits vertex: " + p1 + " " + p2 + " " + mode);
+                    log.debug("water hits vertex: "
+                        + p1 + " " + p2 + " " + mode);
                 }
                 if (p1W && p2W) { // parallel to water -> dry
                     log.debug("water hits both vertices");
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/map/RiverMapfileGeneratorStarter.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/map/RiverMapfileGeneratorStarter.java	Fri Jan 19 11:23:42 2018 +0100
@@ -23,7 +23,8 @@
  */
 public class RiverMapfileGeneratorStarter implements LifetimeListener {
 
-    private static Logger log = Logger.getLogger(RiverMapfileGeneratorStarter.class);
+    private static Logger log = Logger.getLogger(
+        RiverMapfileGeneratorStarter.class);
 
     @Override
     public void setup(Document document) {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/math/StdDevOutlier.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/math/StdDevOutlier.java	Fri Jan 19 11:23:42 2018 +0100
@@ -39,7 +39,8 @@
         boolean debug = log.isDebugEnabled();
 
         if (debug) {
-            log.debug("factor for std dev test (that calculates std err): " + factor);
+            log.debug("factor for std dev test (that calculates std err): "
+                + factor);
         }
 
         int N = values.size();
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/AreaFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/AreaFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -120,7 +120,13 @@
         protected boolean doPaintBetween;
 
         /** Create a new result data bundle. */
-        public Data(String upperFacetName, String lowerFacetName, Object low, Object up, boolean between) {
+        public Data(
+            String upperFacetName,
+            String lowerFacetName,
+            Object low,
+            Object up,
+            boolean between
+        ) {
             this.lowerData      = low;
             this.upperData      = up;
             this.doPaintBetween = between;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/Calculation4.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/Calculation4.java	Fri Jan 19 11:23:42 2018 +0100
@@ -168,7 +168,9 @@
                     s2 = segments.get(0);
                     Arrays.fill(functions, Identity.IDENTITY);
                 }
-                else if (pos >= segments.get(segments.size()-1).referencePoint) {
+                else if (
+                    pos >= segments.get(segments.size()-1).referencePoint
+                ) {
                     // after last segment -> "gleichwertig"
                     if (debug) {
                         log.debug("after last segment -> gleichwertig");
@@ -195,8 +197,9 @@
                         Segment si1 = segments.get(i-1);
                         Segment si  = segments.get(i);
                         if (debug) {
-                            log.debug("check " + pos + " in " +
-                                si1.referencePoint + " - " + si.referencePoint);
+                            log.debug("check " + pos + " in "
+                                + si1.referencePoint + " - "
+                                + si.referencePoint);
                         }
                         if (pos >= si1.referencePoint
                         &&  pos <= si. referencePoint) {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/Calculation6.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/Calculation6.java	Fri Jan 19 11:23:42 2018 +0100
@@ -167,7 +167,8 @@
     protected List<DischargeTable> fetchDischargeTables(Gauge gauge) {
 
         List<DischargeTable> all = gauge.getDischargeTables();
-        List<DischargeTable> relevant = new ArrayList<DischargeTable>(all.size());
+        List<DischargeTable> relevant =
+            new ArrayList<DischargeTable>(all.size());
 
         for (DischargeTable dt: all) {
             if (isDischargeTableRelevant(dt)) {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/ConstantWQKms.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/ConstantWQKms.java	Fri Jan 19 11:23:42 2018 +0100
@@ -31,7 +31,12 @@
         this(kms, qs, ws, "");
     }
 
-    public ConstantWQKms(double [] kms, double [] qs, double [] ws, String name) {
+    public ConstantWQKms(
+        double [] kms,
+        double [] qs,
+        double [] ws,
+        String name
+    ) {
         super(kms, qs, ws, name);
     }
 }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/CrossSectionFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/CrossSectionFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -122,7 +122,8 @@
     /** Do a deep copy. */
     @Override
     public Facet deepCopy() {
-        CrossSectionFacet copy = new CrossSectionFacet(this.index, this.description);
+        CrossSectionFacet copy = new CrossSectionFacet(
+            this.index, this.description);
         copy.set(this);
         return copy;
     }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/CrossSectionWaterLineFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/CrossSectionWaterLineFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -49,7 +49,11 @@
      * @param name 'type' of this facet.
      * @param description (maybe) localized user-visible description.
      */
-    public CrossSectionWaterLineFacet(int idx, String name, String description) {
+    public CrossSectionWaterLineFacet(
+        int idx,
+        String name,
+        String description
+    ) {
         super(idx, name, description);
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/DifferenceCurveFilterFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/DifferenceCurveFilterFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -1,3 +1,11 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
 package org.dive4elements.river.artifacts.model;
 
 import org.dive4elements.artifactdatabase.state.Facet;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/FacetTypes.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/FacetTypes.java	Fri Jan 19 11:23:42 2018 +0100
@@ -189,6 +189,8 @@
         SQF("sq_relation_f"),
         HD("historical_discharge"),
         HDWQ("historical_discharge_wq");
+        // FIXME: do we need this? and why?
+    	// SFD("sinfo_flow_depth");
 
         private String chartTypeString;
 
@@ -231,8 +233,10 @@
 
     String DISCHARGE_LONGITUDINAL_W = "discharge_longitudinal_section.w";
     String DISCHARGE_LONGITUDINAL_Q = "discharge_longitudinal_section.q";
-    String DISCHARGE_LONGITUDINAL_Q_INFOLD = "discharge_longitudinal_section.q.infolding";
-    String DISCHARGE_LONGITUDINAL_Q_INFOLD_CUT = "discharge_longitudinal_section.q.cutting";
+    String DISCHARGE_LONGITUDINAL_Q_INFOLD =
+        "discharge_longitudinal_section.q.infolding";
+    String DISCHARGE_LONGITUDINAL_Q_INFOLD_CUT =
+        "discharge_longitudinal_section.q.cutting";
     String DISCHARGE_LONGITUDINAL_C = "discharge_longitudinal_section.c";
 
     String LONGITUDINAL_W = "longitudinal_section.w";
@@ -287,9 +291,11 @@
     String REPORT = "report";
 
     String HISTORICAL_DISCHARGE_Q      = "historical_discharge.historicalq";
-    String HISTORICAL_DISCHARGE_Q_DIFF = "historical_discharge.historicalq.diff";
+    String HISTORICAL_DISCHARGE_Q_DIFF =
+        "historical_discharge.historicalq.diff";
     String HISTORICAL_DISCHARGE_W      = "historical_discharge.historicalw";
-    String HISTORICAL_DISCHARGE_W_DIFF = "historical_discharge.historicalw.diff";
+    String HISTORICAL_DISCHARGE_W_DIFF =
+        "historical_discharge.historicalw.diff";
     String HISTORICAL_DISCHARGE_WQ_Q   = "historical_discharge.wq.q";
     String HISTORICAL_DISCHARGE_WQ_W   = "historical_discharge.wq.w";
 
@@ -300,8 +306,10 @@
     String FLOW_VELOCITY_TOTALCHANNEL          = "flow_velocity.totalchannel";
     /** Also called SHEAR_STRESS. */
     String FLOW_VELOCITY_TAU                   = "flow_velocity.tau";
-    String FLOW_VELOCITY_MAINCHANNEL_FILTERED  = "flow_velocity.mainchannel.filtered";
-    String FLOW_VELOCITY_TOTALCHANNEL_FILTERED = "flow_velocity.totalchannel.filtered";
+    String FLOW_VELOCITY_MAINCHANNEL_FILTERED  =
+        "flow_velocity.mainchannel.filtered";
+    String FLOW_VELOCITY_TOTALCHANNEL_FILTERED =
+        "flow_velocity.totalchannel.filtered";
     String FLOW_VELOCITY_TAU_FILTERED          = "flow_velocity.tau.filtered";
     String FLOW_VELOCITY_ANNOTATION            = "flow_velocity.annotation";
     String FLOW_VELOCITY_MEASUREMENT           = "flow_velocity.measurement";
@@ -311,33 +319,46 @@
     String MIDDLE_BED_HEIGHT_SINGLE     = "bedheight_middle.single";
     String MIDDLE_BED_HEIGHT_ANNOTATION = "bedheight_middle.annotation";
 
-    String BED_QUALITY_DATA_FACET                = "bed_longitudinal_section";
-    String BED_QUALITY_POROSITY_TOPLAYER         =  BED_QUALITY_DATA_FACET + ".porosity.toplayer";
-    String BED_QUALITY_POROSITY_SUBLAYER         =  BED_QUALITY_DATA_FACET + ".porosity.sublayer";
-    String BED_QUALITY_BED_DIAMETER_TOPLAYER     =  BED_QUALITY_DATA_FACET + ".diameter.toplayer";
-    String BED_QUALITY_BED_DIAMETER_SUBLAYER     =  BED_QUALITY_DATA_FACET + ".diameter.sublayer";
-    String BED_QUALITY_SEDIMENT_DENSITY_TOPLAYER =  BED_QUALITY_DATA_FACET + ".density.toplayer";
-    String BED_QUALITY_SEDIMENT_DENSITY_SUBLAYER =  BED_QUALITY_DATA_FACET + ".density.sublayer";
-    String BED_QUALITY_BEDLOAD_DIAMETER          =  BED_QUALITY_DATA_FACET + ".diameter.bedload";
-    String BED_DIAMETER_DATA_TOP                 =  BED_QUALITY_DATA_FACET + ".diameter.toplayer.data";
-    String BED_DIAMETER_DATA_SUB                 =  BED_QUALITY_DATA_FACET + ".diameter.sublayer.data";
-    String BEDLOAD_DIAMETER_DATA                 =  BED_QUALITY_DATA_FACET + ".diameter.bedload.data";
-    String POROSITY                              = "porosity";
+    String BED_QUALITY_DATA_FACET = "bed_longitudinal_section";
+    String BED_QUALITY_POROSITY_TOPLAYER =
+        BED_QUALITY_DATA_FACET + ".porosity.toplayer";
+    String BED_QUALITY_POROSITY_SUBLAYER =
+        BED_QUALITY_DATA_FACET + ".porosity.sublayer";
+    String BED_QUALITY_BED_DIAMETER_TOPLAYER =
+        BED_QUALITY_DATA_FACET + ".diameter.toplayer";
+    String BED_QUALITY_BED_DIAMETER_SUBLAYER =
+        BED_QUALITY_DATA_FACET + ".diameter.sublayer";
+    String BED_QUALITY_SEDIMENT_DENSITY_TOPLAYER =
+        BED_QUALITY_DATA_FACET + ".density.toplayer";
+    String BED_QUALITY_SEDIMENT_DENSITY_SUBLAYER =
+        BED_QUALITY_DATA_FACET + ".density.sublayer";
+    String BED_QUALITY_BEDLOAD_DIAMETER =
+        BED_QUALITY_DATA_FACET + ".diameter.bedload";
+    String BED_DIAMETER_DATA_TOP =
+        BED_QUALITY_DATA_FACET + ".diameter.toplayer.data";
+    String BED_DIAMETER_DATA_SUB =
+        BED_QUALITY_DATA_FACET + ".diameter.sublayer.data";
+    String BEDLOAD_DIAMETER_DATA =
+        BED_QUALITY_DATA_FACET + ".diameter.bedload.data";
+    String POROSITY = "porosity";
 
-    String BED_DIFFERENCE_YEAR                   = "bedheight_difference.year";
-    String BED_DIFFERENCE_YEAR_FILTERED          = "bedheight_difference.year.filtered";
-    String BED_DIFFERENCE_HEIGHT_YEAR            = "bedheight_difference.height_year";
-    String BED_DIFFERENCE_HEIGHT_YEAR_FILTERED   = "bedheight_difference.height_year.filtered";
-    String BED_DIFFERENCE_YEAR_HEIGHT1           = "bedheight_difference.year.height1";
-    String BED_DIFFERENCE_YEAR_HEIGHT2           = "bedheight_difference.year.height2";
-    String BED_DIFFERENCE_YEAR_HEIGHT1_FILTERED  = "bedheight_difference.year.height1.filtered";
-    String BED_DIFFERENCE_YEAR_HEIGHT2_FILTERED  = "bedheight_difference.year.height2.filtered";
+    String BED_DIFFERENCE_YEAR = "bedheight_difference.year";
+    String BED_DIFFERENCE_YEAR_FILTERED = "bedheight_difference.year.filtered";
+    String BED_DIFFERENCE_HEIGHT_YEAR = "bedheight_difference.height_year";
+    String BED_DIFFERENCE_HEIGHT_YEAR_FILTERED =
+        "bedheight_difference.height_year.filtered";
+    String BED_DIFFERENCE_YEAR_HEIGHT1 = "bedheight_difference.year.height1";
+    String BED_DIFFERENCE_YEAR_HEIGHT2 = "bedheight_difference.year.height2";
+    String BED_DIFFERENCE_YEAR_HEIGHT1_FILTERED =
+        "bedheight_difference.year.height1.filtered";
+    String BED_DIFFERENCE_YEAR_HEIGHT2_FILTERED =
+        "bedheight_difference.year.height2.filtered";
 
     String MORPHOLOGIC_WIDTH = "morph-width";
 
-    String SEDIMENT_DENSITY            = "sediment.density";
+    String SEDIMENT_DENSITY = "sediment.density";
 
-    String SQ_OVERVIEW       = "sq_overview";
+    String SQ_OVERVIEW = "sq_overview";
 
     String SQ_A_CURVE       = "sq_a_curve";
     String SQ_A_MEASUREMENT = "sq_a_measurement";
@@ -409,7 +430,8 @@
     String SQ_E_MEASUREMENT_OV = "sq_e_measurement_overview";
     String SQ_E_OUTLIER_OV     = "sq_e_outlier_overview";
     String SQ_E_OUTLIER_CURVE_OV = "sq_e_outlier_curve_overview";
-    String SQ_E_OUTLIER_MEASUREMENT_OV = "sq_e_outlier_curve_measurement_overview";
+    String SQ_E_OUTLIER_MEASUREMENT_OV =
+        "sq_e_outlier_curve_measurement_overview";
 
     String SQ_F_CURVE_OV       = "sq_f_curve_overview";
     String SQ_F_MEASUREMENT_OV = "sq_f_measurement_overview";
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/FlowVelocityFilterFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/FlowVelocityFilterFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -28,7 +28,8 @@
  */
 public class FlowVelocityFilterFacet extends DataFacet {
 
-    private static Logger log = Logger.getLogger(FlowVelocityFilterFacet.class);
+    private static Logger log = Logger.getLogger(
+        FlowVelocityFilterFacet.class);
 
     public FlowVelocityFilterFacet() {
         // required for clone operation deepCopy()
@@ -70,9 +71,12 @@
             FlowVelocityData oldData = data[index];
             FlowVelocityData newData = new FlowVelocityData();
             double[][] q = oldData.getQPoints();
-            double[][] totalV = MovingAverage.weighted(oldData.getTotalChannelPoints(), radius);
-            double[][] mainV = MovingAverage.weighted(oldData.getMainChannelPoints(), radius);
-            double[][] tau = MovingAverage.weighted(oldData.getTauPoints(), radius);
+            double[][] totalV = MovingAverage.weighted(
+                oldData.getTotalChannelPoints(), radius);
+            double[][] mainV = MovingAverage.weighted(
+                oldData.getMainChannelPoints(), radius);
+            double[][] tau = MovingAverage.weighted(
+                oldData.getTauPoints(), radius);
             for(int j = 0; j < q[0].length; j++) {
                 newData.addKM(q[0][j]);
                 newData.addQ(q[1][j]);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/GaugeDischargeCurveFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/GaugeDischargeCurveFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -97,7 +97,8 @@
             }
             return new WQKms(kms, values[0], values[1], name);
         }
-        double[] ws = transformToM(values[1], ((Number)pnpObject).doubleValue());
+        double[] ws = transformToM(
+            values[1], ((Number)pnpObject).doubleValue());
 
         return new WQKms(kms, values[0], ws, name);
     }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/HYKFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/HYKFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -52,12 +52,14 @@
 
         List<DataProvider> providers = context.getDataProvider(dataKey);
         if (providers.size() < 1) {
-            log.warn("Could not find Cross-Section data provider to get master cs km.");
+            log.warn("Could not find Cross-Section data provider "
+                + "to get master cs km.");
             return null;
         }
 
-        FastCrossSectionLine crossSection = (FastCrossSectionLine) providers.get(0)
-            .provideData(dataKey, null, context);
+        FastCrossSectionLine crossSection =
+            (FastCrossSectionLine)providers.get(0).provideData(
+                dataKey, null, context);
 
         if(crossSection == null) {
             log.debug("getData: crossSection is null");
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/HistoricalWQTimerange.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/HistoricalWQTimerange.java	Fri Jan 19 11:23:42 2018 +0100
@@ -26,7 +26,12 @@
     public static class HistoricalTimerangeItem extends TimerangeItem {
         public double diff;
 
-        public HistoricalTimerangeItem (Timerange timerange, double q, double w, double diff) {
+        public HistoricalTimerangeItem(
+            Timerange timerange,
+            double q,
+            double w,
+            double diff
+        ) {
             super(timerange, q, w);
             this.diff = diff;
         }
@@ -82,9 +87,11 @@
 
     @Override
     public List<TimerangeItem> sort() {
-        ArrayList<TimerangeItem> items = new ArrayList<TimerangeItem>(timeranges.size());
+        ArrayList<TimerangeItem> items =
+            new ArrayList<TimerangeItem>(timeranges.size());
         for (int i = 0, n = size(); i < n; i++) {
-            items.add(new HistoricalTimerangeItem(getTimerange(i), getQ(i), getW(i), diffs.get(i)));
+            items.add(new HistoricalTimerangeItem(
+                    getTimerange(i), getQ(i), getW(i), diffs.get(i)));
         }
 
         Collections.sort(items);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/MainValuesQFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/MainValuesQFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -53,7 +53,10 @@
      * curve in WQDay (if hit).
      * Employ linear interpolation.
      */
-    protected static void setHitPoint(WQDay wqday, StickyAxisAnnotation annotation) {
+    protected static void setHitPoint(
+        WQDay wqday,
+        StickyAxisAnnotation annotation
+    ) {
 
         float q = annotation.getPos();
         Double day = wqday.interpolateDayByQ(q);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/MainValuesWFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/MainValuesWFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -49,7 +49,10 @@
      * curve in WQDay (if hit).
      * Employ linear interpolation.
      */
-    protected static void setHitPoint(WQDay wqday, StickyAxisAnnotation annotation) {
+    protected static void setHitPoint(
+        WQDay wqday,
+        StickyAxisAnnotation annotation
+    ) {
         float w = annotation.getPos();
 
         Double day = wqday.interpolateDayByW(w);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/ManagedFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/ManagedFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -152,11 +152,14 @@
         ManagedFacet otherFacet = (ManagedFacet) other;
         return  this.getVisible() == otherFacet.getVisible() &&
                 this.getActive() == otherFacet.getActive() &&
-                CompareUtil.areSame(this.getArtifact(), otherFacet.getArtifact()) &&
+                CompareUtil.areSame(
+                    this.getArtifact(), otherFacet.getArtifact()) &&
                 this.getIndex() == otherFacet.getIndex() &&
                 CompareUtil.areSame(this.getName(), otherFacet.getName()) &&
-                CompareUtil.areSame(this.getBoundToOut(), otherFacet.getBoundToOut()) &&
-                CompareUtil.areSame(this.getDescription(), otherFacet.getDescription());
+                CompareUtil.areSame(
+                    this.getBoundToOut(), otherFacet.getBoundToOut()) &&
+                CompareUtil.areSame(
+                    this.getDescription(), otherFacet.getDescription());
         // Missing properties are blackboard, data, position.
     }
 }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/ManualPointsFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/ManualPointsFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -26,7 +26,8 @@
 extends      DefaultFacet
 {
     /** Logger for this class. */
-    private static final Logger log = Logger.getLogger(ManualPointsFacet.class);
+    private static final Logger log = Logger.getLogger(
+        ManualPointsFacet.class);
 
 
     /**
@@ -51,7 +52,8 @@
     /**
      * Get List of ManualPoints for river from Artifact.
      *
-     * @param artifact (ManualPoints-)Artifact to query for list of ManualPoints.
+     * @param artifact (ManualPoints-)Artifact to query
+     *                 for list of ManualPoints.
      * @param context  Ignored.
      */
     @Override
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/OfficialLineFinder.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/OfficialLineFinder.java	Fri Jan 19 11:23:42 2018 +0100
@@ -206,7 +206,8 @@
         return rivers2officialLines;
     }
 
-    public static final Range MAX_RANGE = new Range(-Double.MAX_VALUE, +Double.MAX_VALUE);
+    public static final Range MAX_RANGE =
+        new Range(-Double.MAX_VALUE, +Double.MAX_VALUE);
 
     private static final String nn(String s) {
         return s != null ? s : "";
@@ -259,7 +260,10 @@
         }
     }
 
-    private static List<ValueRange> filterByRange(Range range, List<ValueRange> ranges) {
+    private static List<ValueRange> filterByRange(
+        Range range,
+        List<ValueRange> ranges
+    ) {
         List<ValueRange> list = new ArrayList<ValueRange>(ranges.size());
         for (ValueRange r: ranges) {
             if (r.intersects(range)) {
@@ -269,7 +273,10 @@
         return list;
     }
 
-    private static List<ValueRange> filterByQRange(Range range, List<ValueRange> ranges) {
+    private static List<ValueRange> filterByQRange(
+        Range range,
+        List<ValueRange> ranges
+    ) {
         List<ValueRange> list = new ArrayList<ValueRange>(ranges.size());
         for (ValueRange r: ranges) {
             if (r.intersectsValueRange(range) && !list.contains(r)) {
@@ -279,7 +286,10 @@
         return list;
     }
 
-    private static List<ValueRange> filterByQValues(double[] values, List<ValueRange> ranges) {
+    private static List<ValueRange> filterByQValues(
+        double[] values,
+        List<ValueRange> ranges
+    ) {
         List<ValueRange> list = new ArrayList<ValueRange>(ranges.size());
         for (ValueRange r: ranges) {
             for (double val: values) {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/Parameters.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/Parameters.java	Fri Jan 19 11:23:42 2018 +0100
@@ -183,7 +183,8 @@
     /**
      * Performes a binary search in the column identified by its
      * index.
-     * @return Index of found element or negative insertion point (shifted by one)
+     * @return Index of found element or negative insertion point
+     *         (shifted by one)
      */
     public int binarySearch(int columnIndex, double value) {
         TDoubleArrayList column = columns[columnIndex];
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/QRangeTree.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/QRangeTree.java	Fri Jan 19 11:23:42 2018 +0100
@@ -382,12 +382,14 @@
                 sb.append(": ").append(current.q).append("\"]\n");
                 if (current.left != null) {
                     String leftName = name(current.left);
-                    sb.append(name).append(" -- n").append(leftName).append("\n");
+                    sb.append(name).append(" -- n").append(leftName)
+                        .append("\n");
                     stack.push(current.left);
                 }
                 if (current.right != null) {
                     String rightName = name(current.right);
-                    sb.append(name).append(" -- n").append(rightName).append("\n");
+                    sb.append(name).append(" -- n").append(rightName)
+                        .append("\n");
                     stack.push(current.right);
                 }
             }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/RelativePointFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/RelativePointFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -128,7 +128,8 @@
         }
 
         Double start = (Double) providers.get(0).
-            provideData(ReferenceCurveFacet.BB_REFERENCECURVE_STARTKM, null, context);
+            provideData(
+                ReferenceCurveFacet.BB_REFERENCECURVE_STARTKM, null, context);
 
         providers = context.
             getDataProvider(ReferenceCurveFacet.BB_REFERENCECURVE_ENDKMS);
@@ -136,11 +137,13 @@
             log.warn("Could not find reference curve endkms data provider.");
         }
         double[] ends = (double[]) providers.get(0).
-            provideData(ReferenceCurveFacet.BB_REFERENCECURVE_ENDKMS, null, context);
+            provideData(
+                ReferenceCurveFacet.BB_REFERENCECURVE_ENDKMS, null, context);
 
         log.debug("Got s " + start + " e " + ends);
 
-        double startW = StaticWKmsArtifact.getWAtKmLin(wKms, start.doubleValue());
+        double startW = StaticWKmsArtifact.getWAtKmLin(
+            wKms, start.doubleValue());
         // TODO handle multiple ends.
         double endW = StaticWKmsArtifact.getWAtKmLin(wKms, ends[0]);
         log.debug("Gotw s " + startW + " e " + endW);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/Segment.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/Segment.java	Fri Jan 19 11:23:42 2018 +0100
@@ -62,7 +62,7 @@
         return from < to;
     }
 
-    /** Checks whether given km lies inside the to/from bounds of this segment. */
+    /** Checks if given km lies inside the to/from bounds of this segment. */
     public boolean inside(double km) {
         return from < to
             ? km >= from && km <= to
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WKmsFactory.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WKmsFactory.java	Fri Jan 19 11:23:42 2018 +0100
@@ -87,15 +87,22 @@
     private WKmsFactory() {
     }
 
-    public static WKms getWKms(int column, int wst_id, double from, double to) {
+    public static WKms getWKms(
+        int column,
+        int wst_id,
+        double from,
+        double to
+    ) {
         log.debug("WKmsFactory.getWKms");
         Cache cache = CacheFactory.getCache(StaticWQKmsCacheKey.CACHE_NAME);
 
-        String cacheKey = Integer.toString(column) + ":" + Integer.toString(wst_id);
+        String cacheKey = Integer.toString(column) + ":"
+            + Integer.toString(wst_id);
 
         if (cache != null) {
             if (!Double.isNaN(from) && ! Double.isNaN(to)) {
-                cacheKey += ":" + Double.toString(from) + ":" + Double.toString(to);
+                cacheKey += ":" + Double.toString(from) + ":"
+                    + Double.toString(to);
             }
             Element element = cache.get(cacheKey);
             if (element != null) {
@@ -129,7 +136,8 @@
 
     /** Get name for a WKms wrapped in W, if suitable. */
     public static String getWKmsNameWWrapped(int column, int wst_id) {
-        log.debug("WKmsFactory.getWKmsNameWWrapped c/" + column + ", wst_id/" + wst_id);
+        log.debug("WKmsFactory.getWKmsNameWWrapped c/"
+            + column + ", wst_id/" + wst_id);
 
         String name = null;
         Session session = SessionHolder.HOLDER.get();
@@ -192,7 +200,8 @@
 
     /** Get name for a WKms. */
     public static String getWKmsName(int column, int wst_id) {
-        log.debug("WKmsFactory.getWKmsName c/" + column + ", wst_id/" + wst_id);
+        log.debug("WKmsFactory.getWKmsName c/"
+            + column + ", wst_id/" + wst_id);
 
         String name = null;
         Session session = SessionHolder.HOLDER.get();
@@ -217,10 +226,15 @@
      * @param wst_id database id of the wst
      * @return according WKms.
      */
-    public static WKms getWKmsUncached(int column, int wst_id, double from, double to) {
-
+    public static WKms getWKmsUncached(
+        int column,
+        int wst_id,
+        double from,
+        double to
+    ) {
         if (log.isDebugEnabled()) {
-            log.debug("WKmsFactory.getWKmsUncached c/" + column + ", wst_id/" + wst_id);
+            log.debug("WKmsFactory.getWKmsUncached c/"
+                + column + ", wst_id/" + wst_id);
         }
 
         WKmsImpl wkms = new WKmsImpl(getWKmsName(column, wst_id));
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQDay.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQDay.java	Fri Jan 19 11:23:42 2018 +0100
@@ -25,7 +25,8 @@
 public class WQDay
 extends      WQ
 {
-    public static final Comparator<double []> FIRST_CMP = new Comparator<double []>() {
+    public static final Comparator<double []> FIRST_CMP =
+        new Comparator<double []>() {
         @Override
         public int compare(double [] a, double [] b) {
             double diff = a[0] - b[0];
@@ -71,8 +72,10 @@
         return days.getQuick(idx);
     }
 
-    private static final Double interpolateX(ArrayList<double []> dxs, double x) {
-
+    private static final Double interpolateX(
+        ArrayList<double []> dxs,
+        double x
+    ) {
         Collections.sort(dxs, FIRST_CMP);
 
         if (Math.abs(x - dxs.get(0)[1]) < EPSILON) {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQKms.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQKms.java	Fri Jan 19 11:23:42 2018 +0100
@@ -61,7 +61,12 @@
         this(kms, wq.getQs(), wq.getWs(), wq.getName());
     }
 
-    public WQKms(TDoubleArrayList kms, TDoubleArrayList qs, TDoubleArrayList ws, String name) {
+    public WQKms(
+        TDoubleArrayList kms,
+        TDoubleArrayList qs,
+        TDoubleArrayList ws,
+        String name
+    ) {
         super(qs, ws, name);
         this.kms = kms;
     }
@@ -75,7 +80,8 @@
     public static WQKms fromWKms(WKms wkms, double q) {
         TDoubleArrayList qs = new TDoubleArrayList(wkms.allKms().size());
         qs.fill(q);
-        WQKms wqkms = new WQKms(wkms.allKms(), qs, wkms.allWs(), wkms.getName());
+        WQKms wqkms =
+            new WQKms(wkms.allKms(), qs, wkms.allWs(), wkms.getName());
         return wqkms;
     }
 
@@ -184,7 +190,9 @@
         double b = getKm(s-1);
         double c = getKm(s/2);
 
-        return Math.abs(a-b) > EPS || Math.abs(a-c) > EPS || Math.abs(b-c) > EPS
+        return Math.abs(a-b) > EPS
+            || Math.abs(a-c) > EPS
+            || Math.abs(b-c) > EPS
             ? null
             : a;
     }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQKmsFactory.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQKmsFactory.java	Fri Jan 19 11:23:42 2018 +0100
@@ -147,7 +147,11 @@
         for (int i = 0, N = results.size(); i < N; i++) {
             Object[] row = results.get(i);
             // add(w, q, km)
-            if (row == null || row[0] == null || row[1] == null || row[2] == null) {
+            if (row == null
+                || row[0] == null
+                || row[1] == null
+                || row[2] == null
+            ) {
                 log.warn("A value in result for WQKms is null.");
                 continue;
             }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQTimerange.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQTimerange.java	Fri Jan 19 11:23:42 2018 +0100
@@ -92,7 +92,8 @@
     }
 
     public List<TimerangeItem> sort() {
-        ArrayList<TimerangeItem> items = new ArrayList<TimerangeItem>(timeranges.size());
+        ArrayList<TimerangeItem> items =
+            new ArrayList<TimerangeItem>(timeranges.size());
         for (int i = 0, n = size(); i < n; i++) {
             items.add(new TimerangeItem(getTimerange(i), getQ(i), getW(i)));
         }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WaterlevelFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WaterlevelFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -116,7 +116,8 @@
         if (!kmIncreasing) {
             while (idx < size && wqkms.getKm(idx) < km) {
                 if (Math.abs(wqkms.getKm(idx) - km) < 0.01d) {
-                    resultWQKms.add(wqkms.getW(idx), wqkms.getQ(idx), wqkms.getKm(idx));
+                    resultWQKms.add(
+                        wqkms.getW(idx), wqkms.getQ(idx), wqkms.getKm(idx));
                     return resultWQKms;
                 }
                 idx++;
@@ -126,18 +127,24 @@
             idx = size-1;
             while (idx > 0 && wqkms.getKm(idx) > km) {
                 if (Math.abs(wqkms.getKm(idx) - km) < 0.01d) {
-                    resultWQKms.add(wqkms.getW(idx), wqkms.getQ(idx), wqkms.getKm(idx));
+                    resultWQKms.add(
+                        wqkms.getW(idx), wqkms.getQ(idx), wqkms.getKm(idx));
                     return resultWQKms;
                 }
                 idx--;
             }
         }
         if (Math.abs(wqkms.getKm(idx) - km) < 0.01d) {
-            resultWQKms.add(wqkms.getW(idx), wqkms.getQ(idx), wqkms.getKm(idx));
+            resultWQKms.add(
+                wqkms.getW(idx), wqkms.getQ(idx), wqkms.getKm(idx));
             return resultWQKms;
         }
 
-        if ((idx != -1) && (idx < size) && (idx - mod != -1) && (idx - mod < size)) {
+        if ((idx != -1)
+            && (idx < size)
+            && (idx - mod != -1)
+            && (idx - mod < size)
+        ) {
             double inW = Linear.linear(
                 km,
                 wqkms.getKm(idx), wqkms.getKm(idx - mod),
@@ -149,7 +156,8 @@
             resultWQKms.add(inW, inQ, km);
         }
         else {
-            log.debug("waterlevelfacet stuff " + idx + " size " + size + " mod: " + mod);
+            log.debug("waterlevelfacet stuff " + idx
+                + " size " + size + " mod: " + mod);
         }
 
         return resultWQKms;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WstValueTable.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WstValueTable.java	Fri Jan 19 11:23:42 2018 +0100
@@ -761,8 +761,11 @@
     /**
      * Interpolate W and Q values at a given km.
      */
-    public double [][] interpolateWQ(double km, int steps, Calculation errors) {
-
+    public double [][] interpolateWQ(
+        double km,
+        int steps,
+        Calculation errors
+    ) {
         int rowIndex = Collections.binarySearch(rows, new Row(km));
 
         if (rowIndex >= 0) { // direct row match
@@ -989,7 +992,10 @@
                 }
             }
             if (rowBefore != null) {
-                for (int after = rowIndex, R = rows.size(); after < R; after++) {
+                for (int after = rowIndex, R = rows.size();
+                     after < R;
+                     after++
+                ) {
                     if (!Double.isNaN(rows.get(after).ws[col])) {
                         rowAfter = rows.get(after);
                         break;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WstValueTableFactory.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WstValueTableFactory.java	Fri Jan 19 11:23:42 2018 +0100
@@ -107,7 +107,8 @@
 
         WstValueTable.Column [] columns = loadColumns(session, wst_id);
         loadQRanges(session, columns, wst_id);
-        List<WstValueTable.Row> rows = loadRows(session, wst_id, columns.length);
+        List<WstValueTable.Row> rows = loadRows(
+            session, wst_id, columns.length);
 
         WstValueTable valueTable = new WstValueTable(columns, rows);
 
@@ -149,7 +150,8 @@
 
         WstValueTable.Column [] columns = loadColumn(session, wst_id, col_pos);
         loadQRanges(session, columns, wst_id, col_pos);
-        List<WstValueTable.Row> rows = loadRowsOneColumn(session, wst_id, col_pos);
+        List<WstValueTable.Row> rows = loadRowsOneColumn(
+            session, wst_id, col_pos);
 
         WstValueTable valueTable = new WstValueTable(columns, rows);
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/extreme/ExtremeCurveFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/extreme/ExtremeCurveFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -46,7 +46,8 @@
      * @param description Description of the facet.
      */
     public ExtremeCurveFacet(String description) {
-        super(0, EXTREME_WQ_CURVE, description, ComputeType.ADVANCE, null, null);
+        super(0, EXTREME_WQ_CURVE, description,
+            ComputeType.ADVANCE, null, null);
     }
 
     /**
@@ -54,7 +55,8 @@
      * @param showBase if true, gimme different name.
      */
     public ExtremeCurveFacet(String description, boolean showBase) {
-        super(0, EXTREME_WQ_CURVE_BASE, description, ComputeType.ADVANCE, null, null);
+        super(0, EXTREME_WQ_CURVE_BASE, description,
+            ComputeType.ADVANCE, null, null);
         if (!showBase) {
             this.name = EXTREME_WQ_CURVE;
         }
@@ -62,12 +64,13 @@
 
 
     public ExtremeCurveFacet(int index, String description) {
-        super(index, EXTREME_WQ_CURVE, description, ComputeType.ADVANCE, null, null);
+        super(index, EXTREME_WQ_CURVE, description,
+            ComputeType.ADVANCE, null, null);
     }
 
 
     /**
-     * Returns the data (a curve/function) this facet provides at km given in context.
+     * Returns the data (curve) this facet provides at km given in context.
      *
      * @param artifact the owner artifact.
      * @param context  the CallContext.
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/DateUniqueMaker.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/DateUniqueMaker.java	Fri Jan 19 11:23:42 2018 +0100
@@ -1,3 +1,11 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
 package org.dive4elements.river.artifacts.model.fixings;
 
 import java.util.Date;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixAnalysisCalculation.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixAnalysisCalculation.java	Fri Jan 19 11:23:42 2018 +0100
@@ -189,8 +189,10 @@
                 ArrayList<QWD> allQWDs = new ArrayList<QWD>();
 
                 // for all Q sectors.
-                for (int qSector = qSectorStart; qSector <= qSectorEnd; ++qSector) {
-
+                for (int qSector = qSectorStart;
+                     qSector <= qSectorEnd;
+                     ++qSector
+                ) {
                     Filter filter = new AndFilter()
                         .add(kmFilter)
                         .add(new SectorFilter(qSector))
@@ -265,7 +267,8 @@
                             String avgDescription = "avg.deltawt." + qSector;
 
                             QWD avgQWD = new QWD(
-                                avgQ, avgW, avgDescription, avgDate, true, avgDw, 0);
+                                avgQ, avgW, avgDescription,
+                                avgDate, true, avgDw, 0);
 
                             qSectorAverages[qSector] = avgQWD;
                         }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixAvSectorFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixAvSectorFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -81,7 +81,8 @@
                 kmPeriods.binarySearch(currentKm);
 
             if (kmPeriodsEntry == null) {
-                log.warn("No analysis periods found for km '" + currentKm + "'");
+                log.warn("No analysis periods found for km '"
+                    + currentKm + "'");
                 return null;
             }
 
@@ -108,7 +109,8 @@
             if (qwdData == null) {
                 return null;
             }
-            return new QWDDateRange(qwdData[sectorNdx], periods[periodNdx].getDateRange());
+            return new QWDDateRange(
+                qwdData[sectorNdx], periods[periodNdx].getDateRange());
         }
         else {
             log.warn("Artifact is no instance of D4EArtifact.");
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalAnalysisFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalAnalysisFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -29,7 +29,8 @@
 implements   FacetTypes {
 
     /** House log. */
-    private static Logger log = Logger.getLogger(FixLongitudinalAnalysisFacet.class);
+    private static Logger log = Logger.getLogger(
+        FixLongitudinalAnalysisFacet.class);
 
     /** Trivial Constructor. */
     public FixLongitudinalAnalysisFacet() {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalDeviationFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalDeviationFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -34,7 +34,8 @@
 implements   FacetTypes {
 
     /** House log. */
-    private static Logger log = Logger.getLogger(FixLongitudinalDeviationFacet.class);
+    private static Logger log = Logger.getLogger(
+        FixLongitudinalDeviationFacet.class);
 
     /** Trivial Constructor. */
     public FixLongitudinalDeviationFacet() {
@@ -115,7 +116,8 @@
      */
     @Override
     public FixLongitudinalDeviationFacet deepCopy() {
-        FixLongitudinalDeviationFacet copy = new FixLongitudinalDeviationFacet();
+        FixLongitudinalDeviationFacet copy =
+            new FixLongitudinalDeviationFacet();
         copy.set(this);
         return copy;
     }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalReferenceFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixLongitudinalReferenceFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -34,7 +34,8 @@
 implements   FacetTypes {
 
     /** House log. */
-    private static Logger log = Logger.getLogger(FixLongitudinalReferenceFacet.class);
+    private static Logger log = Logger.getLogger(
+        FixLongitudinalReferenceFacet.class);
 
     /** Trivial Constructor. */
     public FixLongitudinalReferenceFacet() {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixWQCurveFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixWQCurveFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -52,7 +52,8 @@
     }
 
     public FixWQCurveFacet(int index, String description) {
-        super(index, FIX_WQ_CURVE, description, ComputeType.ADVANCE, null, null);
+        super(index, FIX_WQ_CURVE, description,
+            ComputeType.ADVANCE, null, null);
     }
 
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixingsFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixingsFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -42,8 +42,8 @@
 
     /**
      * Returns the current km from the context.
-     * If the context is null or doesn't contain a currentKm then a double value of -1 will
-     *  be returned.
+     * If the context is null or doesn't contain a currentKm
+     * then a double value of -1 will be returned.
      * @param context The CallContext instance
      * @return the current km as double
      */
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/HWSFactory.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/HWSFactory.java	Fri Jan 19 11:23:42 2018 +0100
@@ -34,14 +34,16 @@
     private static final int HWS_POINTS = 1;
 
     public static final String SQL_SELECT_LINES =
-        "SELECT hl.name, hl.geom, hl.id, hl.kind_id, hl.official, fs.name AS fed, hl.description " +
+        "SELECT hl.name, hl.geom, hl.id, hl.kind_id, hl.official, " +
+        "       fs.name AS fed, hl.description " +
         "   FROM hws_lines hl" +
         "       JOIN rivers r ON hl.river_id = r.id" +
         "       LEFT JOIN fed_states fs ON hl.fed_state_id = fs.id" +
         "   WHERE r.name = :river";
 
     public static final String SQL_SELECT_POINTS =
-        "SELECT hp.name, hp.geom, hp.id, hp.kind_id, hp.official, fs.name AS fed, hp.description " +
+        "SELECT hp.name, hp.geom, hp.id, hp.kind_id, hp.official, " +
+        "       fs.name AS fed, hp.description " +
         "   FROM hws_points hp" +
         "       JOIN rivers r ON hp.river_id = r.id" +
         "       LEFT JOIN fed_states fs ON hp.fed_state_id = fs.id" +
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/ShapeFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/ShapeFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -1,3 +1,11 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
 package org.dive4elements.river.artifacts.model.map;
 
 import java.io.File;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/WSPLGENCalculation.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/WSPLGENCalculation.java	Fri Jan 19 11:23:42 2018 +0100
@@ -22,7 +22,8 @@
 
 public class WSPLGENCalculation extends Calculation {
 
-    private static final Logger log = Logger.getLogger(WSPLGENCalculation.class);
+    private static final Logger log = Logger.getLogger(
+        WSPLGENCalculation.class);
 
     protected Map<Integer, String> errors;
     protected Map<Integer, String> warnings;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/WSPLGENJob.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/WSPLGENJob.java	Fri Jan 19 11:23:42 2018 +0100
@@ -480,7 +480,8 @@
         }
 
         log.error("Required cross section tracks missing!");
-        throw new IllegalArgumentException("Required cross section tracks missing!");
+        throw new IllegalArgumentException(
+            "Required cross section tracks missing!");
     }
 
     protected void writeDgm(PrintWriter writer)
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiameterData.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiameterData.java	Fri Jan 19 11:23:42 2018 +0100
@@ -1,3 +1,11 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
 package org.dive4elements.river.artifacts.model.minfo;
 
 import gnu.trove.TDoubleArrayList;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiameterDataFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiameterDataFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -1,3 +1,11 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
 package org.dive4elements.river.artifacts.model.minfo;
 
 import gnu.trove.TDoubleArrayList;
@@ -14,7 +22,8 @@
 public class BedDiameterDataFacet
 extends DataFacet
 {
-    private static final Logger log = Logger.getLogger(BedDiameterDataFacet.class);
+    private static final Logger log = Logger.getLogger(
+        BedDiameterDataFacet.class);
 
     public BedDiameterDataFacet() {
     }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffCalculation.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffCalculation.java	Fri Jan 19 11:23:42 2018 +0100
@@ -32,7 +32,10 @@
     public BedDiffCalculation() {
     }
 
-    public CalculationResult calculate(BedDifferencesAccess access, CallContext context) {
+    public CalculationResult calculate(
+        BedDifferencesAccess access,
+        CallContext context
+    ) {
         log.info("BedDiffCalculation.calculate");
 
         this.river     = access.getRiverName();
@@ -53,10 +56,16 @@
     }
 
     /** Get two BedHeights from factory. */
-    private static BedHeightData [] getHeightPair(int [] ids, double from, double to) {
+    private static BedHeightData [] getHeightPair(
+        int [] ids,
+        double from,
+        double to
+    ) {
         return new BedHeightData [] {
-            (BedHeightData)BedHeightFactory.getHeight("single", ids[0], from, to),
-            (BedHeightData)BedHeightFactory.getHeight("single", ids[1], from, to)
+            (BedHeightData)BedHeightFactory.getHeight(
+                "single", ids[0], from, to),
+            (BedHeightData)BedHeightFactory.getHeight(
+                "single", ids[1], from, to)
         };
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffFilterFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffFilterFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -63,7 +63,8 @@
 
             double radius = scales.getRadius(river, start, end);
             BedDiffYearResult oldData = data[index];
-            double[][] diffs = MovingAverage.weighted(oldData.getDifferencesData(), radius);
+            double[][] diffs = MovingAverage.weighted(
+                oldData.getDifferencesData(), radius);
             this.addMetaData(
                 Resources.getMsg(context.getMeta(),
                     "chart.subtitle.radius"),
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffHeightMinFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffHeightMinFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -1,3 +1,11 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
 package org.dive4elements.river.artifacts.model.minfo;
 
 import org.apache.log4j.Logger;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffHeightMinFilterFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffHeightMinFilterFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -32,13 +32,20 @@
 public class BedDiffHeightMinFilterFacet
 extends DataFacet
 {
-    private static Logger log = Logger.getLogger(BedDiffHeightMinFilterFacet.class);
+    private static Logger log = Logger.getLogger(
+        BedDiffHeightMinFilterFacet.class);
 
     public BedDiffHeightMinFilterFacet() {
     }
 
-    public BedDiffHeightMinFilterFacet(int idx, String name, String description,
-        ComputeType type, String stateId, String hash) {
+    public BedDiffHeightMinFilterFacet(
+        int idx,
+        String name,
+        String description,
+        ComputeType type,
+        String stateId,
+        String hash
+    ) {
         super(idx, name, description, type, hash, stateId);
         this.metaData.put("X", "chart.longitudinal.section.xaxis.label");
         this.metaData.put("Y", "chart.bedheight_middle.section.yaxis.label");
@@ -65,7 +72,8 @@
 
             double radius = scales.getRadius(river, start, end);
             BedDiffYearResult oldData = data[index];
-            double[][] heights = MovingAverage.weighted(oldData.getHeights1Data(), radius);
+            double[][] heights = MovingAverage.weighted(
+                oldData.getHeights1Data(), radius);
             this.addMetaData(
                 Resources.getMsg(context.getMeta(),
                     "chart.subtitle.radius"),
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffHeightSubFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffHeightSubFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -1,3 +1,11 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
 package org.dive4elements.river.artifacts.model.minfo;
 
 import org.apache.log4j.Logger;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffHeightSubFilterFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffHeightSubFilterFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -32,13 +32,20 @@
 public class BedDiffHeightSubFilterFacet
 extends DataFacet
 {
-    private static Logger log = Logger.getLogger(BedDiffHeightSubFilterFacet.class);
+    private static Logger log = Logger.getLogger(
+        BedDiffHeightSubFilterFacet.class);
 
     public BedDiffHeightSubFilterFacet() {
     }
 
-    public BedDiffHeightSubFilterFacet(int idx, String name, String description,
-        ComputeType type, String stateId, String hash) {
+    public BedDiffHeightSubFilterFacet(
+        int idx,
+        String name,
+        String description,
+        ComputeType type,
+        String stateId,
+        String hash
+    ) {
         super(idx, name, description, type, hash, stateId);
         this.metaData.put("X", "chart.longitudinal.section.xaxis.label");
         this.metaData.put("Y", "chart.bedheight_middle.section.yaxis.label");
@@ -65,7 +72,8 @@
 
             double radius = scales.getRadius(river, start, end);
             BedDiffYearResult oldData = data[index];
-            double[][] heights = MovingAverage.weighted(oldData.getHeights2Data(), radius);
+            double[][] heights = MovingAverage.weighted(
+                oldData.getHeights2Data(), radius);
             this.addMetaData(
                 Resources.getMsg(context.getMeta(),
                     "chart.subtitle.radius"),
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffPerYearFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffPerYearFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -1,3 +1,11 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
 package org.dive4elements.river.artifacts.model.minfo;
 
 import org.apache.log4j.Logger;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffPerYearFilterFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffPerYearFilterFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -30,7 +30,8 @@
 public class BedDiffPerYearFilterFacet
 extends DataFacet
 {
-    private static Logger log = Logger.getLogger(BedDiffPerYearFilterFacet.class);
+    private static Logger log = Logger.getLogger(
+        BedDiffPerYearFilterFacet.class);
 
     public BedDiffPerYearFilterFacet() {
     }
@@ -63,7 +64,8 @@
 
             double radius = scales.getRadius(river, start, end);
             BedDiffYearResult oldData = data[index];
-            double[][] diffs = MovingAverage.weighted(oldData.getHeightPerYearData(), radius);
+            double[][] diffs = MovingAverage.weighted(
+                oldData.getHeightPerYearData(), radius);
             this.addMetaData(
                 Resources.getMsg(context.getMeta(),
                     "chart.subtitle.radius"),
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightFactory.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightFactory.java	Fri Jan 19 11:23:42 2018 +0100
@@ -57,7 +57,12 @@
      * If from or to are NaN all values are returned. Otherwise only get
      * values with stations between from and to.
      */
-    public static BedHeightData getHeight(String type, int height_id, double from, double to) {
+    public static BedHeightData getHeight(
+        String type,
+        int height_id,
+        double from,
+        double to
+    ) {
         log.debug("BedHeightFactory.getHeight");
         Cache cache = CacheFactory.getCache("bedheight-value-table-static");
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightSoundingWidthFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightSoundingWidthFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -1,3 +1,11 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
 package org.dive4elements.river.artifacts.model.minfo;
 
 import java.util.List;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityCalculation.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityCalculation.java	Fri Jan 19 11:23:42 2018 +0100
@@ -137,14 +137,17 @@
             result.setDateRange(dr);
             if (!bedDiameter.isEmpty()) {
                 log.debug("Bed diameter is not empty + " + bedDiameter);
-                addValuesToResult(result, calculateBedParameter(bedMeasurements));
+                addValuesToResult(
+                    result, calculateBedParameter(bedMeasurements));
                 for (String bd : bedDiameter) {
-                    addValuesToResult(result, calculateBed(bedMeasurements, bd));
+                    addValuesToResult(
+                        result, calculateBed(bedMeasurements, bd));
                 }
             }
             if (!bedloadDiameter.isEmpty()) {
                 for (String bld : bedloadDiameter) {
-                    addValuesToResult(result, calculateBedload(loadMeasurements, bld));
+                    addValuesToResult(
+                        result, calculateBedload(loadMeasurements, bld));
                 }
             }
             results.add(result);
@@ -193,16 +196,20 @@
         }
         return new BedQualityResultValue[] {
                 new BedQualityResultValue("porosity",
-                        new double[][] {location.toNativeArray(), porositySub.toNativeArray()},
+                        new double[][] {location.toNativeArray(),
+                                        porositySub.toNativeArray()},
                         "sublayer"),
                 new BedQualityResultValue("porosity",
-                        new double[][] {location.toNativeArray(), porosityCap.toNativeArray()},
+                        new double[][] {location.toNativeArray(),
+                                        porosityCap.toNativeArray()},
                         "toplayer"),
                 new BedQualityResultValue("density",
-                        new double[][] {location.toNativeArray(), densitySub.toNativeArray()},
+                        new double[][] {location.toNativeArray(),
+                                        densitySub.toNativeArray()},
                         "sublayer"),
                 new BedQualityResultValue("density",
-                        new double[][] {location.toNativeArray(), densityCap.toNativeArray()},
+                        new double[][] {location.toNativeArray(),
+                                        densityCap.toNativeArray()},
                         "toplayer")};
     }
 
@@ -230,10 +237,12 @@
         }
         return new BedQualityResultValue[] {
                 new BedQualityResultValue(diameter,
-                        new double[][] {location.toNativeArray(), avDiameterSub.toNativeArray()},
+                        new double[][] {location.toNativeArray(),
+                                        avDiameterSub.toNativeArray()},
                         "sublayer"),
                 new BedQualityResultValue(diameter,
-                        new double[][] {location.toNativeArray(), avDiameterCap.toNativeArray()},
+                        new double[][] {location.toNativeArray(),
+                                        avDiameterCap.toNativeArray()},
                         "toplayer")};
     }
 
@@ -281,7 +290,8 @@
         }
         return new BedQualityResultValue[] {
             new BedQualityResultValue(diameter,
-                new double[][] {location.toNativeArray(), avDiameter.toNativeArray()},
+                new double[][] {location.toNativeArray(),
+                                avDiameter.toNativeArray()},
                 "bedload")};
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityDataFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityDataFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -28,15 +28,23 @@
 
     private static Logger log = Logger.getLogger(BedQualityDataFacet.class);
 
-    private String valueName; /* Name of the ResultValue underlying this facet */
-    private String valueType; /* Type of the ResultValue underlying this facet */
+    private String valueName; /* Name of ResultValue underlying this facet */
+    private String valueType; /* Type of ResultValue underlying this facet */
 
     public BedQualityDataFacet() {
         // required for clone operation deepCopy()
     }
 
-    public BedQualityDataFacet(int idx, String name, String description,
-        ComputeType type, String stateId, String hash, String valueName, String valueType) {
+    public BedQualityDataFacet(
+        int idx,
+        String name,
+        String description,
+        ComputeType type,
+        String stateId,
+        String hash,
+        String valueName,
+        String valueType
+    ) {
         super(idx, name, description, type, hash, stateId);
         this.valueName = valueName;
         this.valueType = valueType;
@@ -44,7 +52,8 @@
         if (!valueName.equals("porosity") && !valueName.equals("density")) {
             this.metaData.put("Y", "chart.bedquality.yaxis.label.diameter");
         } else {
-            this.metaData.put("Y", "chart.bedquality.yaxis.label." + valueName);
+            this.metaData.put(
+                "Y", "chart.bedquality.yaxis.label." + valueName);
         }
     }
 
@@ -54,12 +63,13 @@
 
         D4EArtifact flys = (D4EArtifact) artifact;
 
-        CalculationResult res = (CalculationResult) flys.compute(context, hash,
-            stateId, type, false);
+        CalculationResult res = (CalculationResult)flys.compute(
+            context, hash, stateId, type, false);
 
         int ndx = index >> 8;
         BedQualityResultValue value =
-            ((BedQualityResult[]) res.getData())[ndx].getValue(valueName, valueType);
+            ((BedQualityResult[]) res.getData())[ndx].getValue(
+                valueName, valueType);
 
         if (value == null) {
             /* Other facets check this so we do too */
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityInterpolFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityInterpolFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -27,17 +27,26 @@
 
     private static final long serialVersionUID = 1L;
 
-    private static Logger log = Logger.getLogger(BedQualityInterpolFacet.class);
+    private static Logger log = Logger.getLogger(
+        BedQualityInterpolFacet.class);
 
-    private String valueName; /* Name of the ResultValue underlying this facet */
-    private String valueType; /* Type of the ResultValue underlying this facet */
+    private String valueName; /* Name of ResultValue underlying this facet */
+    private String valueType; /* Type of ResultValue underlying this facet */
 
     public BedQualityInterpolFacet() {
         // required for clone operation deepCopy()
     }
 
-    public BedQualityInterpolFacet(int idx, String name, String description,
-        ComputeType type, String stateId, String hash, String valueName, String valueType) {
+    public BedQualityInterpolFacet(
+        int idx,
+        String name,
+        String description,
+        ComputeType type,
+        String stateId,
+        String hash,
+        String valueName,
+        String valueType
+    ) {
         super(idx, name, description, type, hash, stateId);
         this.valueName = valueName;
         this.valueType = valueType;
@@ -45,7 +54,8 @@
         if (!valueName.equals("porosity") && !valueName.equals("density")) {
             this.metaData.put("Y", "chart.bedquality.yaxis.label.diameter");
         } else {
-            this.metaData.put("Y", "chart.bedquality.yaxis.label." + valueName);
+            this.metaData.put(
+                "Y", "chart.bedquality.yaxis.label." + valueName);
         }
     }
 
@@ -62,7 +72,8 @@
         int ndx = index >> 8;
 
         BedQualityResultValue value =
-            ((BedQualityResult[]) res.getData())[ndx].getValue(valueName, valueType);
+            ((BedQualityResult[]) res.getData())[ndx].getValue(
+                valueName, valueType);
 
         if (value == null) {
             /* Other facets check this so we do too */
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityResultValue.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityResultValue.java	Fri Jan 19 11:23:42 2018 +0100
@@ -133,7 +133,10 @@
     public void setData(double [][] data) {
         this.data = data;
 
-        if (!isEmpty() && data[0].length > 1 && data[0].length == data[1].length) {
+        if (!isEmpty()
+            && data[0].length > 1
+            && data[0].length == data[1].length
+        ) {
             int usable_points = 0;
             for (double val :data[1]) {
                 if (!Double.isNaN(val)) {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedloadDiameterDataFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedloadDiameterDataFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -1,3 +1,11 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
 package org.dive4elements.river.artifacts.model.minfo;
 
 import gnu.trove.TDoubleArrayList;
@@ -15,7 +23,8 @@
 public class BedloadDiameterDataFacet
 extends DataFacet
 {
-    private static final Logger log = Logger.getLogger(BedloadDiameterDataFacet.class);
+    private static final Logger log = Logger.getLogger(
+        BedloadDiameterDataFacet.class);
 
     public BedloadDiameterDataFacet() {
     }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/FlowVelocityMeasurementFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/FlowVelocityMeasurementFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -56,7 +56,8 @@
      */
     @Override
     public FlowVelocityMeasurementFacet deepCopy() {
-        FlowVelocityMeasurementFacet copy = new FlowVelocityMeasurementFacet(description);
+        FlowVelocityMeasurementFacet copy =
+            new FlowVelocityMeasurementFacet(description);
         copy.set(this);
         return copy;
     }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/FlowVelocityMeasurementFactory.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/FlowVelocityMeasurementFactory.java	Fri Jan 19 11:23:42 2018 +0100
@@ -24,7 +24,8 @@
 public class FlowVelocityMeasurementFactory
 {
     /** Private log to use here. */
-    private static Logger log = Logger.getLogger(FlowVelocityMeasurementFactory.class);
+    private static Logger log = Logger.getLogger(
+        FlowVelocityMeasurementFactory.class);
 
     /** Query to get description and start year, given name and a km range. */
     public static final String SQL_SELECT_ONE =
@@ -40,7 +41,6 @@
     public static FlowVelocityMeasurementValue.FastFlowVelocityMeasurementValue
         getFlowVelocityMeasurement(int id)
     {
-        log.debug("FlowVelocityMeasurementFactory.getFlowVelocityMeasurementValue");
         Session session = SessionHolder.HOLDER.get();
         SQLQuery sqlQuery = null;
         sqlQuery = session.createSQLQuery(SQL_SELECT_ONE)
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/MiddleBedHeightData.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/MiddleBedHeightData.java	Fri Jan 19 11:23:42 2018 +0100
@@ -25,9 +25,11 @@
                                             Comparable<MiddleBedHeightData> {
 
     /** Very private log. */
-    private static final Logger log = Logger.getLogger(MiddleBedHeightData.class);
+    private static final Logger log = Logger.getLogger(
+        MiddleBedHeightData.class);
 
-    public static final String I18N_SINGLE_NAME = "facet.bedheight_middle.single";
+    public static final String I18N_SINGLE_NAME =
+        "facet.bedheight_middle.single";
 
     private int    year;
     private String evaluatedBy;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/MorphologicWidthFactory.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/MorphologicWidthFactory.java	Fri Jan 19 11:23:42 2018 +0100
@@ -26,12 +26,14 @@
 public class MorphologicWidthFactory
 {
     /** Private log to use here. */
-    private static Logger log = Logger.getLogger(MorphologicWidthFactory.class);
+    private static Logger log = Logger.getLogger(
+        MorphologicWidthFactory.class);
 
     public static final String SQL_SELECT =
         "SELECT mwv.station AS station, mwv.width AS width " +
         "   FROM morphologic_width mw" +
-        "       JOIN morphologic_width_values mwv on mwv.morphologic_width_id = mw.id" +
+        "       JOIN morphologic_width_values mwv " +
+        "          ON mwv.morphologic_width_id = mw.id" +
         "   WHERE mw.id = :width_id";
 
     private MorphologicWidthFactory() {
@@ -43,7 +45,8 @@
      */
     public static MorphologicWidth getWidth(int width_id) {
         log.debug("MorphologicWidthFactory.getWidth");
-        Cache cache = CacheFactory.getCache(StaticMorphoWidthCacheKey.CACHE_NAME);
+        Cache cache = CacheFactory.getCache(
+            StaticMorphoWidthCacheKey.CACHE_NAME);
 
         StaticMorphoWidthCacheKey cacheKey;
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/QualityMeasurementFactory.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/QualityMeasurementFactory.java	Fri Jan 19 11:23:42 2018 +0100
@@ -24,7 +24,8 @@
 
 public class QualityMeasurementFactory {
 
-    private static Logger log = Logger.getLogger(QualityMeasurementFactory.class);
+    private static Logger log = Logger.getLogger(
+        QualityMeasurementFactory.class);
 
     private static final String SQL_BED_MEASUREMENT =
         "SELECT dat.km      as km," +
@@ -55,8 +56,9 @@
         "WHERE gw.name = :name AND " +
         "      dat.km IS NOT NULL AND " +
         "      sp.tiefevon IS NOT NULL AND " +
-        "      sp.tiefebis IS NOT NULL AND " + // TODO: Test if char diameter ist null.
+        "      sp.tiefebis IS NOT NULL AND " +
         "      dat.km BETWEEN :from - 0.001 AND :to + 0.001 ";
+        // TODO: Test if char diameter ist null.
 
     private static final String SQL_BEDLOAD_MEASUREMENT =
         "SELECT dat.km    as km," +
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentDensity.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentDensity.java	Fri Jan 19 11:23:42 2018 +0100
@@ -72,7 +72,10 @@
     private static final Comparator<SedimentDensityValue> BY_KM =
         new Comparator<SedimentDensityValue>() {
             @Override
-            public int compare(SedimentDensityValue a, SedimentDensityValue b) {
+            public int compare(
+                SedimentDensityValue a,
+                SedimentDensityValue b
+            ) {
                 double diff = a.getKm() - b.getKm();
                 if (diff < 0.0) return -1;
                 if (diff > 0.0) return +1;
@@ -120,7 +123,8 @@
         }
 
         if (densities.size() == 1) {
-            Map.Entry<Integer, List<SedimentDensityValue>> entry = densities.firstEntry();
+            Map.Entry<Integer, List<SedimentDensityValue>> entry =
+                densities.firstEntry();
             return entry.getKey() <= year
                 ? getDensityAtKm(entry.getValue(), km)
                 : SEDIMNET_DENSITY_FACTOR;
@@ -132,7 +136,8 @@
         Map.Entry<Integer, List<SedimentDensityValue>> last = iter.next();
 
         while (iter.hasNext()) {
-            Map.Entry<Integer, List<SedimentDensityValue>> current = iter.next();
+            Map.Entry<Integer, List<SedimentDensityValue>> current =
+                iter.next();
             last = current;
             int y1 = last.getKey();
             int y2 = current.getKey();
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentDensityFactory.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentDensityFactory.java	Fri Jan 19 11:23:42 2018 +0100
@@ -36,7 +36,8 @@
         "       sdv.year AS year " +
         "   FROM sediment_density sd" +
         "       JOIN rivers r ON sd.river_id = r.id " +
-        "       JOIN sediment_density_values sdv ON sd.id = sdv.sediment_density_id" +
+        "       JOIN sediment_density_values sdv " +
+        "          ON sd.id = sdv.sediment_density_id" +
         "   WHERE r.name = :name";
 
     /** Query to get sediment density values and kms by id. */
@@ -45,7 +46,8 @@
         "       sdv.density AS density," +
         "       sdv.year AS year " +
         "   FROM sediment_density sd" +
-        "       JOIN sediment_density_values sdv ON sd.id = sdv.sediment_density_id" +
+        "       JOIN sediment_density_values sdv " +
+        "          ON sd.id = sdv.sediment_density_id" +
         "   WHERE sd.id = :id";
 
     /** Query to get sediment density depth by sediment density id. */
@@ -110,7 +112,8 @@
         SedimentDensity density = new SedimentDensity();
         for (Object[] row : results) {
             if (row[0] != null && row[1] != null && row[2] != null) {
-                density.addDensity((Double)row[0], (Double)row[1], (Integer)row[2]);
+                density.addDensity(
+                    (Double)row[0], (Double)row[1], (Integer)row[2]);
             }
         }
 
@@ -122,7 +125,8 @@
     public static double[] getDepth(int id) {
         log.debug("getDepth");
         Session session = SessionHolder.HOLDER.get();
-        SQLQuery sqlQuery = session.createSQLQuery(SQL_SELECT_DENSITY_DEPTH_BY_ID)
+        SQLQuery sqlQuery = session.createSQLQuery(
+            SQL_SELECT_DENSITY_DEPTH_BY_ID)
             .addScalar("lower", StandardBasicTypes.DOUBLE)
             .addScalar("upper", StandardBasicTypes.DOUBLE);
         sqlQuery.setInteger("id", id);
@@ -136,7 +140,8 @@
     public static String getSedimentDensityDescription(int id) {
         log.debug("getSedimentDensityDescription");
         Session session = SessionHolder.HOLDER.get();
-        SQLQuery sqlQuery = session.createSQLQuery(SQL_SELECT_DESCRIPTION_BY_ID)
+        SQLQuery sqlQuery = session.createSQLQuery(
+            SQL_SELECT_DESCRIPTION_BY_ID)
             .addScalar("description", StandardBasicTypes.STRING);
         sqlQuery.setInteger("id", id);
         List<Object> results = sqlQuery.list();
@@ -158,7 +163,8 @@
         SedimentDensity density = new SedimentDensity();
         for (Object[] row : results) {
             if (row[0] != null && row[1] != null && row[2] != null) {
-                density.addDensity((Double)row[0], (Double)row[1], (Integer)row[2]);
+                density.addDensity(
+                    (Double)row[0], (Double)row[1], (Integer)row[2]);
             }
         }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadData.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadData.java	Fri Jan 19 11:23:42 2018 +0100
@@ -65,7 +65,8 @@
     };
 
     public static final int measurementStationType(int grainFraction) {
-        return grainFraction < 0 || grainFraction >= MEASUREMENT_STATION_GF.length
+        return grainFraction < 0
+            || grainFraction >= MEASUREMENT_STATION_GF.length
             ? Station.UNKNOWN
             : MEASUREMENT_STATION_GF[grainFraction];
     }
@@ -248,8 +249,10 @@
             }
         }
 
-        public void allLoadsWithValue(Collection<Load> loads, Integer sqRelationTimeInterval) {
-
+        public void allLoadsWithValue(
+            Collection<Load> loads,
+            Integer sqRelationTimeInterval
+        ) {
             for (List<Value> values: grainFractions) {
                 if (values == null) {
                     continue;
@@ -261,7 +264,9 @@
                     Load load = value.getLoad();
                     Integer sqId = load.getSQRelationTimeIntervalId();
                     if ((sqRelationTimeInterval == null)
-                        || sqId != null && sqId.equals(sqRelationTimeInterval)) {
+                        || sqId != null
+                        && sqId.equals(sqRelationTimeInterval)
+                    ) {
                         loads.add(load);
                     }
                 }
@@ -292,11 +297,13 @@
             this.type |= other.type;
             for (int i = 0, N = grainFractions.size(); i < N; ++i) {
                 grainFractions.set(i,
-                    mergeValues(grainFractions.get(i), other.grainFractions.get(i)));
+                    mergeValues(
+                        grainFractions.get(i), other.grainFractions.get(i)));
             }
         }
 
-        private static final Comparator<Value> ID_CMP = new Comparator<Value>() {
+        private static final Comparator<Value> ID_CMP =
+            new Comparator<Value>() {
             @Override
             public int compare(Value a, Value b) {
                 return a.getLoad().getId() - b.getLoad().getId();
@@ -354,7 +361,10 @@
             }
         }
 
-        public List<Value> filterGrainFraction(int grainFraction, Value.Filter filter) {
+        public List<Value> filterGrainFraction(
+            int grainFraction,
+            Value.Filter filter
+        ) {
             final List<Value> result = new ArrayList<Value>();
             filterGrainFraction(grainFraction, filter, new Value.Visitor() {
                 @Override
@@ -492,7 +502,8 @@
         }
     };
 
-    public static final Comparator<Load> LOAD_SQ_TI_CMP = new Comparator<Load>() {
+    public static final Comparator<Load> LOAD_SQ_TI_CMP =
+        new Comparator<Load>() {
         @Override
         public int compare(Load a, Load b) {
             Integer a_id = a.getSQRelationTimeIntervalId();
@@ -511,7 +522,11 @@
     };
 
     /** Find all loads in the range a/b with the according sq_time_interval */
-    public Collection<Load> findLoadsWithValue(double a, double b, final Integer sqRelationTimeInterval) {
+    public Collection<Load> findLoadsWithValue(
+        double a,
+        double b,
+        final Integer sqRelationTimeInterval
+    ) {
         final TreeSet<Load> loads = new TreeSet<Load>(LOAD_ID_CMP);
 
         findStations(a, b, new Visitor() {
@@ -528,7 +543,10 @@
      *
      * This is mainly a convenience function for the SedimentLoadInfoService.
      */
-    public Collection<Load> findDistinctSQTimeIntervalNonEpochLoadsWithValue(double a, double b) {
+    public Collection<Load> findDistinctSQTimeIntervalNonEpochLoadsWithValue(
+        double a,
+        double b
+    ) {
         final TreeSet<Load> loads = new TreeSet<Load>(LOAD_SQ_TI_CMP);
 
         findStations(a, b, new Visitor() {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataCalculation.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataCalculation.java	Fri Jan 19 11:23:42 2018 +0100
@@ -84,7 +84,10 @@
             this.description = description;
             this.grainFractions = grainFractions;
         }
-        public static final LoadSum make(String description, int [] grainFractions) {
+        public static final LoadSum make(
+            String description,
+            int [] grainFractions
+        ) {
             return new LoadSum(description, grainFractions);
         }
 
@@ -257,7 +260,8 @@
                 transformT2M3(sd, year, result);
 
                 SedimentLoadDataResult.Fraction sldrf =
-                    new SedimentLoadDataResult.Fraction(ls.getDescription(), result, period);
+                    new SedimentLoadDataResult.Fraction(
+                        ls.getDescription(), result, period);
 
                 sldr.addFraction(sldrf);
             }
@@ -345,7 +349,11 @@
             : null;
     }
 
-    private static void transformT2M3(SedimentDensity sd, int year, double [][] data) {
+    private static void transformT2M3(
+        SedimentDensity sd,
+        int year,
+        double [][] data
+    ) {
         if (sd == null) {
             return;
         }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -95,7 +95,8 @@
 
         D4EArtifact flys = (D4EArtifact) artifact;
 
-        CalculationResult res = (CalculationResult) flys.compute(context, hash, stateId, type, false);
+        CalculationResult res = (CalculationResult)flys.compute(
+            context, hash, stateId, type, false);
         Object payload = res.getData();
 
         if (!(payload instanceof SedimentLoadDataResult)) {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataFactory.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataFactory.java	Fri Jan 19 11:23:42 2018 +0100
@@ -24,7 +24,8 @@
 
 public class SedimentLoadDataFactory
 {
-    private static Logger log = Logger.getLogger(SedimentLoadDataFactory.class);
+    private static Logger log = Logger.getLogger(
+        SedimentLoadDataFactory.class);
 
     public static final String CACHE_NAME = "sediment-load-data";
 
@@ -40,7 +41,8 @@
             "sl.sq_time_interval_id " +
           "FROM sediment_load sl " +
             "JOIN sediment_load_values slv ON sl.id = slv.sediment_load_id " +
-            "JOIN measurement_station ms ON ms.id = slv.measurement_station_id " +
+            "JOIN measurement_station ms " +
+              "ON ms.id = slv.measurement_station_id " +
             "JOIN ranges rs ON rs.id = ms.range_id " +
             "JOIN rivers r ON r.id = rs.river_id " +
           "WHERE r.name = :river) " +
@@ -63,10 +65,12 @@
           "JOIN ranges rs ON ms.range_id = rs.id " +
           "JOIN rivers r ON rs.river_id = r.id " +
           "JOIN time_intervals ti ON sl.time_interval_id = ti.id " +
-          "LEFT JOIN time_intervals sqti ON sl.sq_time_interval_id = sqti.id " +
+          "LEFT JOIN time_intervals sqti " +
+            "ON sl.sq_time_interval_id = sqti.id " +
           "JOIN grain_fraction gf ON sl.grain_fraction_id = gf.id " +
           "LEFT JOIN sediment_load_values slv " +
-             "ON ms.id=slv.measurement_station_id AND sl.id=slv.sediment_load_id " +
+             "ON ms.id=slv.measurement_station_id " +
+               "AND sl.id=slv.sediment_load_id " +
         "WHERE (" +
           "(ms.measurement_type='Geschiebe' AND gf.name IN " +
              "('coarse', 'fine_middle', 'sand', 'susp_sand', " +
@@ -129,7 +133,8 @@
 
         Session session = SessionHolder.HOLDER.get();
 
-        SQLQuery sqlQuery = session.createSQLQuery(SQL_LOAD_RIVER_SEDIMENT_LOADS)
+        SQLQuery sqlQuery = session.createSQLQuery(
+            SQL_LOAD_RIVER_SEDIMENT_LOADS)
             .addScalar("sl_id",          StandardBasicTypes.INTEGER)
             .addScalar("sl_kind",        StandardBasicTypes.INTEGER)
             .addScalar("sl_description", StandardBasicTypes.STRING)
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataValueFilter.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataValueFilter.java	Fri Jan 19 11:23:42 2018 +0100
@@ -125,12 +125,13 @@
                 return true;
             }
             if (value.getLoad().getSQRelationTimeIntervalId() == null) {
-                /* Loads without sqRelationTimeInterval are "Schwebstoffe" and should
-                 * be included. */
+                /* Loads without sqRelationTimeInterval are "Schwebstoffe"
+                 * and should be included. */
                 return true;
             }
             /* All other values should be filtered accordingly. */
-            return value.getLoad().getSQRelationTimeIntervalId().equals(sqTiId);
+            return value.getLoad().getSQRelationTimeIntervalId()
+                .equals(sqTiId);
         }
     } // class SQTimeInterval
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -59,7 +59,8 @@
         int id = Integer.valueOf(idStr);
 
         /* Get all the data from the river. This will be nicely cached. */
-        SedimentLoadData allLoadData = SedimentLoadDataFactory.INSTANCE.getSedimentLoadData(
+        SedimentLoadData allLoadData =
+            SedimentLoadDataFactory.INSTANCE.getSedimentLoadData(
                 access.getRiverName());
 
         /* Now lets get what we want */
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/Measurement.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/Measurement.java	Fri Jan 19 11:23:42 2018 +0100
@@ -193,16 +193,7 @@
         deleteSieve(4.0);
         sieves.add(new Sieve(8d, eightValue));
         sieves.add(new Sieve(4d, newFourValue));
-        /*
-        sieveArray.adjust(
-            eightValue/sieveArray.totalLoad(),
-            newFourValue/sieveArray.totalLoad());
 
-        if (log.isDebugEnabled()) {
-            log.debug("Adjusted loads: " + Arrays.toString(sieveArray.getLoads()));
-            log.debug("Adjusted norm loads:" + Arrays.toString(sieveArray.getNormLoads()));
-        }
-        */
     }
 
     protected SieveArray calculateSieveArray() {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/MeasurementFactory.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/MeasurementFactory.java	Fri Jan 19 11:23:42 2018 +0100
@@ -41,7 +41,8 @@
     private static final Logger log =
         Logger.getLogger(MeasurementFactory.class);
 
-    public static final String MINFO_DUMP_SQ_SEDDB_PREFIX = "minfo.dump.sq.seddb.prefix";
+    public static final String MINFO_DUMP_SQ_SEDDB_PREFIX =
+        "minfo.dump.sq.seddb.prefix";
 
     public static final String SQL_TOTALS =
         "SELECT " +
@@ -126,7 +127,9 @@
         return Integer.parseInt(s.substring(s.length()-2))-1;
     }
 
-    public abstract static class CSVTransformer extends BasicTransformerAdapter {
+    public abstract static class CSVTransformer
+        extends BasicTransformerAdapter
+    {
         private static final long serialVersionUID = 1L;
 
         private CSVWriter rawWriter;
@@ -292,7 +295,8 @@
             getCVSWriter("totals", river, location, dateRange);
 
         try {
-            TotalsTransformer totalTransformer = new TotalsTransformer(csvWriter);
+            TotalsTransformer totalTransformer =
+                new TotalsTransformer(csvWriter);
             query.setResultTransformer(totalTransformer);
 
             return (List<Measurement>)query.list();
@@ -479,8 +483,9 @@
         return accumulated;
     }
 
-    protected static List<Measurement> separateByDate(List<Measurement> measurements) {
-
+    protected static List<Measurement> separateByDate(
+        List<Measurement> measurements
+    ) {
         List<Measurement> result = new ArrayList<Measurement>();
 
         List<Measurement> same = new ArrayList<Measurement>();
@@ -508,7 +513,9 @@
     }
 
 
-    protected static Measurement processSameDate(List<Measurement> measurements) {
+    protected static Measurement processSameDate(
+        List<Measurement> measurements
+    ) {
         int N = measurements.size();
 
         boolean debug = log.isDebugEnabled();
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/SQMeasurementFacet.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/SQMeasurementFacet.java	Fri Jan 19 11:23:42 2018 +0100
@@ -29,7 +29,8 @@
  */
 public class SQMeasurementFacet extends DataFacet implements FacetTypes {
 
-    private static final Logger log = Logger.getLogger(SQMeasurementFacet.class);
+    private static final Logger log = Logger.getLogger(
+        SQMeasurementFacet.class);
 
 
     private int fractionIdx;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/SQMeasurementsJRDataSource.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/SQMeasurementsJRDataSource.java	Fri Jan 19 11:23:42 2018 +0100
@@ -23,7 +23,8 @@
 public class SQMeasurementsJRDataSource implements JRDataSource
 {
     /** The log used in this exporter.*/
-    private static Logger log = Logger.getLogger(SQMeasurementsJRDataSource.class);
+    private static Logger log = Logger.getLogger(
+        SQMeasurementsJRDataSource.class);
 
     private ArrayList<String[]> data;
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/BedKMChartService.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/BedKMChartService.java	Fri Jan 19 11:23:42 2018 +0100
@@ -240,7 +240,8 @@
         plot.setRangeGridlinePaint(Color.gray);
         plot.setDomainGridlinesVisible(true);
         plot.setRangeGridlinesVisible(true);
-        XYLineAndShapeRenderer renderer = (XYLineAndShapeRenderer) plot.getRenderer();
+        XYLineAndShapeRenderer renderer =
+            (XYLineAndShapeRenderer)plot.getRenderer();
 
         renderer.setSeriesPaint(0, Color.gray);
         renderer.setSeriesLinesVisible(0, false);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/BedloadKMChartService.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/BedloadKMChartService.java	Fri Jan 19 11:23:42 2018 +0100
@@ -240,7 +240,8 @@
         plot.setRangeGridlinePaint(Color.gray);
         plot.setDomainGridlinesVisible(true);
         plot.setRangeGridlinesVisible(true);
-        XYLineAndShapeRenderer renderer = (XYLineAndShapeRenderer) plot.getRenderer();
+        XYLineAndShapeRenderer renderer =
+            (XYLineAndShapeRenderer)plot.getRenderer();
 
         renderer.setSeriesPaint(0, Color.gray);
         renderer.setSeriesLinesVisible(0, false);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/DischargeInfoService.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/DischargeInfoService.java	Fri Jan 19 11:23:42 2018 +0100
@@ -40,7 +40,8 @@
 
     public static final String GAUGE_XPATH = "/art:gauge/text()";
 
-    public static final String RIVER_NAME_XPATH = "/art:gauge/art:river/text()";
+    public static final String RIVER_NAME_XPATH =
+        "/art:gauge/art:river/text()";
 
     public DischargeInfoService() {
     }
@@ -69,7 +70,8 @@
             return XMLUtils.newDocument();
         }
 
-        log.debug("Getting discharge for gauge: " + gaugeNumber + " at river: " + river);
+        log.debug("Getting discharge for gauge: " + gaugeNumber
+            + " at river: " + river);
 
         long gn;
         try {
@@ -126,14 +128,16 @@
             Date stopTime = ti.getStopTime();
 
             if (startTime != null) {
-                discharge.setAttribute("start", String.valueOf(startTime.getTime()));
+                discharge.setAttribute(
+                    "start", String.valueOf(startTime.getTime()));
             }
             else {
                 continue;
             }
 
             if (stopTime != null) {
-                discharge.setAttribute("end", String.valueOf(stopTime.getTime()));
+                discharge.setAttribute(
+                    "end", String.valueOf(stopTime.getTime()));
             }
             else {
                 long now = System.currentTimeMillis();
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/DischargeTablesOverview.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/DischargeTablesOverview.java	Fri Jan 19 11:23:42 2018 +0100
@@ -49,20 +49,26 @@
 
     private static final long serialVersionUID = 1L;
 
-    public static final String I18N_CHART_TITLE = "gauge.discharge.service.chart.title";
+    public static final String I18N_CHART_TITLE =
+        "gauge.discharge.service.chart.title";
     public static final String DEFAULT_CHART_TITLE = "Pegel: XXX";
 
-    public static final String I18N_CHART_X_AXIS_TITLE = "gauge.discharge.service.chart.x.title";
+    public static final String I18N_CHART_X_AXIS_TITLE =
+        "gauge.discharge.service.chart.x.title";
     public static final String DEFAULT_X_AXIS_TITLE = "Q [m^3/s]";
 
-    public static final String I18N_CHART_Y_AXIS_TITLE = "gauge.discharge.service.chart.y.title";
+    public static final String I18N_CHART_Y_AXIS_TITLE =
+        "gauge.discharge.service.chart.y.title";
     public static final String DEFAULT_Y_AXIS_TITLE = "W [cm]";
 
-    public static final String I18N_CHART_SERIES_TITLE = "gauge.discharge.service.chart.series.title";
+    public static final String I18N_CHART_SERIES_TITLE =
+        "gauge.discharge.service.chart.series.title";
     public static final String DEFAULT_CHART_SERIES_TITLE = "Abflusskurve";
 
-    public static final String I18N_CHART_SERIES_TITLE_MASTER = "gauge.discharge.service.chart.series.title.master";
-    public static final String DEFAULT_CHART_SERIES_TITLE_MASTER = "Aktuelle Abflusskurve";
+    public static final String I18N_CHART_SERIES_TITLE_MASTER =
+        "gauge.discharge.service.chart.series.title.master";
+    public static final String DEFAULT_CHART_SERIES_TITLE_MASTER =
+        "Aktuelle Abflusskurve";
 
     public static final DateFormat DATE_FORMAT = DateFormat.getDateInstance(
         DateFormat.SHORT, Locale.GERMANY);
@@ -172,7 +178,9 @@
                     mainValue.getMainValue().getName());
                 plot.addDomainMarker(m);
             }
-            else if (mainValue.getMainValue().getType().getName().equals("W")) {
+            else if (
+                mainValue.getMainValue().getType().getName().equals("W")
+            ) {
                 // Its a W main value.
                 Marker m = FixingsKMChartService.createQSectorMarker(
                     mainValue.getValue().doubleValue(),
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/MainValuesService.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/MainValuesService.java	Fri Jan 19 11:23:42 2018 +0100
@@ -46,11 +46,13 @@
     /** The log that is used by this service.*/
     private static Logger log = Logger.getLogger(MainValuesService.class);
 
-    /** The XPath that points to the river definition of the incoming request.*/
-    public static final String XPATH_RIVER = "/art:mainvalues/art:river/text()";
+    /** XPath that points to the river definition of the incoming request.*/
+    public static final String XPATH_RIVER =
+        "/art:mainvalues/art:river/text()";
 
-    /** The XPath that points to the start definition of the incoming request.*/
-    public static final String XPATH_START = "/art:mainvalues/art:start/text()";
+    /** XPath that points to the start definition of the incoming request.*/
+    public static final String XPATH_START =
+        "/art:mainvalues/art:start/text()";
 
     /** The XPath that points to the end definition of the incoming request.*/
     public static final String XPATH_END = "/art:mainvalues/art:end/text()";
@@ -124,7 +126,8 @@
 
     /**
      * This method extracts the start and end point from incoming request
-     * document and returns both values in an array. If no start and end strings
+     * document and returns both values in an array.
+     * If no start and end strings
      * are found in the document, the min/max values of the <i>river</i> are
      * returned.
      *
@@ -259,9 +262,14 @@
 
 
     /** Checks i a main value has an official associated, */
-    protected static boolean hasOfficialLine(NamedMainValue nmv, Integer riverId) {
+    protected static boolean hasOfficialLine(
+        NamedMainValue nmv,
+        Integer riverId
+    ) {
         for (OfficialLine ol: nmv.getOfficialLines()) {
-            if (ol.getWstColumn().getWst().getRiver().getId().equals(riverId)) {
+            if (
+                ol.getWstColumn().getWst().getRiver().getId().equals(riverId)
+            ) {
                 return true;
             }
         }
@@ -287,7 +295,8 @@
         Element list = cr.create("mainvalues");
 
         for (MainValue mainValue: mainValues) {
-            Element newEl = buildMainValueElement(doc, mainValue, riverId, context);
+            Element newEl = buildMainValueElement(
+                doc, mainValue, riverId, context);
 
             if (newEl != null) {
                 list.appendChild(newEl);
@@ -330,11 +339,13 @@
         if (mainValue.getTimeInterval() != null) {
             if (mainValue.getTimeInterval().getStartTime() != null) {
                 cr.addAttr(el, "starttime",
-                    Long.toString(mainValue.getTimeInterval().getStartTime().getTime()));
+                    Long.toString(
+                        mainValue.getTimeInterval().getStartTime().getTime()));
             }
             if (mainValue.getTimeInterval().getStopTime() != null) {
                 cr.addAttr(el, "stoptime",
-                    Long.toString(mainValue.getTimeInterval().getStopTime().getTime()));
+                    Long.toString(
+                        mainValue.getTimeInterval().getStopTime().getTime()));
             }
         }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/MapInfoService.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/MapInfoService.java	Fri Jan 19 11:23:42 2018 +0100
@@ -43,13 +43,16 @@
     public static final String XPATH_MAPTYPE = "/mapinfo/maptype/text()";
 
     private static final String XPATH_RIVER_PROJECTION =
-        "/artifact-database/*[local-name()=$maptype]/river[@name=$river]/srid/@value";
+        "/artifact-database/*[local-name()=$maptype]/"
+        + "river[@name=$river]/srid/@value";
 
     private static final String XPATH_RIVER_BACKGROUND =
-        "/artifact-database/*[local-name()=$maptype]/river[@name=$river]/background-wms";
+        "/artifact-database/*[local-name()=$maptype]/"
+        + "river[@name=$river]/background-wms";
 
     private static final String XPATH_RIVER_WMS =
-        "/artifact-database/*[local-name()=$maptype]/river[@name=$river]/river-wms";
+        "/artifact-database/*[local-name()=$maptype]/"
+        + "river[@name=$river]/river-wms";
 
 
     /** The log used in this service.*/
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/MetaDataService.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/MetaDataService.java	Fri Jan 19 11:23:42 2018 +0100
@@ -37,21 +37,28 @@
  *  "/art:meta/art:artifact-id/@value" The UUID of the artifact. Optional.
  *                                     Used to fill the template enviroment.
  *  "/art:meta/art:user-id/@value"     The UUID of the user. Optional.
- *                                     If given the user specific template is filled.
- *  "/art:meta/art:outs/@value"        The list of outs used to recommend for the
+ *                                     If given the user specific template is
+ *                                     filled.
+ *  "/art:meta/art:outs/@value"        The list of outs used to recommend
+ *                                     for the
  *                                     various outputs.
  *  "/art:meta/art:parameters/@value"  A list of key/value pairs to inject more
- *                                     filters to the templating, as "key:value;key2:value2"
+ *                                     filters to the templating, as
+ *                                     "key:value;key2:value2"
  */
 public class MetaDataService
 extends      D4EService
 {
     private static Logger log = Logger.getLogger(MetaDataService.class);
 
-    public static final String XPATH_ARTIFACT_ID = "/art:meta/art:artifact-id/@value";
-    public static final String XPATH_USER_ID     = "/art:meta/art:user-id/@value";
-    public static final String XPATH_OUTS        = "/art:meta/art:outs/@value";
-    public static final String XPATH_PARAMETERS  = "/art:meta/art:parameters/@value";
+    public static final String XPATH_ARTIFACT_ID =
+        "/art:meta/art:artifact-id/@value";
+    public static final String XPATH_USER_ID =
+        "/art:meta/art:user-id/@value";
+    public static final String XPATH_OUTS =
+        "/art:meta/art:outs/@value";
+    public static final String XPATH_PARAMETERS =
+        "/art:meta/art:parameters/@value";
 
     /** The global context key of the artifact database. */
     public static final String ARTIFACT_DATA_BASE_KEY =
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/ModuleService.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/ModuleService.java	Fri Jan 19 11:23:42 2018 +0100
@@ -45,7 +45,8 @@
             ArtifactNamespaceContext.NAMESPACE_PREFIX);
 
         Element em = ec.create("modules");
-        List<Module> modules = (List<Module>)globalContext.get(RiverContext.MODULES);
+        List<Module> modules = (List<Module>)globalContext.get(
+            RiverContext.MODULES);
 
         for (Module module : modules) {
             Element m = ec.create("module");
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/SQKMChartService.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/SQKMChartService.java	Fri Jan 19 11:23:42 2018 +0100
@@ -253,7 +253,8 @@
         plot.setRangeGridlinePaint(Color.gray);
         plot.setDomainGridlinesVisible(true);
         plot.setRangeGridlinesVisible(true);
-        XYLineAndShapeRenderer renderer = (XYLineAndShapeRenderer) plot.getRenderer();
+        XYLineAndShapeRenderer renderer =
+            (XYLineAndShapeRenderer)plot.getRenderer();
 
         renderer.setSeriesPaint(0, Color.gray);
         renderer.setSeriesLinesVisible(0, false);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/SedimentLoadInfoService.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/SedimentLoadInfoService.java	Fri Jan 19 11:23:42 2018 +0100
@@ -30,13 +30,16 @@
 extends D4EService
 {
     /** The log used in this service. */
-    private static Logger log = Logger.getLogger(SedimentLoadInfoService.class);
+    private static Logger log = Logger.getLogger(
+        SedimentLoadInfoService.class);
 
     public static final String RIVER_XPATH = "/art:river/text()";
     public static final String TYPE_XPATH = "/art:river/art:type/text()";
     public static final String SQ_TI_XPATH = "/art:river/art:sq_ti_id/text()";
-    public static final String FROM_XPATH = "/art:river/art:location/art:from/text()";
-    public static final String TO_XPATH = "/art:river/art:location/art:to/text()";
+    public static final String FROM_XPATH =
+        "/art:river/art:location/art:from/text()";
+    public static final String TO_XPATH =
+        "/art:river/art:location/art:to/text()";
 
     /**
      * Create document with sedimentload infos,
@@ -79,13 +82,14 @@
 
         /* This call initializes the sedimentloaddata for the river. Might be
          * expensive but has to be done anyway for the calculation later on. */
-        SedimentLoadData allLoadData = SedimentLoadDataFactory.INSTANCE.getSedimentLoadData(
-                river);
+        SedimentLoadData allLoadData =
+            SedimentLoadDataFactory.INSTANCE.getSedimentLoadData(river);
 
         log.debug("Requested type: " + type + " with sq_ti_id: " + sq_ti_id);
         Collection <Load> loads;
         if (type.equals("sq_time_intervals")) {
-            loads = allLoadData.findDistinctSQTimeIntervalNonEpochLoadsWithValue(fromD, toD);
+            loads = allLoadData
+                .findDistinctSQTimeIntervalNonEpochLoadsWithValue(fromD, toD);
 
             for (Iterator<Load> it = loads.iterator(); it.hasNext();) {
                 /* Skip loads without time interval for this info type. */
@@ -138,7 +142,9 @@
             }
             /* SQ Time interval */
             if (load.getSQRelationTimeIntervalId() != null) {
-                ele.setAttribute("sq_ti_id", String.valueOf(load.getSQRelationTimeIntervalId()));
+                ele.setAttribute(
+                    "sq_ti_id",
+                    String.valueOf(load.getSQRelationTimeIntervalId()));
                 Date start = load.getSQStartTime();
                 Date stop = load.getSQStopTime();
                 if (start != null && stop != null) {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/ServerInfoService.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/ServerInfoService.java	Fri Jan 19 11:23:42 2018 +0100
@@ -1,3 +1,11 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
 package org.dive4elements.river.artifacts.services;
 
 import javax.xml.xpath.XPathConstants;
@@ -23,7 +31,8 @@
     /** The log used in this service.*/
     private static Logger log = Logger.getLogger(ServerInfoService.class);
 
-    private static final String XPATH_HELP_URL = "/artifact-database/help-url/text()";
+    private static final String XPATH_HELP_URL =
+        "/artifact-database/help-url/text()";
 
     @Override
     protected Document doProcess(Document data, GlobalContext globalContext,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/CalculationSelectSinfo.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/CalculationSelectSinfo.java	Fri Jan 19 11:23:42 2018 +0100
@@ -1,5 +1,7 @@
 /* Copyright (C) 2017 by Bundesanstalt für Gewässerkunde
- * Software engineering by Intevation GmbH
+ * Software engineering by 
+ *  Björnsen Beratende Ingenieure GmbH 
+ *  Dr. Schumacher Ingenieurbüro für Wasser und Umwelt
  *
  * This file is Free Software under the GNU AGPL (>=v3)
  * and comes with ABSOLUTELY NO WARRANTY! Check out the
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/AnnotationRiverState.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/AnnotationRiverState.java	Fri Jan 19 11:23:42 2018 +0100
@@ -33,10 +33,12 @@
 implements   FacetTypes
 {
     /** Developer-centric description of facet. */
-    public static final String I18N_DESCRIPTION = "facet.longitudinal_section.annotations";
+    public static final String I18N_DESCRIPTION =
+        "facet.longitudinal_section.annotations";
 
     /** The log that is used in this state. */
-    private static final Logger log = Logger.getLogger(AnnotationRiverState.class);
+    private static final Logger log = Logger.getLogger(
+        AnnotationRiverState.class);
 
 
     /**
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/AreaCreationState.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/AreaCreationState.java	Fri Jan 19 11:23:42 2018 +0100
@@ -54,7 +54,8 @@
         if (facets != null) {
             AreaArtifact aArt = (AreaArtifact) areaArtifact;
 
-            facets.add(new AreaFacet(0, aArt.getFacetName(), aArt.getAreaName()));
+            facets.add(
+                new AreaFacet(0, aArt.getFacetName(), aArt.getAreaName()));
         }
 
         // TODO use compute to exploit caching strategies.
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ComputedDischargeCurveState.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ComputedDischargeCurveState.java	Fri Jan 19 11:23:42 2018 +0100
@@ -87,7 +87,8 @@
                         "chart.computed.discharge.curve.curve.label",
                         args);
 
-                    facets.add(new WaterlevelFacet(i, COMPUTED_DISCHARGE_Q, name));
+                    facets.add(
+                        new WaterlevelFacet(i, COMPUTED_DISCHARGE_Q, name));
                     facets.add(new WaterlevelFacet(i, AT, "AT data"));
                 }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/EnterMultipleLocationsState.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/EnterMultipleLocationsState.java	Fri Jan 19 11:23:42 2018 +0100
@@ -23,7 +23,8 @@
  */
 public class EnterMultipleLocationsState extends EnterLocationState {
     /** The log for this class. */
-    private static Logger log = Logger.getLogger(EnterMultipleLocationsState.class);
+    private static Logger log = Logger.getLogger(
+        EnterMultipleLocationsState.class);
 
     @Override
     protected String getUIProvider() {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/FloodMapState.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/FloodMapState.java	Fri Jan 19 11:23:42 2018 +0100
@@ -104,19 +104,22 @@
 
     private static final String HWS_LINES_SHAPE = "hws-lines.shp";
 
-    private static final String I18N_HWS_POINTS_OFFICIAL = "floodmap.hws.points.official";
-    private static final String I18N_HWS_LINES_OFFICIAL = "floodmap.hws.lines.official";
+    private static final String I18N_HWS_POINTS_OFFICIAL =
+        "floodmap.hws.points.official";
+    private static final String I18N_HWS_LINES_OFFICIAL =
+        "floodmap.hws.lines.official";
     private static final String HWS_LINES = "hws-lines";
     private static final String HWS_POINT_SHAPE = "hws-points.shp";
     private static final String HWS_POINTS = "hws-points";
 
 
     /* List of possible map files this state handles . */
-    private static final String[] POSSIBLE_ADDITIONAL_MAPFILES = {HWS_LINES,
-                                                                  HWS_POINTS,
-                                                                  WSPLGEN_USER_RGD,
-                                                                  "barriers-lines",
-                                                                  "barriers-poly"};
+    private static final String[] POSSIBLE_ADDITIONAL_MAPFILES = {
+        HWS_LINES,
+        HWS_POINTS,
+        WSPLGEN_USER_RGD,
+        "barriers-lines",
+        "barriers-poly"};
 
 
 
@@ -158,15 +161,18 @@
         FileTools.copyDirectory(origDir, thisDir);
 
         for (String candidate: POSSIBLE_ADDITIONAL_MAPFILES) {
-            File f = new File(thisDir, MapfileGenerator.MS_LAYER_PREFIX + candidate);
+            File f = new File(
+                thisDir, MapfileGenerator.MS_LAYER_PREFIX + candidate);
             if (f.exists()) {
                 log.debug("Fixing artifiact id's in: " + f);
                 try {
                     String content = FileUtils.readFileToString(f);
                     FileUtils.writeStringToFile(f,
-                            content.replaceAll(orig.identifier(), owner.identifier()));
+                        content.replaceAll(
+                            orig.identifier(), owner.identifier()));
                 } catch (IOException e) {
-                    log.error("Failed to rewrite file: " + f + " Error: " + e.getMessage());
+                    log.error("Failed to rewrite file: " + f
+                        + " Error: " + e.getMessage());
                 }
             }
         }
@@ -197,7 +203,8 @@
                     if (layer.contains(orig.identifier())) {
                         wms.removeLayer(layer);
 
-                        String newLayer = layer.replace(orig.identifier(), owner.identifier());
+                        String newLayer = layer.replace(
+                            orig.identifier(), owner.identifier());
 
                         wms.addLayer(newLayer);
 
@@ -298,7 +305,7 @@
 
 
     /**
-     * Removes the directory and all its content where the required data and the
+     * Removes directory and all its content where the required data and the
      * results of WSPLGEN are stored. Should be called in endOfLife().
      */
     protected void removeDirectory(D4EArtifact artifact) {
@@ -443,7 +450,7 @@
                 MapfileGenerator.MS_LAYER_PREFIX + HWS_LINES,
                 HWS_LINES_SHAPE,
                 "LINE",
-                "31467", // XXX: This should be dynamically fetched from database.
+                "31467", // XXX: should be dynamically fetched from database.
                 "hws");
             job.addLin(artifactDir + "/" + HWS_LINES_SHAPE);
             facetCreator.createShapeFacet(I18N_HWS_LINES_OFFICIAL,
@@ -473,7 +480,8 @@
         info.setGroupTitle(group);
         info.setGroup(group + artifact.identifier());
         MapfileGenerator generator = new ArtifactMapfileGenerator();
-        Template tpl = generator.getTemplateByName(MapfileGenerator.SHP_LAYER_TEMPLATE);
+        Template tpl = generator.getTemplateByName(
+            MapfileGenerator.SHP_LAYER_TEMPLATE);
         try {
             File layer = new File(artifactDir.getCanonicalPath() + "/" + name);
             generator.writeLayer(info, layer, tpl);
@@ -602,7 +610,8 @@
 
         boolean l = GeometryUtils.writeShapefile(
             shapeLines,
-            GeometryUtils.buildFeatureType("lines", srs, LineString.class, obj),
+            GeometryUtils.buildFeatureType(
+                "lines", srs, LineString.class, obj),
             fcs[0]);
 
         if (l) {
@@ -628,7 +637,8 @@
 
         boolean p = GeometryUtils.writeShapefile(
             shapePolys,
-            GeometryUtils.buildFeatureType("polygons", srs, Polygon.class, obj),
+            GeometryUtils.buildFeatureType(
+                "polygons", srs, Polygon.class, obj),
             fcs[1]);
 
 
@@ -691,7 +701,9 @@
     }
 
 
-    protected FeatureCollection[] splitLinesAndPolygons(List<SimpleFeature> f) {
+    protected FeatureCollection[] splitLinesAndPolygons(
+        List<SimpleFeature> f
+    ) {
         FeatureCollection lines    = FeatureCollections.newCollection();
         FeatureCollection polygons = FeatureCollections.newCollection();
 
@@ -857,7 +869,8 @@
 
         boolean q = GeometryUtils.writeShapefile(
             qpsShape,
-            GeometryUtils.buildFeatureType("qps", srs, LineString.class, attrs),
+            GeometryUtils.buildFeatureType(
+                "qps", srs, LineString.class, attrs),
             collection);
 
         if (q) {
@@ -966,7 +979,8 @@
 
         log.debug("Use waterlevel provided by Artifact: " + src.identifier());
 
-        // The state actually depends on the kind of artifact. E.g. StaticWQKmsArtifact needs other state
+        // The state actually depends on the kind of artifact.
+        // E.g. StaticWQKmsArtifact needs other state
         Object computed = src.compute(
             cc,
             //null,
@@ -983,7 +997,8 @@
             CalculationResult rawData = (CalculationResult) computed;
             WQKms[] wqkms;
             if (rawData.getData() instanceof FixRealizingResult) {
-                wqkms = (WQKms[]) ((FixRealizingResult) rawData.getData()).getWQKms();
+                wqkms = (WQKms[])((FixRealizingResult)rawData.getData())
+                    .getWQKms();
             }
             else {
                 wqkms = (WQKms[]) rawData.getData();
@@ -999,11 +1014,13 @@
         }
         else if (computed == null && src instanceof StaticWKmsArtifact) {
             // Floodmarks and protection.
-            WQKms wqkms = WQKms.fromWKms(((StaticWKmsArtifact) src).getWKms(0), 1d);
+            WQKms wqkms = WQKms.fromWKms(
+                ((StaticWKmsArtifact)src).getWKms(0), 1d);
             return wqkms;
         }
 
-        log.warn("getWQKms cannot handle " + computed.getClass() + " " + src.getClass());
+        log.warn("getWQKms cannot handle " + computed.getClass()
+            + " " + src.getClass());
         return null;
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/FlowVelocityState.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/FlowVelocityState.java	Fri Jan 19 11:23:42 2018 +0100
@@ -92,7 +92,8 @@
                 newFacets.add(new FlowVelocityFacet(
                     idx,
                     FLOW_VELOCITY_MAINCHANNEL,
-                    buildFacetName(artifact, context, d, I18N_MAINCHANNEL_FACET_RAW),
+                    buildFacetName(
+                        artifact, context, d, I18N_MAINCHANNEL_FACET_RAW),
                     ComputeType.ADVANCE,
                     id,
                     hash
@@ -127,7 +128,8 @@
                 newFacets.add(new FlowVelocityFacet(
                     idx,
                     FLOW_VELOCITY_TOTALCHANNEL,
-                    buildFacetName(artifact, context, d, I18N_TOTALCHANNEL_FACET_RAW),
+                    buildFacetName(
+                        artifact, context, d, I18N_TOTALCHANNEL_FACET_RAW),
                     ComputeType.ADVANCE,
                     id,
                     hash
@@ -146,7 +148,8 @@
                  newFacets.add(new FlowVelocityFacet(
                     idx,
                     FLOW_VELOCITY_MAINCHANNEL,
-                    buildFacetName(artifact, context, d, I18N_MAINCHANNEL_FACET_RAW),
+                    buildFacetName(
+                        artifact, context, d, I18N_MAINCHANNEL_FACET_RAW),
                     ComputeType.ADVANCE,
                     id,
                     hash
@@ -162,7 +165,8 @@
                 newFacets.add(new FlowVelocityFacet(
                     idx,
                     FLOW_VELOCITY_TOTALCHANNEL,
-                    buildFacetName(artifact, context, d, I18N_TOTALCHANNEL_FACET_RAW),
+                    buildFacetName(
+                        artifact, context, d, I18N_TOTALCHANNEL_FACET_RAW),
                     ComputeType.ADVANCE,
                     id,
                     hash
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/GaugeDischargeCurveState.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/GaugeDischargeCurveState.java	Fri Jan 19 11:23:42 2018 +0100
@@ -1,3 +1,11 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
 package org.dive4elements.river.artifacts.states;
 
 import java.util.List;
@@ -31,17 +39,22 @@
         Date stopTime = validity.getStopTime();
         String description = Resources.getMsg(
             context.getMeta(),
-            "chart.discharge.curve.model" + (stopTime != null ? "" : ".nostop"),
+            "chart.discharge.curve.model"
+            + (stopTime != null ? "" : ".nostop"),
             new Object[] {gaugeName,
                           validity.getStartTime(),
                           stopTime
                 }
         );
 
-        facets.add(new GaugeDischargeCurveFacet("gauge_discharge_curve", description));
-        facets.add(new GaugeDischargeCurveFacet("at", "gauge_discharge_curve"));
-        facets.add(new GaugeDischargeCurveFacet("csv", "gauge_discharge_curve"));
-        facets.add(new GaugeDischargeCurveFacet("pdf", "gauge_discharge_curve"));
+        facets.add(new GaugeDischargeCurveFacet("gauge_discharge_curve",
+                description));
+        facets.add(new GaugeDischargeCurveFacet("at",
+                "gauge_discharge_curve"));
+        facets.add(new GaugeDischargeCurveFacet("csv",
+                "gauge_discharge_curve"));
+        facets.add(new GaugeDischargeCurveFacet("pdf",
+                "gauge_discharge_curve"));
         return null;
     }
 }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/GaugeDischargeInitState.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/GaugeDischargeInitState.java	Fri Jan 19 11:23:42 2018 +0100
@@ -1,3 +1,11 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
 package org.dive4elements.river.artifacts.states;
 
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/GaugeDischargeState.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/GaugeDischargeState.java	Fri Jan 19 11:23:42 2018 +0100
@@ -70,7 +70,8 @@
         Date stopTime = validity.getStopTime();
         String name = Resources.getMsg(
             meta,
-            "chart.discharge.curve.model" + (stopTime != null ? "" : ".nostop"),
+            "chart.discharge.curve.model"
+            + (stopTime != null ? "" : ".nostop"),
             new Object[] {gauge.getName(),
                           validity.getStartTime(),
                           stopTime
@@ -126,7 +127,8 @@
     ) {
         if (artifact instanceof GaugeDischargeArtifact) {
             log.debug("GaugeDischargeState.computeAdvance()");
-            GaugeDischargeArtifact dischargeArtifact = (GaugeDischargeArtifact) artifact;
+            GaugeDischargeArtifact dischargeArtifact =
+                (GaugeDischargeArtifact)artifact;
 
             CalculationResult res;
 
@@ -141,7 +143,8 @@
             WQKms[] wqkms = (WQKms[]) res.getData();
 
             if (wqkms != null && facets != null) {
-                log.debug("GaugeDischargeState.computeAdvance(): create facets");
+                log.debug(
+                    "GaugeDischargeState.computeAdvance(): create facets");
 
                 GaugeDischargeFacet facet = new GaugeDischargeFacet(
                     0,
@@ -156,9 +159,11 @@
             }
             else {
                 if (wqkms == null)
-                    log.debug("GaugeDischargeState.computeAdvance(): wqkms 0");
+                    log.debug(
+                        "GaugeDischargeState.computeAdvance(): wqkms 0");
                 else
-                    log.debug("GaugeDischargeState.computeAdvance(): facets 0");
+                    log.debug(
+                        "GaugeDischargeState.computeAdvance(): facets 0");
             }
 
             return res;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/GaugeTimerangeState.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/GaugeTimerangeState.java	Fri Jan 19 11:23:42 2018 +0100
@@ -63,7 +63,8 @@
             Calendar up = (Calendar) res[1];
 
             if (lo != null && up != null) {
-                return new long[] { lo.getTimeInMillis(), up.getTimeInMillis() };
+                return new long[] { lo.getTimeInMillis(),
+                                    up.getTimeInMillis() };
             }
         }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/HWSBarriersState.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/HWSBarriersState.java	Fri Jan 19 11:23:42 2018 +0100
@@ -109,7 +109,8 @@
                 shapeLines, lineType, collectionLines);
         }
 
-        FeatureCollection collectionPoints = FeatureCollections.newCollection();
+        FeatureCollection collectionPoints =
+            FeatureCollections.newCollection();
         SimpleFeatureType pointType = null;
         for (HWS h : selectedPoints) {
             pointType = h.getFeatureType();
@@ -181,7 +182,8 @@
                     FloodMapState.createMapfile(
                         artifact,
                         artifactDir,
-                        MapfileGenerator.MS_LAYER_PREFIX + FloodMapState.WSPLGEN_USER_RGD,
+                        MapfileGenerator.MS_LAYER_PREFIX
+                        + FloodMapState.WSPLGEN_USER_RGD,
                         FloodMapState.WSPLGEN_USER_RGD_SHAPE,
                         type,
                         epsg,
@@ -208,7 +210,8 @@
             }
             catch (IOException ioe) {
                 log.warn("Zip archive " + dir + "/"
-                    + FloodMapState.WSPLGEN_USER_RGD_ZIP + " could not be extracted.");
+                    + FloodMapState.WSPLGEN_USER_RGD_ZIP
+                    + " could not be extracted.");
                 return false;
             }
         }
@@ -238,10 +241,14 @@
                         return true;
                     }
                     try {
-                        FileTools.copyFile(file, new File(target, FloodMapState.WSPLGEN_USER_RGD + "." + suffix));
+                        FileTools.copyFile(
+                            file,
+                            new File(target,
+                                FloodMapState.WSPLGEN_USER_RGD
+                                + "." + suffix));
                     }
                     catch (IOException ioe) {
-                        log.warn ("Error while copying file " + file.getName());
+                        log.warn("Error while copying file " + file.getName());
                         return true;
                     }
                 }
@@ -264,7 +271,7 @@
 
 
     /**
-     * Removes the directory and all its content where the required data and the
+     * Removes directory and all its content where the required data and the
      * results of WSPLGEN are stored. Should be called in endOfLife().
      */
     // FIXME: I've seen this code somewhere else...
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/HistoricalDischargeComputeState.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/HistoricalDischargeComputeState.java	Fri Jan 19 11:23:42 2018 +0100
@@ -117,12 +117,13 @@
                     HISTORICAL_DISCHARGE_Q, createFacetTitle(wqt)));
 
                 if (wqt instanceof HistoricalWQTimerange) {
-                    log
-                        .debug("Create another facet for historical differences.");
+                    log.debug(
+                        "Create another facet for historical differences.");
 
                     // TODO CREATE BETTER TITLE FOR FACETS (issue1180)
                     facets.add(new HistoricalDischargeDifferenceFacet(i,
-                        HISTORICAL_DISCHARGE_Q_DIFF, "DIFF: " + wqt.getName()));
+                            HISTORICAL_DISCHARGE_Q_DIFF,
+                            "DIFF: " + wqt.getName()));
                 }
             }
             else {
@@ -130,12 +131,13 @@
                     HISTORICAL_DISCHARGE_W, createFacetTitle(wqt)));
 
                 if (wqt instanceof HistoricalWQTimerange) {
-                    log
-                        .debug("Create another facet for historical differences.");
+                    log.debug(
+                        "Create another facet for historical differences.");
 
                     // TODO CREATE BETTER TITLE FOR FACETS
                     facets.add(new HistoricalDischargeDifferenceFacet(i,
-                        HISTORICAL_DISCHARGE_W_DIFF, "DIFF: " + wqt.getName()));
+                            HISTORICAL_DISCHARGE_W_DIFF,
+                            "DIFF: " + wqt.getName()));
                 }
             }
 
@@ -152,14 +154,22 @@
                         Resources.getLocale(cc.getMeta()));
         for (int k = 0; k < ws.length; k++) {
             facets.add(new HistoricalDischargeWQFacet(k,
-                HISTORICAL_DISCHARGE_WQ_W, "W=" + format.format(ws[k]), ComputeType.ADVANCE,
-                hash, getID(), ws[k]));
+                    HISTORICAL_DISCHARGE_WQ_W,
+                    "W=" + format.format(ws[k]),
+                    ComputeType.ADVANCE,
+                    hash,
+                    getID(),
+                    ws[k]));
         }
 
         for (int k = 0; k < qs.length; k++) {
             facets.add(new HistoricalDischargeWQFacet(k,
-                HISTORICAL_DISCHARGE_WQ_Q, "Q=" + format.format(qs[k]), ComputeType.ADVANCE,
-                hash, getID(), qs[k]));
+                    HISTORICAL_DISCHARGE_WQ_Q,
+                    "Q=" + format.format(qs[k]),
+                    ComputeType.ADVANCE,
+                    hash,
+                    getID(),
+                    qs[k]));
         }
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ManualPointsSingleState.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ManualPointsSingleState.java	Fri Jan 19 11:23:42 2018 +0100
@@ -80,7 +80,8 @@
                     fName,
                     Resources.getMsg(meta, MANUALPOINTS, "Manual Points"));
                 facets.add(facet);
-                log.debug("compute(): ManualPointsFacet for " + ct + " created");
+                log.debug("compute(): ManualPointsFacet for "
+                    + ct + " created");
             }
             else {
                 log.debug("compute(): No points for " + ct);
@@ -98,11 +99,13 @@
                         double y    = array.getDouble(0);
                         String name = array.getString(1);
                         String fName = ct + "." + MANUALLINE;
-                        log.debug("have facet: " + y + " / " + name + " -> " + fName);
-                        CrossSectionWaterLineFacet facet = new CrossSectionWaterLineFacet(
-                            i,
-                            fName,
-                            name);
+                        log.debug("have facet: " + y + " / "
+                            + name + " -> " + fName);
+                        CrossSectionWaterLineFacet facet =
+                            new CrossSectionWaterLineFacet(
+                                i,
+                                fName,
+                                name);
 
                         facets.add(facet);
                     }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/MultiIntArrayState.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/MultiIntArrayState.java	Fri Jan 19 11:23:42 2018 +0100
@@ -47,8 +47,10 @@
 
             for (KVP kvp: getOptions(artifact, name)) {
                 Element item = creator.create("item");
-                creator.addAttr(item, "label", kvp.getValue().toString(), true);
-                creator.addAttr(item, "value", kvp.getKey().toString(), true);
+                creator.addAttr(
+                    item, "label", kvp.getValue().toString(), true);
+                creator.addAttr(
+                    item, "value", kvp.getKey().toString(), true);
 
                 select.appendChild(item);
             }
@@ -79,8 +81,10 @@
         for (int val: values) {
             try {
                 Element item = creator.create("item");
-                creator.addAttr(item, "value", String.valueOf(val), true);
-                creator.addAttr(item, "label", getLabelFor(cc, name, val), true);
+                creator.addAttr(
+                    item, "value", String.valueOf(val), true);
+                creator.addAttr(
+                    item, "label", getLabelFor(cc, name, val), true);
 
                 data.appendChild(item);
             }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ReferenceCurveState.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/ReferenceCurveState.java	Fri Jan 19 11:23:42 2018 +0100
@@ -79,8 +79,10 @@
 
         if (wws.length > 0) {
             log.debug("Adding CSV and PDF data facet.");
-            Facet csv = new DataFacet (CSV, "CSV data", ComputeType.ADVANCE, hash, id);
-            Facet pdf = new DataFacet (PDF, "PDF data", ComputeType.ADVANCE, hash, id);
+            Facet csv = new DataFacet(
+                CSV, "CSV data", ComputeType.ADVANCE, hash, id);
+            Facet pdf = new DataFacet(
+                PDF, "PDF data", ComputeType.ADVANCE, hash, id);
             facets.add(csv);
             facets.add(pdf);
         }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/SQRelation.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/SQRelation.java	Fri Jan 19 11:23:42 2018 +0100
@@ -74,7 +74,8 @@
           SQ_D_CURVE, SQ_E_CURVE, SQ_F_CURVE, SQ_G_CURVE
         },
         { SQ_A_MEASUREMENT, SQ_B_MEASUREMENT, SQ_C_MEASUREMENT,
-          SQ_D_MEASUREMENT, SQ_E_MEASUREMENT, SQ_F_MEASUREMENT, SQ_G_MEASUREMENT
+          SQ_D_MEASUREMENT, SQ_E_MEASUREMENT, SQ_F_MEASUREMENT,
+          SQ_G_MEASUREMENT
         },
         { SQ_A_OUTLIER, SQ_B_OUTLIER, SQ_C_OUTLIER,
           SQ_D_OUTLIER, SQ_E_OUTLIER, SQ_F_OUTLIER, SQ_G_OUTLIER
@@ -341,7 +342,8 @@
                     container.add(new SQOutlierMeasurementFacet(
                         index,
                         i,
-                        getFractionOverviewFacetname(OUTLIER_MEASUREMENT_INDEX, i),
+                        getFractionOverviewFacetname(
+                            OUTLIER_MEASUREMENT_INDEX, i),
                         sqr[res].getFractionName(i) + " - " +
                         Resources.getMsg(
                             meta,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/SoundingsSelect.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/SoundingsSelect.java	Fri Jan 19 11:23:42 2018 +0100
@@ -62,7 +62,11 @@
         }
     }
 
-    private static Element order(ElementCreator creator, String name, String order) {
+    private static Element order(
+        ElementCreator creator,
+        String name,
+        String order
+    ) {
         Element element = creator.create(name);
         creator.addAttr(element, "order", order, false);
         return element;
@@ -107,7 +111,8 @@
 
         appendSingles(river, kmLo, kmHi, creator, select, context);
 
-        List<KVP<String, String>> kvp = Collections.<KVP<String, String>>emptyList();
+        List<KVP<String, String>> kvp =
+            Collections.<KVP<String, String>>emptyList();
         return kvp.toArray(new KVP[kvp.size()]);
     }
 
@@ -223,8 +228,8 @@
 
 
     /**
-     * This method might be used to test, if a parameter name is handled by this
-     * state.
+     * This method might be used to test, if a parameter name
+     * is handled by this state.
      *
      * @param parameterName The name of a parameter.
      *
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/StaticHYKState.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/StaticHYKState.java	Fri Jan 19 11:23:42 2018 +0100
@@ -32,7 +32,8 @@
 implements   FacetTypes
 {
     /** The log that is used in this state. */
-    transient private static final Logger log = Logger.getLogger(StaticHYKState.class);
+    transient private static final Logger log = Logger.getLogger(
+        StaticHYKState.class);
 
 
     /**
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/StaticState.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/StaticState.java	Fri Jan 19 11:23:42 2018 +0100
@@ -80,7 +80,8 @@
         return staticCompute(facets);
     }
 
-    /** End-point and most important compute-method. Override for desired effect. */
+    /** End-point and most important compute-method.
+     * Override for desired effect. */
     public Object staticCompute(List<Facet> facets) {
         return null;
     }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WDifferencesState.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WDifferencesState.java	Fri Jan 19 11:23:42 2018 +0100
@@ -110,7 +110,12 @@
      * Access the data (wkms) of an artifact, coded in mingle.
      */
     // FIXME: meanwhile used by several places outside this context; refactor into separate helper class to access waterlevels
-    public WKms getWKms(String mingle, CallContext context, double from, double to) {
+    public WKms getWKms(
+        String mingle,
+        CallContext context,
+        double from,
+        double to
+    ) {
         log.debug("WDifferencesState.getWKms " + mingle);
         String[] def  = mingle.split(";");
         String   uuid = def[0];
@@ -121,7 +126,8 @@
             context);
 
         if (d4eArtifact == null) {
-            log.warn("One of the artifacts (1) for diff calculation could not be loaded");
+            log.warn("One of the artifacts (1) for diff calculation "
+                + "could not be loaded");
             return null;
         }
 
@@ -163,9 +169,10 @@
 
 
         if (retval == null) {
-            log.error("Do not know how to handle (getWKms) minuend/subtrahend");
+            log.error(
+                "Do not know how to handle (getWKms) minuend/subtrahend");
         } else if (!Double.isNaN(from) && !Double.isNaN(to)) {
-            /* Filter out only the relevant data points for calulation results.*/
+            /* Filter out only relevant data points for calulation results.*/
             log.debug("Before filter: " + retval.size());
             retval = retval.filteredKms(from, to);
             log.debug("After filter: " + retval.size());
@@ -199,7 +206,7 @@
         double to = rangeAccess.getTo(true);
         // Load the Artifacts/facets that we want to subtract and display.
         // Expected format is:
-        // [42537f1e-3522-42ef-8968-635b03d8e9c6;longitudinal_section.w;0]#[1231f2-....]
+        //[42537f1e-3522-42ef-8968-635b03d8e9c6;longitudinal_section.w;0]#[...]
         String diffids = winfo.getDataAsString("diffids");
         log.debug("WDifferencesState has: " + diffids);
         String datas[] = diffids.split("#");
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WMSBackgroundState.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WMSBackgroundState.java	Fri Jan 19 11:23:42 2018 +0100
@@ -50,7 +50,8 @@
     protected Map<String, String> variables;
 
 
-    private static final Logger log = Logger.getLogger(WMSBackgroundState.class);
+    private static final Logger log = Logger.getLogger(
+        WMSBackgroundState.class);
 
 
     @Override
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQAdapted.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQAdapted.java	Fri Jan 19 11:23:42 2018 +0100
@@ -74,9 +74,10 @@
 
 
     /**
-     * This method creates one element for each gauge of the selected river that
+     * This method creates one element for each gauge of selected river that
      * is intersected by the given kilometer range. Each element is a tuple of
-     * (from;to) where <i>from</i> is the lower bounds of the gauge or the lower
+     * (from;to) where <i>from</i> is the lower bounds of the gauge or
+     * the lower
      * kilometer range. <i>to</i> is the upper bounds of the gauge or the upper
      * kilometer range.
      *
@@ -175,7 +176,11 @@
                 double[] mmW = gauge.determineMinMaxW();
 
                 elements.add(createItem(
-                    cr, new String[] { from + ";" + to, gauge.getName()}, mmQ, mmW));
+                        cr,
+                        new String[] { from + ";" + to,
+                                       gauge.getName()},
+                        mmQ,
+                        mmW));
             }
         }
         else {
@@ -196,7 +201,11 @@
                 double[] mmW = gauge.determineMinMaxW();
 
                 elements.add(createItem(
-                    cr, new String[] { to + ";" + from, gauge.getName()}, mmQ, mmW));
+                        cr,
+                        new String[] { to + ";" + from,
+                                       gauge.getName()},
+                        mmQ,
+                        mmW));
             }
         }
 
@@ -318,7 +327,8 @@
             return validateQ(artifact);
         }
         else {
-            throw new IllegalArgumentException("error_feed_no_wq_mode_selected");
+            throw new IllegalArgumentException(
+                "error_feed_no_wq_mode_selected");
         }
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQFixing.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQFixing.java	Fri Jan 19 11:23:42 2018 +0100
@@ -29,7 +29,8 @@
     {
         log.debug("WQFixing.validate");
 
-        RangeWithValues[] rwvs = extractInput(getData((D4EArtifact) artifact, "wq_values"));
+        RangeWithValues[] rwvs = extractInput(
+            getData((D4EArtifact) artifact, "wq_values"));
 
         if (rwvs == null) {
             throw new IllegalArgumentException("error_missing_wq_data");
@@ -39,7 +40,8 @@
             double[] values = rwv.getValues();
             for (double val: values) {
                 if (val <= 0) {
-                    throw new IllegalArgumentException("error_validate_positive");
+                    throw new IllegalArgumentException(
+                        "error_validate_positive");
                 }
             }
         }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelInfoState.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelInfoState.java	Fri Jan 19 11:23:42 2018 +0100
@@ -114,7 +114,8 @@
         }
 
         // TODO Adjust to WaterlevelState - implementation.
-        facets.add(new CrossSectionWaterLineFacet(0, "Q=" + winfo.getDataAsString("wq_single")));
+        facets.add(new CrossSectionWaterLineFacet(0,
+                "Q=" + winfo.getDataAsString("wq_single")));
 
         // Assume to be in wq_single mode.
         return res;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelPairSelectState.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelPairSelectState.java	Fri Jan 19 11:23:42 2018 +0100
@@ -82,9 +82,12 @@
     {
         log.debug("createItems: " + name);
         if (name.equals("diffids")) {
-            Element item  = ProtocolUtils.createArtNode(cr, "item", null, null);
-            Element label = ProtocolUtils.createArtNode(cr, "label", null, null);
-            Element value = ProtocolUtils.createArtNode(cr, "value", null, null);
+            Element item  = ProtocolUtils.createArtNode(
+                cr, "item", null, null);
+            Element label = ProtocolUtils.createArtNode(
+                cr, "label", null, null);
+            Element value = ProtocolUtils.createArtNode(
+                cr, "value", null, null);
             D4EArtifact flys = (D4EArtifact) artifact;
             String s = flys.getDataAsString("diffids");
             value.setTextContent(s);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelSelectState.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelSelectState.java	Fri Jan 19 11:23:42 2018 +0100
@@ -70,7 +70,8 @@
             return null;
         }
 
-        return new DefaultStateData(name, null, null, StringUtil.unbracket(val));
+        return new DefaultStateData(
+            name, null, null, StringUtil.unbracket(val));
     }
 
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelState.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelState.java	Fri Jan 19 11:23:42 2018 +0100
@@ -126,7 +126,8 @@
                 report.addProblem(Resources.format(
                     cc.getMeta(),
                     "official.line.found",
-                    "Found official line for {0} from year {1,date,yyyy} from {2}.",
+                    "Found official line for {0} from year {1,date,yyyy} "
+                    + "from {2}.",
                     ol.getName(), nn(ol.getDate()), nn(ol.getSource())));
             }
         }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/extreme/ExtremeCompute.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/extreme/ExtremeCompute.java	Fri Jan 19 11:23:42 2018 +0100
@@ -113,10 +113,10 @@
             new DataFacet(WST, "WST data", ComputeType.ADVANCE, hash, id));
 
         facets.add(new ExtremeCurveFacet(Resources.getMsg(context.getMeta(),
-                                         "extreme_wq_curve", "extreme_wq_curve")));
+                    "extreme_wq_curve", "extreme_wq_curve")));
         facets.add(new ExtremeCurveFacet(Resources.getMsg(context.getMeta(),
-                                         "extreme_wq_base_curve", "extreme_wq_base_curve")
-                                         , true));
+                    "extreme_wq_base_curve", "extreme_wq_base_curve"),
+                true));
 
         return res;
     }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/extreme/ExtremeQInput.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/extreme/ExtremeQInput.java	Fri Jan 19 11:23:42 2018 +0100
@@ -45,7 +45,8 @@
 
 /**
  * State to input Q data in segments for extreme value calculations..
- * The data item ranges is expected to have this format <from1>;<to1>;<value1>:<from2>;<to2>;<value2>:...
+ * The data item ranges is expected to have this format
+ * <from1>;<to1>;<value1>:<from2>;<to2>;<value2>:...
  * (;;;:;;;:;;;:...)
  */
 public class ExtremeQInput extends DefaultState {
@@ -103,7 +104,10 @@
 
         for (Range range: ranges) {
             elements.add(createItem(
-                cr, new String[] { range.getStart() + ";" + range.getEnd(), ""}, new double[] {0,100000}));
+                    cr,
+                    new String[] { range.getStart() + ";" + range.getEnd(),
+                                   ""},
+                    new double[] {0,100000}));
         }
 
         Element[] els = new Element[elements.size()];
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/FixAnalysisCompute.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/FixAnalysisCompute.java	Fri Jan 19 11:23:42 2018 +0100
@@ -56,7 +56,8 @@
     /** The log used in this class. */
     private static Logger log = Logger.getLogger(FixAnalysisCompute.class);
 
-    private static final String I18N_REFERENCEPERIOD_SHORT = "fix.reference.period.event.short";
+    private static final String I18N_REFERENCEPERIOD_SHORT =
+        "fix.reference.period.event.short";
 
     private static final String I18N_ANALYSISPERIODS = "fix.analysis.periods";
 
@@ -68,9 +69,11 @@
 
     private static final String I18N_DEVIATION = "fix.deviation";
 
-    private static final String I18N_REFERENCEDEVIATION = "fix.reference.deviation";
+    private static final String I18N_REFERENCEDEVIATION =
+        "fix.reference.deviation";
 
-    private static final String I18N_REFERENCEPERIOD = "state.fix.analysis.referenceperiod";
+    private static final String I18N_REFERENCEPERIOD =
+        "state.fix.analysis.referenceperiod";
 
     public static final String [] SECTOR_LABELS = {
         "fix.mnq",
@@ -90,7 +93,9 @@
                     Facet    facet,
                     String   output
                 ) {
-                    if (output.contains(FacetTypes.ChartType.FLSC.toString())) {
+                    if (
+                        output.contains(FacetTypes.ChartType.FLSC.toString())
+                    ) {
                         // Longitudinal section chart
                         String name = facet.getName();
 
@@ -105,7 +110,8 @@
                         }
                     }
                     if (output.contains(FacetTypes.ChartType.FDWC.toString())
-                        && facet.getName().contains(FacetTypes.FIX_SECTOR_AVERAGE_DWT)) {
+                        && facet.getName().contains(
+                            FacetTypes.FIX_SECTOR_AVERAGE_DWT)) {
                         return Boolean.FALSE;
                     }
 
@@ -172,8 +178,10 @@
         int qsS = access.getQSectorStart();
         int qsE = access.getQSectorEnd();
 
-        DateFormat df = Formatter.getDateFormatter(context.getMeta(), "dd.MM.yyyy");
-        DateFormat lf = Formatter.getDateFormatter(context.getMeta(), "dd.MM.yyyy'T'HH:mm");
+        DateFormat df = Formatter.getDateFormatter(
+            context.getMeta(), "dd.MM.yyyy");
+        DateFormat lf = Formatter.getDateFormatter(
+            context.getMeta(), "dd.MM.yyyy'T'HH:mm");
 
         DateRange [] periods = access.getAnalysisPeriods();
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/BedQualityDistanceSelect.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/BedQualityDistanceSelect.java	Fri Jan 19 11:23:42 2018 +0100
@@ -8,7 +8,6 @@
 
 package org.dive4elements.river.artifacts.states.minfo;
 
-import java.util.Date;
 import java.util.List;
 
 import org.w3c.dom.Element;
@@ -30,7 +29,8 @@
 /** Extended Distance Select with default values appropiate for BedQuality */
 public class BedQualityDistanceSelect extends DistanceSelect {
 
-    private static Logger log = Logger.getLogger(BedQualityDistanceSelect.class);
+    private static Logger log = Logger.getLogger(
+        BedQualityDistanceSelect.class);
 
     /**
      * The default constructor that initializes an empty State object.
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/BedQualityPeriodsSelect.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/BedQualityPeriodsSelect.java	Fri Jan 19 11:23:42 2018 +0100
@@ -40,7 +40,8 @@
 public class BedQualityPeriodsSelect extends DefaultState {
 
     /** The log used in this class. */
-    private static Logger log = Logger.getLogger(BedQualityPeriodsSelect.class);
+    private static Logger log = Logger.getLogger(
+        BedQualityPeriodsSelect.class);
 
     private static final String I18N_NO_DATA =
         "state.minfo.bed.error.no_data";
@@ -54,15 +55,17 @@
     public BedQualityPeriodsSelect() {
     }
 
-    /** Get either the start and end date of the data at the current position. */
+    /** Get the start and end date of the data at the current position. */
     protected Long[] getDataMinMaxDate(Artifact artifact) {
         D4EArtifact arti = (D4EArtifact) artifact;
         RangeAccess access = new RangeAccess(arti);
         double a = access.getFrom(true);
         double b = access.getTo(true);
 
-        BedOverview overview = BedOverviewFactory.getOverview(access.getRiverName());
-        BedloadOverview overview2 = BedloadOverviewFactory.getOverview(access.getRiverName());
+        BedOverview overview = BedOverviewFactory.getOverview(
+            access.getRiverName());
+        BedloadOverview overview2 = BedloadOverviewFactory.getOverview(
+            access.getRiverName());
 
         /* Filter is not implemented and only checks if a complete
          * KMIndex list is acceptable or not. So KMFiltering wont work */
@@ -104,7 +107,9 @@
         }
         Element def = createItem(
             cr,
-            new String[] {"default", values[0].toString() + "," + values[1].toString()});
+            new String[] {"default",
+                          values[0].toString() + "," + values[1].toString()}
+        );
 
         return new Element[] { def };
     }
@@ -117,9 +122,10 @@
 
         Long[] minMax = getDataMinMaxDate(artifact);
         if (minMax == null) {
-            throw new IllegalArgumentException(Resources.getMsg(context.getMeta(),
-                         I18N_NO_DATA,
-                         I18N_NO_DATA));
+            throw new IllegalArgumentException(Resources.getMsg(
+                    context.getMeta(),
+                    I18N_NO_DATA,
+                    I18N_NO_DATA));
         }
 
         long min = minMax[0];
@@ -129,12 +135,14 @@
             long b = range.getTo().getTime();
             log.debug("min max a b " + min + " " + max + " " + a + " " + b);
             if (b < min || a > max || a > b) {
-                DateFormat df = Formatter.getDateFormatter(context.getMeta(), "dd.MM.yyyy");
-                throw new IllegalArgumentException(Resources.getMsg(context.getMeta(),
-                             I18N_NO_DATA_FOR_PERIOD,
-                             I18N_NO_DATA_FOR_PERIOD,
-                             new Object[] {df.format(range.getFrom()),
-                                           df.format(range.getTo())}));
+                DateFormat df = Formatter.getDateFormatter(
+                    context.getMeta(), "dd.MM.yyyy");
+                throw new IllegalArgumentException(Resources.getMsg(
+                        context.getMeta(),
+                        I18N_NO_DATA_FOR_PERIOD,
+                        I18N_NO_DATA_FOR_PERIOD,
+                        new Object[] {df.format(range.getFrom()),
+                                      df.format(range.getTo())}));
             }
         }
     }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/BedQualityState.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/BedQualityState.java	Fri Jan 19 11:23:42 2018 +0100
@@ -48,15 +48,19 @@
         .getLogger(BedQualityState.class);
 
     /* The suffix to append to interpol facets. */
-    public static final String I18N_INTERPOL_SUFFIX = "facet.bedquality.interpol.suffix";
+    public static final String I18N_INTERPOL_SUFFIX =
+        "facet.bedquality.interpol.suffix";
 
-    /* I18n is in the pattern base.<name>.<type> with the optional suffix .data */
+    /* I18n is in the pattern base.<name>.<type> with optional suffix .data */
     public static final String I18N_FACET_BED_BASE = "facet.bedquality.bed";
 
     /* Data Layers */
-    public static final String I18N_FACET_BEDLOAD_DIAMETER_DATA = "facet.bedquality.bed.diameter.bedload.data";
-    public static final String I18N_FACET_BED_DIAMETER_DATA_TOPLAYER = "facet.bedquality.bed.diameter.toplayer.data";
-    public static final String I18N_FACET_BED_DIAMETER_DATA_SUBLAYER = "facet.bedquality.bed.diameter.sublayer.data";
+    public static final String I18N_FACET_BEDLOAD_DIAMETER_DATA =
+        "facet.bedquality.bed.diameter.bedload.data";
+    public static final String I18N_FACET_BED_DIAMETER_DATA_TOPLAYER =
+        "facet.bedquality.bed.diameter.toplayer.data";
+    public static final String I18N_FACET_BED_DIAMETER_DATA_SUBLAYER =
+        "facet.bedquality.bed.diameter.sublayer.data";
     public static final String I18N_TOPLAYER = "bedquality.toplayer";
     public static final String I18N_SUBLAYER = "bedquality.sublayer";
 
@@ -100,7 +104,8 @@
 
         BedQualityAccess access = new BedQualityAccess(artifact, context);
 
-        CalculationResult res = old instanceof CalculationResult ? (CalculationResult) old
+        CalculationResult res = old instanceof CalculationResult
+            ? (CalculationResult)old
             : new BedQualityCalculation().calculate(access);
 
         if (facets == null || res == null) {
@@ -294,7 +299,8 @@
 
         CallMeta meta = context.getMeta();
 
-        newFacets.add(new DataFacet(CSV, "CSV data", ComputeType.ADVANCE, hash, id));
+        newFacets.add(
+            new DataFacet(CSV, "CSV data", ComputeType.ADVANCE, hash, id));
         for (int idx = 0; idx < results.length; idx++) {
             BedQualityResult result = results[idx];
             DateRange range = result.getDateRange();
@@ -347,7 +353,8 @@
             return Resources.getMsg(meta, i18n, i18n, new Object[] {
                 value.getName().toUpperCase(), from, to, layerSuffix });
         } else {
-            return Resources.getMsg(meta, i18n, i18n, new Object[] { from, to, layerSuffix });
+            return Resources.getMsg(meta, i18n, i18n, new Object[] {
+                    from, to, layerSuffix });
         }
     }
 }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/DifferencesState.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/DifferencesState.java	Fri Jan 19 11:23:42 2018 +0100
@@ -51,19 +51,31 @@
     private static Logger log = Logger.getLogger(DifferencesState.class);
     public static final String I18N_DIFF_YEAR = "beddifference.year";
 
-    public static final String I18N_FACET_BED_DIFF_YEAR = "facet.bedheight.diff.year";
-    public static final String I18N_FACET_BED_DIFF_YEAR_RAW = "facet.bedheight.diff.year.raw";
-    public static final String I18N_FACET_BED_DIFF_ABSOLUTE = "facet.bedheight.diff.absolute";
-    public static final String I18N_FACET_BED_DIFF_ABSOLUTE_RAW = "facet.bedheight.diff.absolute.raw";
-    public static final String I18N_FACET_BED_DIFF_SOUNDING = "facet.bedheight.diff.sounding";
-    public static final String I18N_FACET_BED_DIFF_MORPH1 = "facet.bedheight.diff.morph1";
-    public static final String I18N_FACET_BED_DIFF_MORPH2 = "facet.bedheight.diff.morph2";
-    public static final String I18N_FACET_BED_DIFF_HEIGHT1 = "facet.bedheight.diff.height1";
-    public static final String I18N_FACET_BED_DIFF_HEIGHT1_RAW = "facet.bedheight.diff.height1.raw";
-    public static final String I18N_FACET_BED_DIFF_HEIGHT2 = "facet.bedheight.diff.height2";
-    public static final String I18N_FACET_BED_DIFF_HEIGHT2_RAW = "facet.bedheight.diff.height2.raw";
+    public static final String I18N_FACET_BED_DIFF_YEAR =
+        "facet.bedheight.diff.year";
+    public static final String I18N_FACET_BED_DIFF_YEAR_RAW =
+        "facet.bedheight.diff.year.raw";
+    public static final String I18N_FACET_BED_DIFF_ABSOLUTE =
+        "facet.bedheight.diff.absolute";
+    public static final String I18N_FACET_BED_DIFF_ABSOLUTE_RAW =
+        "facet.bedheight.diff.absolute.raw";
+    public static final String I18N_FACET_BED_DIFF_SOUNDING =
+        "facet.bedheight.diff.sounding";
+    public static final String I18N_FACET_BED_DIFF_MORPH1 =
+        "facet.bedheight.diff.morph1";
+    public static final String I18N_FACET_BED_DIFF_MORPH2 =
+        "facet.bedheight.diff.morph2";
+    public static final String I18N_FACET_BED_DIFF_HEIGHT1 =
+        "facet.bedheight.diff.height1";
+    public static final String I18N_FACET_BED_DIFF_HEIGHT1_RAW =
+        "facet.bedheight.diff.height1.raw";
+    public static final String I18N_FACET_BED_DIFF_HEIGHT2 =
+        "facet.bedheight.diff.height2";
+    public static final String I18N_FACET_BED_DIFF_HEIGHT2_RAW =
+        "facet.bedheight.diff.height2.raw";
 
-    public static final String I18N_FACET_BED_DIFF_HEIGHT_RAW = "facet.bedheight.diff.height.raw";
+    public static final String I18N_FACET_BED_DIFF_HEIGHT_RAW =
+        "facet.bedheight.diff.height.raw";
 
     public DifferencesState() {
     }
@@ -85,7 +97,8 @@
             return res;
         }
 
-        BedDifferencesResult[] results = (BedDifferencesResult[]) res.getData();
+        BedDifferencesResult[] results =
+            (BedDifferencesResult[])res.getData();
 
         if (results == null || results.length == 0) {
             log.warn("Calculation computed no results!");
@@ -120,8 +133,10 @@
 
         CallMeta meta = context.getMeta();
 
-        newFacets.add(new DataFacet(CSV, "CSV data", ComputeType.ADVANCE, hash, id));
-        newFacets.add(new DataFacet(PDF, "PDF data", ComputeType.ADVANCE, hash, id));
+        newFacets.add(
+            new DataFacet(CSV, "CSV data", ComputeType.ADVANCE, hash, id));
+        newFacets.add(
+            new DataFacet(PDF, "PDF data", ComputeType.ADVANCE, hash, id));
         for (int idx = 0; idx < results.length; idx++) {
             if (results[idx] instanceof BedDiffYearResult) {
                 newFacets.add(new BedDiffFacet(
@@ -224,12 +239,18 @@
         boolean raw
     ) {
         if (raw && ndx == 0) {
-            return Resources.getMsg(meta, I18N_FACET_BED_DIFF_HEIGHT_RAW,
-                I18N_FACET_BED_DIFF_HEIGHT_RAW, new Object[] {result.getNameFirst()});
+            return Resources.getMsg(
+                meta,
+                I18N_FACET_BED_DIFF_HEIGHT_RAW,
+                I18N_FACET_BED_DIFF_HEIGHT_RAW,
+                new Object[] {result.getNameFirst()});
         }
         if (raw && ndx == 1) {
-            return Resources.getMsg(meta, I18N_FACET_BED_DIFF_HEIGHT_RAW,
-                I18N_FACET_BED_DIFF_HEIGHT_RAW, new Object[] {result.getNameSecond()});
+            return Resources.getMsg(
+                meta,
+                I18N_FACET_BED_DIFF_HEIGHT_RAW,
+                I18N_FACET_BED_DIFF_HEIGHT_RAW,
+                new Object[] {result.getNameSecond()});
         }
         if (ndx == 0) {
             return result.getNameFirst();
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadDataCalculate.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadDataCalculate.java	Fri Jan 19 11:23:42 2018 +0100
@@ -39,14 +39,22 @@
     private static final Logger log = Logger
         .getLogger(SedimentLoadDataCalculate.class);
 
-    public static final String I18N_FACET_SEDIMENTLOAD_COARSE = "facet.sedimentload.coarse";
-    public static final String I18N_FACET_SEDIMENTLOAD_SAND = "facet.sedimentload.sand";
-    public static final String I18N_FACET_SEDIMENTLOAD_FINE_MIDDLE = "facet.sedimentload.fine_middle";
-    public static final String I18N_FACET_SEDIMENTLOAD_SUSPSAND = "facet.sedimentload.susp_sand";
-    public static final String I18N_FACET_SEDIMENTLOAD_SUSPSANDBED = "facet.sediemntload.susp_sand_bed";
-    public static final String I18N_FACET_SEDIMENTLOAD_SUSPSEDIMENT = "facet.sedimentload.susp_sediment";
-    public static final String I18N_FACET_SEDIMENTLOAD_TOTAL_LOAD = "facet.sedimentload.total_load";
-    public static final String I18N_FACET_SEDIMENTLOAD_TOTAL = "facet.sedimentload.total";
+    public static final String I18N_FACET_SEDIMENTLOAD_COARSE =
+        "facet.sedimentload.coarse";
+    public static final String I18N_FACET_SEDIMENTLOAD_SAND =
+        "facet.sedimentload.sand";
+    public static final String I18N_FACET_SEDIMENTLOAD_FINE_MIDDLE =
+        "facet.sedimentload.fine_middle";
+    public static final String I18N_FACET_SEDIMENTLOAD_SUSPSAND =
+        "facet.sedimentload.susp_sand";
+    public static final String I18N_FACET_SEDIMENTLOAD_SUSPSANDBED =
+        "facet.sediemntload.susp_sand_bed";
+    public static final String I18N_FACET_SEDIMENTLOAD_SUSPSEDIMENT =
+        "facet.sedimentload.susp_sediment";
+    public static final String I18N_FACET_SEDIMENTLOAD_TOTAL_LOAD =
+        "facet.sedimentload.total_load";
+    public static final String I18N_FACET_SEDIMENTLOAD_TOTAL =
+        "facet.sedimentload.total";
 
     static {
         // Active/deactivate facets.
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadYearSelect.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadYearSelect.java	Fri Jan 19 11:23:42 2018 +0100
@@ -44,7 +44,8 @@
     public boolean validate(Artifact artifact)
     throws IllegalArgumentException
     {
-        SedimentLoadAccess access = new SedimentLoadAccess((D4EArtifact) artifact);
+        SedimentLoadAccess access =
+            new SedimentLoadAccess((D4EArtifact)artifact);
 
         // Second year should be later than first.
         if (access.getYears() == null || access.getYears().length == 0)
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/sq/SQInitState.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/sq/SQInitState.java	Fri Jan 19 11:23:42 2018 +0100
@@ -1,3 +1,11 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
 package org.dive4elements.river.artifacts.states.sq;
 
 import org.dive4elements.river.artifacts.states.DefaultState;
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/sq/SQPeriodSelect.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/sq/SQPeriodSelect.java	Fri Jan 19 11:23:42 2018 +0100
@@ -40,7 +40,8 @@
         RangeAccess access = new RangeAccess(arti);
         double km = access.getLocations()[0];
 
-        SQOverview overview = SQOverviewFactory.getOverview(access.getRiverName());
+        SQOverview overview = SQOverviewFactory.getOverview(
+            access.getRiverName());
 
         /* Filter is not implemented and only checks if a complete
          * KMIndex list is acceptable or not. So KMFiltering wont work */
@@ -48,7 +49,9 @@
         TreeSet<Date> allDates = new TreeSet<Date>();
 
         for (int i = 0; i < entries.size(); i++) {
-            if (EpsilonComparator.CMP.compare(entries.get(i).getKm(), km) == 0) {
+            if (EpsilonComparator.CMP.compare(entries.get(i).getKm(), km)
+                == 0
+            ) {
                 allDates.addAll(entries.get(i).getValue());
             }
         }
@@ -56,7 +59,9 @@
             return null;
         }
 
-        return minDate ? allDates.first().getTime() : allDates.last().getTime();
+        return minDate
+            ? allDates.first().getTime()
+            : allDates.last().getTime();
     }
 
     @Override
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/sq/SQStaticState.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/sq/SQStaticState.java	Fri Jan 19 11:23:42 2018 +0100
@@ -63,7 +63,8 @@
             ms = Integer.parseInt(measurementStation);
         }
         catch (NumberFormatException nfe) {
-            log.error("Unparseable measurement station: " + measurementStation);
+            log.error("Unparseable measurement station: "
+                + measurementStation);
             return null;
         }
         log.debug("Parsed measurement station: " + ms);
@@ -71,7 +72,9 @@
         sqRelations = StaticSQFactory.getSQRelationsForLocation(river, ms);
         DateFormat df = new SimpleDateFormat("yyyy");
 
-        for (StaticSQRelation.Parameter p: StaticSQRelation.Parameter.values()) {
+        for (
+            StaticSQRelation.Parameter p: StaticSQRelation.Parameter.values()
+        ) {
             log.debug("parameter: " + p.toString());
             List<StaticSQRelation> relations =
                 sqRelations.getRelationsByParameter(p);
@@ -81,7 +84,8 @@
 
                 for (StaticSQRelation relation : relations) {
                     log.debug("add facet for " + p.toString().toLowerCase());
-                    String name = "sq_" + p.toString().toLowerCase() + "_curve";
+                    String name = "sq_" + p.toString().toLowerCase()
+                        + "_curve";
                     String desc =
                         Resources.getMsg(context.getMeta(),
                             FACET_DESCRIPTION,
@@ -125,11 +129,12 @@
         }
 
         if (static_id != -1) {
-            // If the next line fails a traceback is the best debug output anyhow
+            // If next line fails a traceback is the best debug output anyhow
             sqRelations = StaticSQFactory.getDistinctRelation(static_id);
             log.debug("Got a distinct relation" + sqRelations);
         } else {
-            StaticSQRelationAccess access = new StaticSQRelationAccess(artifact);
+            StaticSQRelationAccess access =
+                new StaticSQRelationAccess(artifact);
             String river = access.getRiverName();
             String measurementStation = access.getMeasurementStation();
 
@@ -138,7 +143,8 @@
                 ms = Integer.parseInt(measurementStation);
             }
             catch (NumberFormatException nfe) {
-                log.error("Unparseable measurement station: " + measurementStation);
+                log.error("Unparseable measurement station: "
+                    + measurementStation);
                 return null;
             }
             log.debug("Parsed measurement station: " + ms);
@@ -148,7 +154,9 @@
 
         DateFormat df = new SimpleDateFormat("yyyy");
 
-        for (StaticSQRelation.Parameter p: StaticSQRelation.Parameter.values()) {
+        for (
+            StaticSQRelation.Parameter p: StaticSQRelation.Parameter.values()
+        ) {
 
             List<StaticSQRelation> relations =
                 sqRelations.getRelationsByParameter(p);
@@ -157,7 +165,8 @@
                 int count = 0;
 
                 for (StaticSQRelation relation : relations) {
-                    String name = "sq_" + p.toString().toLowerCase() + "_curve";
+                    String name = "sq_" + p.toString().toLowerCase()
+                        + "_curve";
                     String desc = static_desc == null ?
                         Resources.getMsg(meta,
                             FACET_DESCRIPTION,
--- a/artifacts/src/main/java/org/dive4elements/river/collections/AttributeWriter.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/collections/AttributeWriter.java	Fri Jan 19 11:23:42 2018 +0100
@@ -165,7 +165,8 @@
     throws ArtifactDatabaseException
     {
         if (compatibleFacets == null) {
-            log.warn("No compatible facets, not generating out " + outputName + ".");
+            log.warn("No compatible facets, not generating out "
+                + outputName + ".");
             return false;
         }
 
@@ -208,7 +209,8 @@
                     genuinelyNewFacets.add(picked);
                 }
                 else {
-                    log.debug("Skip clone facet that shall be present in two outs");
+                    log.debug(
+                        "Skip clone facet that shall be present in two outs");
                 }
             }
             else {
@@ -253,7 +255,7 @@
             currentFacets.add(newMF);
         }
 
-        // Fill/correct "gaps" (e.g. position 1,2,5 are taken, after gap filling
+        // Fill "gaps" (e.g. position 1,2,5 are taken, after gap filling
         // expect positions 1,2,3 [5->3])
         // Preparations to be able to detect gaps.
         Map<Integer, ManagedFacet> mfmap =
@@ -293,7 +295,10 @@
     /** Returns true if a likely clone of facet is
      * contained in genuinelyNewFacets, as happens when same facet is defined
      * for two outs. */
-    private boolean facetInTwoOuts(ManagedFacet facet, List<ManagedFacet> genuinelyNewFacets) {
+    private boolean facetInTwoOuts(
+        ManagedFacet facet,
+        List<ManagedFacet> genuinelyNewFacets
+    ) {
         for (ManagedFacet otherFacet: genuinelyNewFacets) {
             if (facet.isSame(otherFacet)) {
                 return true;
--- a/artifacts/src/main/java/org/dive4elements/river/collections/D4EArtifactCollection.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/collections/D4EArtifactCollection.java	Fri Jan 19 11:23:42 2018 +0100
@@ -231,7 +231,8 @@
 
         try {
             // Save the merged document into database.
-            getArtifactDB().setCollectionAttribute(identifier(), getContext().getMeta(), doc);
+            getArtifactDB().setCollectionAttribute(
+                identifier(), getContext().getMeta(), doc);
 
             log.info("Saving CollectionAttribute was successful.");
 
@@ -325,7 +326,7 @@
             return null;
         }
 
-        // XXX NOTE: the outGen is not able to process its generate() operation,
+        // XXX NOTE: outGen is not able to process its generate() operation,
         // because it has no OutputStream set!
         Document dummy = XMLUtils.newDocument();
         outGen.init(out, dummy, null, getContext());
@@ -382,7 +383,9 @@
         // If type contains 'chartinfo' use a generator that
         // just allow access to width, height etc.
 
-        String key = type != null && !type.isEmpty() && type.indexOf("chartinfo") > 0
+        String key = type != null
+            && !type.isEmpty()
+            && type.indexOf("chartinfo") > 0
             ? type
             : name;
 
@@ -440,7 +443,10 @@
      *
      * @param generator The generator that gets a master Artifact.
      */
-    protected void prepareMasterArtifact(D4EArtifact master, OutGenerator generator) {
+    protected void prepareMasterArtifact(
+        D4EArtifact master,
+        OutGenerator generator
+    ) {
         // Get master artifact.
         if (master != null) {
             log.debug("Set master Artifact to uuid: " + master.identifier());
@@ -464,7 +470,9 @@
                 identifier(), callMeta);
 
             String masterUUID   = XMLUtils.xpathString(
-                document, XPATH_MASTER_UUID, ArtifactNamespaceContext.INSTANCE);
+                document,
+                XPATH_MASTER_UUID,
+                ArtifactNamespaceContext.INSTANCE);
             D4EArtifact masterArtifact =
                 (D4EArtifact) getArtifact(masterUUID);
             return masterArtifact;
@@ -574,7 +582,7 @@
      * This method returns the list of artifact UUIDs that this collections
      * contains.
      *
-     * @param context The CallContext that is necessary to get information about
+     * @param context CallContext that is necessary to get information about
      * the ArtifactDatabase.
      *
      * @return a list of uuids.
@@ -666,7 +674,9 @@
         try {
             for (String uuid: getArtifactUUIDs()) {
                 D4EArtifact subArt = (D4EArtifact) getArtifact(uuid);
-                if (subArt.getName() != null && subArt.getName().equals(name)) {
+                if (
+                    subArt.getName() != null && subArt.getName().equals(name)
+                ) {
                     ret.add(subArt);
                 }
             }
--- a/artifacts/src/main/java/org/dive4elements/river/collections/OutputParser.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/collections/OutputParser.java	Fri Jan 19 11:23:42 2018 +0100
@@ -100,7 +100,8 @@
                 pos = o.getFacets().size() + 1;
             }
 
-            List<Facet> mfacets = facet2ManagedFacet(uuid, out.getFacets(), pos);
+            List<Facet> mfacets = facet2ManagedFacet(
+                uuid, out.getFacets(), pos);
             o.addFacets(mfacets);
             this.facets.addAll(mfacets);
         }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ATExporter.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/ATExporter.java	Fri Jan 19 11:23:42 2018 +0100
@@ -59,7 +59,12 @@
     }
 
     @Override
-    public void init(String outName, Document request, OutputStream out, CallContext context) {
+    public void init(
+        String outName,
+        Document request,
+        OutputStream out,
+        CallContext context
+    ) {
         this.outName = outName;
         this.context = context;
         this.out     = out;
--- a/artifacts/src/main/java/org/dive4elements/river/exports/AbstractExporter.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/AbstractExporter.java	Fri Jan 19 11:23:42 2018 +0100
@@ -37,7 +37,7 @@
 
 
 /**
- * An abstract exporter that implements some basic methods for exporting data of
+ * Abstract exporter that implements some basic methods for exporting data of
  * artifacts.
  *
  * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
@@ -244,7 +244,8 @@
      * @return true, if <i>facet</i> is valid, otherwise false.
      */
     protected boolean isFacetValid(String facet) {
-        log.debug("AbstractExporter.isFacetValid : " + facet + " (" + getFacet() + ")" );
+        log.debug("AbstractExporter.isFacetValid : "
+            + facet + " (" + getFacet() + ")" );
 
         String thisFacet = getFacet();
 
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ChartExportHelper.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/ChartExportHelper.java	Fri Jan 19 11:23:42 2018 +0100
@@ -152,13 +152,17 @@
 
         ChartRenderingInfo info = new ChartRenderingInfo();
 
-        chart.draw(graphics, new Rectangle2D.Double(0.0D, 0.0D,size[0],size[1]), info);
+        chart.draw(
+            graphics,
+            new Rectangle2D.Double(0.0D, 0.0D,size[0],size[1]),
+            info);
 
         try {
             graphics.stream(new OutputStreamWriter(out, encoding));
         }
         catch (SVGGraphics2DIOException svge) {
-            log.error("Error while writing svg export to output stream.", svge);
+            log.error(
+                "Error while writing svg export to output stream.", svge);
         }
         catch (UnsupportedEncodingException uee) {
             log.error("Unsupported encoding: " + encoding, uee);
@@ -220,7 +224,8 @@
 
         float spaceX = width  - marginLeft - marginRight;
         if (size[0] > spaceX) {
-            log.warn("Width of the chart is too big for pdf -> resize it now.");
+            log.warn(
+                "Width of the chart is too big for pdf -> resize it now.");
             double ratio = ((double)spaceX) / size[0];
             size[0]  *= ratio;
             size[1] *= ratio;
@@ -229,7 +234,8 @@
 
         float spaceY = height - marginTop  - marginBottom;
         if (size[1] > spaceY) {
-            log.warn("Height of the chart is too big for pdf -> resize it now.");
+            log.warn(
+                "Height of the chart is too big for pdf -> resize it now.");
             double ratio = ((double)spaceY) / size[1];
             size[0]  *= ratio;
             size[1] *= ratio;
@@ -247,7 +253,8 @@
         try {
             PdfWriter writer = PdfWriter.getInstance(document, out);
 
-            document.addSubject(chart.getTitle() != null ? chart.getTitle().getText() : "");
+            document.addSubject(
+                chart.getTitle() != null ? chart.getTitle().getText() : "");
             document.addCreationDate();
             document.open();
 
@@ -422,7 +429,7 @@
 
 
     /**
-     * This method returns the anchor of the chart so that the chart is centered
+     * Returns the anchor of the chart so that the chart is centered
      * according to the given parameters.
      *
      * @param mLeft Left margin
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator.java	Fri Jan 19 11:23:42 2018 +0100
@@ -118,7 +118,7 @@
 
     protected D4EArtifactCollection collection;
 
-    /** The artifact that is used to decorate the chart with meta information.*/
+    /** Artifact that is used to decorate the chart with meta information.*/
     protected Artifact master;
 
     /** The settings that should be used during output creation.*/
@@ -128,7 +128,8 @@
     protected SortedMap<Integer, AxisDataset> datasets;
 
     /** List of annotations to insert in plot. */
-    protected List<RiverAnnotation> annotations = new ArrayList<RiverAnnotation>();
+    protected List<RiverAnnotation> annotations =
+        new ArrayList<RiverAnnotation>();
 
     protected String outName;
 
@@ -370,7 +371,12 @@
 
 
     @Override
-    public void init(String outName, Document request, OutputStream out, CallContext context) {
+    public void init(
+        String outName,
+        Document request,
+        OutputStream out,
+        CallContext context
+    ) {
         log.debug("ChartGenerator.init");
 
         this.outName = outName;
@@ -410,7 +416,7 @@
 
 
     /**
-     * Returns an instance of <i>ChartSettings</i> with a chart specific section
+     * Returns instance of <i>ChartSettings</i> with a chart specific section
      * but with no axes settings.
      *
      * @return an instance of <i>ChartSettings</i>.
@@ -486,7 +492,7 @@
 
 
     /**
-     * Creates a list of Sections that contains all axes of the chart (including
+     * Create list of Sections that contains all axes of the chart (including
      * X and Y axes).
      *
      * @return a list of Sections for each axis in this chart.
@@ -959,7 +965,8 @@
                 Long lowerTime = as.getLowerTimeRange();
                 Long upperTime = as.getUpperTimeRange();
                 if ( lowerTime != null && upperTime != null ) {
-                    log.debug("Using time range: " + lowerTime + " - " + upperTime);
+                    log.debug("Using time range: "
+                        + lowerTime + " - " + upperTime);
                     return lowerTime < upperTime
                             ? new Range(lowerTime, upperTime)
                             : new Range(upperTime, lowerTime);
@@ -1218,7 +1225,8 @@
     }
 
 
-    /** Returns null if the (x|y)range-element was not found in request document.
+    /** Returns null if the (x|y)range-element was not found in
+     * request document.
      * This usally means that the axis are not manually zoomed, i.e. showing
      * full data extent. */
     protected String[] getValueAxisRangeFromRequest() {
@@ -1280,7 +1288,8 @@
                         Range.expandToInclude(axisDataset.getRange(), 0d));
                 }
 
-                setYBounds(axisIndex, expandPointRange(axisDataset.getRange()));
+                setYBounds(
+                    axisIndex, expandPointRange(axisDataset.getRange()));
 
                 // Add contained datasets, mapping to axis.
                 for (XYDataset dataset: axisDataset.getDatasets()) {
@@ -1411,7 +1420,8 @@
         area.applyTheme(dRenderer);
 
         // i18n
-        dRenderer.setAreaLabelNumberFormat(Formatter.getFormatter(context.getMeta(), 2, 4));
+        dRenderer.setAreaLabelNumberFormat(
+            Formatter.getFormatter(context.getMeta(), 2, 4));
 
         dRenderer.setAreaLabelTemplate(Resources.getMsg(
             context.getMeta(), "area.label.template", "Area=%sm2"));
@@ -1447,7 +1457,8 @@
         }
         else if (range.getLowerBound() == range.getUpperBound()) {
             Range expandedRange = ChartHelper.expandRange(range, 5d);
-            return new DoubleBounds(expandedRange.getLowerBound(), expandedRange.getUpperBound());
+            return new DoubleBounds(
+                expandedRange.getLowerBound(), expandedRange.getUpperBound());
         }
 
         return new DoubleBounds(range.getLowerBound(), range.getUpperBound());
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator2.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator2.java	Fri Jan 19 11:23:42 2018 +0100
@@ -119,7 +119,7 @@
 
     protected D4EArtifactCollection collection;
 
-    /** The artifact that is used to decorate the chart with meta information.*/
+    /** Artifact that is used to decorate the chart with meta information.*/
     protected Artifact master;
 
     /** The settings that should be used during output creation.*/
@@ -132,7 +132,8 @@
     protected SortedMap<Integer, RiverAnnotation> yAnnotations;
 
     /** List of annotations to insert in plot. */
-    protected List<RiverAnnotation> annotations = new ArrayList<RiverAnnotation>();
+    protected List<RiverAnnotation> annotations =
+        new ArrayList<RiverAnnotation>();
 
     protected abstract List<AxisSection> buildYAxisSections();
 
@@ -379,7 +380,12 @@
 
 
     @Override
-    public void init(String outName, Document request, OutputStream out, CallContext context) {
+    public void init(
+        String outName,
+        Document request,
+        OutputStream out,
+        CallContext context
+    ) {
         log.debug("ChartGenerator2.init");
 
         this.outName = outName;
@@ -419,7 +425,7 @@
 
 
     /**
-     * Returns an instance of <i>ChartSettings</i> with a chart specific section
+     * Return instance of <i>ChartSettings</i> with a chart specific section
      * but with no axes settings.
      *
      * @return an instance of <i>ChartSettings</i>.
@@ -1183,7 +1189,8 @@
     }
 
 
-    /** Returns null if the (x|y)range-element was not found in request document.
+    /** Returns null if the (x|y)range-element was not found in
+     *request document.
      * This usally means that the axis are not manually zoomed, i.e. showing
      * full data extent. */
     protected String[] getValueAxisRangeFromRequest() {
@@ -1381,7 +1388,8 @@
         area.applyTheme(dRenderer);
 
         // i18n
-        dRenderer.setAreaLabelNumberFormat(Formatter.getFormatter(context.getMeta(), 2, 4));
+        dRenderer.setAreaLabelNumberFormat(
+            Formatter.getFormatter(context.getMeta(), 2, 4));
 
         dRenderer.setAreaLabelTemplate(Resources.getMsg(
             context.getMeta(), "area.label.template", "Area=%sm2"));
@@ -1417,7 +1425,8 @@
         }
         else if (range.getLowerBound() == range.getUpperBound()) {
             Range expandedRange = ChartHelper.expandRange(range, 5d);
-            return new DoubleBounds(expandedRange.getLowerBound(), expandedRange.getUpperBound());
+            return new DoubleBounds(
+                expandedRange.getLowerBound(), expandedRange.getUpperBound());
         }
 
         return new DoubleBounds(range.getLowerBound(), range.getUpperBound());
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ChartInfoGenerator.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/ChartInfoGenerator.java	Fri Jan 19 11:23:42 2018 +0100
@@ -81,7 +81,12 @@
      * @param out
      * @param context
      */
-    public void init(String outName, Document request, OutputStream out, CallContext context) {
+    public void init(
+        String outName,
+        Document request,
+        OutputStream out,
+        CallContext context
+    ) {
         this.out = out;
 
         generator.init(outName, request, out, context);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ChartSettings.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/ChartSettings.java	Fri Jan 19 11:23:42 2018 +0100
@@ -229,14 +229,21 @@
 
         section.setIdentifier(id);
         section.setLabel(label);
-        section.setFontSize(Integer.parseInt(fSize.length() > 0 ? fSize : "-1"));
+        section.setFontSize(
+            Integer.parseInt(fSize.length() > 0 ? fSize : "-1"));
         section.setFixed(Boolean.valueOf(fixation));
-        if (upTime != null && !upTime.isEmpty() && lowTime != null && !lowTime.isEmpty()) {
+        if (upTime != null
+            && !upTime.isEmpty()
+            && lowTime != null
+            && !lowTime.isEmpty()
+        ) {
             section.setLowerTimeRange(Long.parseLong(lowTime));
             section.setUpperTimeRange(Long.parseLong(upTime));
         } else {
-            section.setLowerRange(Double.parseDouble(low.length() > 0 ? low : "0"));
-            section.setUpperRange(Double.parseDouble(up.length() > 0 ? up : "0"));
+            section.setLowerRange(
+                Double.parseDouble(low.length() > 0 ? low : "0"));
+            section.setUpperRange(
+                Double.parseDouble(up.length() > 0 ? up : "0"));
         }
         section.setSuggestedLabel(sugLabel);
 
@@ -283,7 +290,8 @@
 
         String vis   = XMLUtils.xpathString(legend, "legend/visibility", null);
         String fSize = XMLUtils.xpathString(legend, "legend/font-size", null);
-        String lthre = XMLUtils.xpathString(legend, "legend/aggregation-threshold", null);
+        String lthre = XMLUtils.xpathString(
+            legend, "legend/aggregation-threshold", null);
 
         if (log.isDebugEnabled()) {
             log.debug("Found legend visibility: '" + vis + "'");
@@ -292,8 +300,10 @@
         }
 
         section.setVisibility(Boolean.valueOf(vis));
-        section.setFontSize(Integer.valueOf(fSize.length() > 0 ? fSize : "-1"));
-        section.setAggregationThreshold(Integer.valueOf(lthre.length() >0 ? lthre : "-1"));
+        section.setFontSize(
+            Integer.valueOf(fSize.length() > 0 ? fSize : "-1"));
+        section.setAggregationThreshold(
+            Integer.valueOf(lthre.length() >0 ? lthre : "-1"));
 
         target.setLegendSection(section);
     }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveExporter.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveExporter.java	Fri Jan 19 11:23:42 2018 +0100
@@ -65,9 +65,12 @@
     public static final String DEFAULT_CSV_W_HEADER  = "W [NN + m]";
     public static final String DEFAULT_CSV_Q_HEADER  = "Q [m\u00b3/s]";
 
-    public static final String PDF_HEADER_MODE = "export.computed.discharge.pdf.mode";
-    public static final String PDF_HEADER_CALC_MODE = "export.computed.discharge.pdf.calc.mode";
-    public static final String JASPER_FILE = "export.computed.discharge.pdf.file";
+    public static final String PDF_HEADER_MODE =
+        "export.computed.discharge.pdf.mode";
+    public static final String PDF_HEADER_CALC_MODE =
+        "export.computed.discharge.pdf.calc.mode";
+    public static final String JASPER_FILE =
+        "export.computed.discharge.pdf.file";
 
     protected List<WQKms> data;
 
@@ -244,7 +247,8 @@
         source.addMetaData("gauge", gaugeName);
         if (!Double.isNaN(gaugeDatum)) {
             NumberFormat mf = Formatter.getMeterFormat(context);
-            source.addMetaData("datum", mf.format(gaugeDatum) + " " + riverUnit);
+            source.addMetaData(
+                "datum", mf.format(gaugeDatum) + " " + riverUnit);
         } else {
             source.addMetaData("datum", "");
         }
@@ -270,7 +274,9 @@
                                                 PDF_HEADER_CALC_MODE,
                                                 "Computed Discharge"));
         } else {
-            source.addMetaData("valid_since", validSince == null ? "" : df.format(validSince));
+            source.addMetaData(
+                "valid_since",
+                validSince == null ? "" : df.format(validSince));
             source.addMetaData("calculation", Resources.getMsg(
                                                 locale,
                                                 PDF_HEADER_MODE,
--- a/artifacts/src/main/java/org/dive4elements/river/exports/CrossSectionGenerator.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/CrossSectionGenerator.java	Fri Jan 19 11:23:42 2018 +0100
@@ -117,7 +117,8 @@
     @Override
     protected String getDefaultChartSubtitle() {
         List<DataProvider> providers =
-                context.getDataProvider(CrossSectionFacet.BLACKBOARD_CS_MASTER_DATA);
+            context.getDataProvider(
+                CrossSectionFacet.BLACKBOARD_CS_MASTER_DATA);
         double km = 0d;
         if (providers.size() > 0) {
             FastCrossSectionLine csl = (FastCrossSectionLine) providers.get(0).
@@ -208,21 +209,37 @@
                 // the lines and a text to display the type.
                 fillPaint = colorForHYKZone(zone.getName());
 
-                XYBoxAnnotation boxA = new XYBoxAnnotation(zone.getFrom(), area.atGround(),
-                        zone.getTo(), area.ofGround(0.03f), basicStroke, tranPaint, fillPaint);
-                XYBoxAnnotation boxB = new XYBoxAnnotation(zone.getFrom(), area.atGround(),
-                        zone.getTo(), area.atTop(), basicStroke, fillPaint, tranPaint);
+                XYBoxAnnotation boxA = new XYBoxAnnotation(
+                    zone.getFrom(),
+                    area.atGround(),
+                    zone.getTo(),
+                    area.ofGround(0.03f),
+                    basicStroke,
+                    tranPaint,
+                    fillPaint);
+                XYBoxAnnotation boxB = new XYBoxAnnotation(
+                    zone.getFrom(),
+                    area.atGround(),
+                    zone.getTo(),
+                    area.atTop(),
+                    basicStroke,
+                    fillPaint,
+                    tranPaint);
 
-                XYTextAnnotation tex = new XYTextAnnotation(zone.getName(),
-                        zone.getFrom() + (zone.getTo() - zone.getFrom()) / 2.0d,
-                        area.ofGround(0.015f));
+                XYTextAnnotation tex = new XYTextAnnotation(
+                    zone.getName(),
+                    zone.getFrom() + (zone.getTo() - zone.getFrom()) / 2.0d,
+                    area.ofGround(0.015f));
                 if (textStyle != null) {
                     textStyle.apply(tex);
                 }
 
-                plot.getRenderer().addAnnotation(boxA, org.jfree.ui.Layer.BACKGROUND);
-                plot.getRenderer().addAnnotation(boxB, org.jfree.ui.Layer.BACKGROUND);
-                plot.getRenderer().addAnnotation(tex,  org.jfree.ui.Layer.BACKGROUND);
+                plot.getRenderer().addAnnotation(
+                    boxA, org.jfree.ui.Layer.BACKGROUND);
+                plot.getRenderer().addAnnotation(
+                    boxB, org.jfree.ui.Layer.BACKGROUND);
+                plot.getRenderer().addAnnotation(
+                    tex,  org.jfree.ui.Layer.BACKGROUND);
             }
         }
     }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java	Fri Jan 19 11:23:42 2018 +0100
@@ -291,10 +291,12 @@
          */
         java.net.URL imageURL;
         if (logo.equals("Intevation")) {
-            imageURL = DiagramGenerator.class.getResource("/images/intevation.png");
+            imageURL = DiagramGenerator.class.getResource(
+                "/images/intevation.png");
         }
         else { // TODO else if ...
-            imageURL = DiagramGenerator.class.getResource("/images/bfg_logo.gif");
+            imageURL = DiagramGenerator.class.getResource(
+                "/images/bfg_logo.gif");
         }
         imageIcon = new ImageIcon(imageURL);
 
@@ -314,7 +316,8 @@
             yPos = (Double)getYBounds(0).getLower();
         }
         else if (placev.equals("center")) {
-            yPos = ((Double)getYBounds(0).getUpper() + (Double)getYBounds(0).getLower())/2d;
+            yPos = ((Double)getYBounds(0).getUpper()
+                + (Double)getYBounds(0).getLower())/2d;
         }
         else {
             log.debug("Unknown place-v value: " + placev);
@@ -330,7 +333,8 @@
             xPos = getRightX();
         }
         else if (placeh.equals("center")) {
-            xPos = ((Double)getXBounds(0).getUpper() + (Double)getXBounds(0).getLower())/2d;
+            xPos = ((Double)getXBounds(0).getUpper()
+                + (Double)getXBounds(0).getLower())/2d;
         }
         else {
             log.debug("Unknown place-h value: " + placeh);
@@ -376,7 +380,8 @@
 
         XYAnnotation xyannotation =
             new XYImageAnnotation(xPos, yPos, imageIcon.getImage(), anchor);
-        plot.getRenderer().addAnnotation(xyannotation, org.jfree.ui.Layer.BACKGROUND);
+        plot.getRenderer().addAnnotation(
+            xyannotation, org.jfree.ui.Layer.BACKGROUND);
     }
 
 
@@ -456,9 +461,14 @@
      * Registers an area to be drawn.
      * @param area Area to be drawn.
      * @param axisName Name of the axis.
-     * @param visible Whether or not to be visible (important for range calculations).
+     * @param visible Whether or not to be visible
+     *                (important for range calculations).
      */
-    public void addAreaSeries(StyledAreaSeriesCollection area, String axisName, boolean visible) {
+    public void addAreaSeries(
+        StyledAreaSeriesCollection area,
+        String axisName,
+        boolean visible
+    ) {
         addAreaSeries(area, diagramAttributes.getAxisIndex(axisName), visible);
     }
 
@@ -466,9 +476,14 @@
      * Registers an area to be drawn.
      * @param area Area to be drawn.
      * @param index 'axis index'
-     * @param visible Whether or not to be visible (important for range calculations).
+     * @param visible Whether or not to be visible
+     *                (important for range calculations).
      */
-    public void addAreaSeries(StyledAreaSeriesCollection area, int index, boolean visible) {
+    public void addAreaSeries(
+        StyledAreaSeriesCollection area,
+        int index,
+        boolean visible
+    ) {
         if (area == null) {
             log.warn("Cannot yet render above/under curve.");
             return;
@@ -510,12 +525,22 @@
      * @param axisName name of the axis.
      * @param visible  whether or not the data should be plotted.
      */
-    public void addAxisSeries(XYSeries series, String axisName, boolean visible) {
-        addAxisSeries(series, diagramAttributes.getAxisIndex(axisName), visible);
+    public void addAxisSeries(
+        XYSeries series,
+        String axisName,
+        boolean visible
+    ) {
+        addAxisSeries(
+            series, diagramAttributes.getAxisIndex(axisName), visible);
     }
 
-    public void addAxisDataset(XYDataset dataset, String axisName, boolean visible) {
-        addAxisDataset(dataset, diagramAttributes.getAxisIndex(axisName), visible);
+    public void addAxisDataset(
+        XYDataset dataset,
+        String axisName,
+        boolean visible
+    ) {
+        addAxisDataset(
+            dataset, diagramAttributes.getAxisIndex(axisName), visible);
     }
 
     /**
@@ -656,7 +681,8 @@
 
 
             if (b != null && b.getLower().equals(b.getUpper())) {
-                log.debug("Check whether to expand a x axis.i ("+b.getLower() + "-" + b.getUpper()+")");
+                log.debug("Check whether to expand a x axis.i ("
+                    + b.getLower() + "-" + b.getUpper() + ")");
                 setXBounds(key, ChartHelper.expandBounds(b, 5));
             }
         }
@@ -788,8 +814,12 @@
      *
      * @return true, if a zoom range was specified, otherwise false.
      */
-    protected boolean zoom(XYPlot plot, ValueAxis axis, Bounds bounds, Range x) {
-
+    protected boolean zoom(
+        XYPlot plot,
+        ValueAxis axis,
+        Bounds bounds,
+        Range x
+    ) {
         if (bounds == null) {
             return false;
         }
@@ -990,7 +1020,8 @@
      * @return hash for given legenditem to identify mergeables.
      */
     public static String legendItemHash(LegendItem li) {
-        // TODO Do proper implementation. Ensure that only mergable sets are created.
+        // TODO Do proper implementation.
+        // Ensure that only mergable sets are created.
         // getFillPaint()
         // getFillPaintTransformer()
         // getLabel()
@@ -1104,7 +1135,9 @@
             }
             return label;
         }
-        for (Processor pr: diagramAttributes.getProcessorsForAxisName(axisName)) {
+        for (
+            Processor pr: diagramAttributes.getProcessorsForAxisName(axisName)
+        ) {
             String label = pr.getAxisLabel(this);
             if (label != null) {
                 return label;
@@ -1122,7 +1155,8 @@
     protected List<AxisSection> buildYAxisSections() {
         List<AxisSection> axisSections = new ArrayList<AxisSection>();
 
-        List<DiagramAttributes.AxisAttributes> axesAttrs = diagramAttributes.getAxesAttributes();
+        List<DiagramAttributes.AxisAttributes> axesAttrs =
+            diagramAttributes.getAxesAttributes();
 
         for (int i = 0, n = axesAttrs.size(); i < n; i++) {
             AxisSection ySection = new AxisSection();
@@ -1208,7 +1242,8 @@
 
                 if (visible) {
                     // Save the label that should be added for this processor
-                    int axisIdx = diagramAttributes.getAxisIndex(pr.getAxisName());
+                    int axisIdx = diagramAttributes.getAxisIndex(
+                        pr.getAxisName());
                     LinkedHashSet<String> curLabels = axesLabels.get(axisIdx);
                     if (curLabels == null) {
                         curLabels = new LinkedHashSet<String>(5);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DischargeCurveGenerator.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/DischargeCurveGenerator.java	Fri Jan 19 11:23:42 2018 +0100
@@ -81,7 +81,11 @@
     /**
      * Returns the PNP (Datum) of gauge, if at gauge, 0 otherwise.
      */
-    public static double getCurrentGaugeDatum(double km, D4EArtifact artifact, double tolerance) {
+    public static double getCurrentGaugeDatum(
+        double km,
+        D4EArtifact artifact,
+        double tolerance
+    ) {
         // Look if there is a gauge at chosen km:
         // Get gauge which is defined for km
         Gauge gauge = new RiverAccess(artifact).getRiver()
@@ -154,22 +158,27 @@
                     fixedWinMRange.getUpperBound());
         }
 
-        log.debug("Syncing Axis Bounds. Bounds W: " + boundsInMGauge.toString() +
-                " Bounds Wcm: " + boundsInCM.toString());
+        log.debug("Syncing Axis Bounds. Bounds W: "
+            + boundsInMGauge.toString()
+            + " Bounds Wcm: " + boundsInCM.toString());
 
         double datum = getCurrentGaugeDatum();
 
         // Convert boundsInMGauge to Datum+cm
-        double convertedLower = ((Double)boundsInMGauge.getLower() - datum) * 100;
-        double convertedUpper = ((Double)boundsInMGauge.getUpper() - datum) * 100;
-        Bounds convertedBounds = new DoubleBounds(convertedLower, convertedUpper);
+        double convertedLower =
+            ((Double)boundsInMGauge.getLower() - datum) * 100;
+        double convertedUpper =
+            ((Double)boundsInMGauge.getUpper() - datum) * 100;
+        Bounds convertedBounds =
+            new DoubleBounds(convertedLower, convertedUpper);
 
         // Now combine both Ranges
         boundsInCM = boundsInCM.combine(convertedBounds);
 
         // Recalculate absolute bounds
-        boundsInMGauge = new DoubleBounds((Double)boundsInCM.getLower() / 100d + datum,
-                                          (Double)boundsInCM.getUpper() / 100d + datum);
+        boundsInMGauge = new DoubleBounds(
+            (Double)boundsInCM.getLower() / 100d + datum,
+            (Double)boundsInCM.getUpper() / 100d + datum);
 
         // Set the new combined bounds
         setYBounds(YAXIS.W.idx, boundsInMGauge);
@@ -222,7 +231,12 @@
 
     /* TODO is this one really needed? */
     @Override
-    protected boolean zoomX(XYPlot plot, ValueAxis axis, Bounds bounds, Range x) {
+    protected boolean zoomX(
+        XYPlot plot,
+        ValueAxis axis,
+        Bounds bounds,
+        Range x
+    ) {
         boolean zoomin = super.zoom(plot, axis, bounds, x);
 
         if (!zoomin) {
@@ -240,12 +254,16 @@
         log.debug("Translate some river annotation.");
         double translate = getCurrentGaugeDatum();
         double factor    = 100d;
-        for (StickyAxisAnnotation annotation: riverAnnotation.getAxisTextAnnotations()){
+        for (StickyAxisAnnotation annotation:
+                 riverAnnotation.getAxisTextAnnotations()
+        ){
             if (!annotation.atX()) {
                 annotation.setPos((annotation.getPos() - translate)*factor);
             }
         }
-        for (XYTextAnnotation annotation: riverAnnotation.getTextAnnotations()) {
+        for (
+            XYTextAnnotation annotation: riverAnnotation.getTextAnnotations()
+        ) {
             annotation.setY((annotation.getY() - translate)*factor);
         }
     }
@@ -260,10 +278,12 @@
         String name = artifactFacet.getFacetName();
         log.debug("DischargeCurveGenerator.doOut: " + name);
 
-        MiscDischargeProcessor dProcessor = new MiscDischargeProcessor(getRange()[0]);
+        MiscDischargeProcessor dProcessor = new MiscDischargeProcessor(
+            getRange()[0]);
         if (dProcessor.canHandle(name)) {
             // In Base DischargeCurveGenerator, always at gauge, use WCm axis.
-            dProcessor.doOut(this, artifactFacet, theme, visible, YAXIS.WCm.idx);
+            dProcessor.doOut(
+                this, artifactFacet, theme, visible, YAXIS.WCm.idx);
         }
         else if (name.equals(DISCHARGE_CURVE)
                 || name.equals(GAUGE_DISCHARGE_CURVE)) {
@@ -286,7 +306,8 @@
                 visible);
         }
         else {
-           log.warn("DischargeCurveGenerator.doOut: Unknown facet name: " + name);
+           log.warn("DischargeCurveGenerator.doOut: Unknown facet name: "
+               + name);
            return;
         }
     }
@@ -408,7 +429,8 @@
 
         // If no Q values (i.e. all -1) found, add annotations.
         if (hasNoDischarge(data)) {
-            List<StickyAxisAnnotation> xy = new ArrayList<StickyAxisAnnotation>();
+            List<StickyAxisAnnotation> xy =
+                new ArrayList<StickyAxisAnnotation>();
 
             for (double y: data[1]) {
                 if (translate != 0d) {
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DurationCurveGenerator.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/DurationCurveGenerator.java	Fri Jan 19 11:23:42 2018 +0100
@@ -134,7 +134,12 @@
 
 
     @Override
-    protected boolean zoomX(XYPlot plot, ValueAxis axis, Bounds bounds, Range x) {
+    protected boolean zoomX(
+        XYPlot plot,
+        ValueAxis axis,
+        Bounds bounds,
+        Range x
+    ) {
         boolean zoomin = super.zoom(plot, axis, bounds, x);
 
         if (!zoomin) {
@@ -153,7 +158,12 @@
      * values on its own.
      */
     @Override
-    protected boolean zoomY(XYPlot plot, ValueAxis axis, Bounds bounds, Range x) {
+    protected boolean zoomY(
+        XYPlot plot,
+        ValueAxis axis,
+        Bounds bounds,
+        Range x
+    ) {
         boolean zoomin = super.zoom(plot, axis, bounds, x);
 
         if (!zoomin && axis instanceof IdentifiableNumberAxis) {
@@ -258,7 +268,8 @@
     ){
         log.debug("DurationCurveGenerator.doPointOut");
 
-        XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
+        XYSeries series =
+            new StyledXYSeries(aandf.getFacetDescription(), theme);
 
         series.add(point.getX(), point.getY());
 
@@ -310,6 +321,7 @@
         };
     }
 
-    // MainValue-Annotations should be visualized by a line that goes to the curve itself.
+    // MainValue-Annotations should be visualized by
+    // a line that goes to the curve itself.
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/artifacts/src/main/java/org/dive4elements/river/exports/FlowVelocityExporter.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/FlowVelocityExporter.java	Fri Jan 19 11:23:42 2018 +0100
@@ -110,10 +110,14 @@
                 String vMain = "";
                 String vTotal = "";
 
-                if (data.getType().equals("main") || data.getType().equals("main_total")) {
+                if (data.getType().equals("main")
+                    || data.getType().equals("main_total")
+                ) {
                     vMain = valF.format(data.getVMain(i));
                 }
-                if (data.getType().equals("total") || data.getType().equals("main_total")) {
+                if (data.getType().equals("total")
+                    || data.getType().equals("main_total")
+                ) {
                     vTotal = valF.format(data.getVTotal(i));
                 }
                 writer.writeNext(new String[] {
--- a/artifacts/src/main/java/org/dive4elements/river/exports/GeneratorLookup.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/GeneratorLookup.java	Fri Jan 19 11:23:42 2018 +0100
@@ -24,7 +24,11 @@
         private Object                ctx;
         private List<ContextInjector> cis;
 
-        public Item(Class<OutGenerator> generator, Object ctx, List<ContextInjector> cis) {
+        public Item(
+            Class<OutGenerator> generator,
+            Object ctx,
+            List<ContextInjector> cis
+        ) {
             this.generator = generator;
             this.ctx       = ctx;
             this.cis       = cis;
--- a/artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeCurveExporter.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeCurveExporter.java	Fri Jan 19 11:23:42 2018 +0100
@@ -92,7 +92,8 @@
             log.debug("Internal data of CalculationResult: " + d.getClass());
 
             if (d instanceof HistoricalDischargeData) {
-                d = (WQTimerange[]) ((HistoricalDischargeData) d).getWQTimeranges();
+                d = (WQTimerange[])((HistoricalDischargeData)d)
+                    .getWQTimeranges();
 
                 if (d instanceof WQTimerange[]) {
                     log.debug("Add new data of type WQTimerange");
@@ -145,12 +146,14 @@
 
 
     protected void writeCSVHeader(CSVWriter writer) {
-        HistoricalDischargeAccess hda = new HistoricalDischargeAccess((D4EArtifact) master);
+        HistoricalDischargeAccess hda =
+            new HistoricalDischargeAccess((D4EArtifact) master);
         writer.writeNext(new String[] {
             msg(CSV_TIMERANGE_HEADER, CSV_TIMERANGE_HEADER),
             msg(CSV_WATERLEVEL_HEADER, CSV_WATERLEVEL_HEADER),
             msg(CSV_DISCHARGE_HEADER, CSV_DISCHARGE_HEADER),
-            (hda.getEvaluationMode() == HistoricalDischargeAccess.EvaluationMode.W)
+            (hda.getEvaluationMode()
+                == HistoricalDischargeAccess.EvaluationMode.W)
                 ? msg(CSV_DIFF_HEADER_W, CSV_DIFF_HEADER_W)
                 : msg(CSV_DIFF_HEADER_Q, CSV_DIFF_HEADER_Q),
             msg(CSV_GAUGENAME_HEADER, CSV_GAUGENAME_HEADER)
--- a/artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeCurveGenerator.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/HistoricalDischargeCurveGenerator.java	Fri Jan 19 11:23:42 2018 +0100
@@ -47,15 +47,20 @@
     private static Logger log = Logger
         .getLogger(HistoricalDischargeCurveGenerator.class);
 
-    public static final String I18N_CHART_TITLE = "chart.historical.discharge.title";
-
-    public static final String I18N_CHART_SUBTITLE = "chart.historical.discharge.subtitle";
+    public static final String I18N_CHART_TITLE =
+        "chart.historical.discharge.title";
 
-    public static final String I18N_XAXIS_LABEL = "chart.historical.discharge.xaxis.label";
+    public static final String I18N_CHART_SUBTITLE =
+        "chart.historical.discharge.subtitle";
 
-    public static final String I18N_YAXIS_LABEL = "chart.historical.discharge.yaxis.label";
+    public static final String I18N_XAXIS_LABEL =
+        "chart.historical.discharge.xaxis.label";
 
-    public static final String I18N_YAXIS_SECOND_LABEL = "chart.historical.discharge.yaxis.second.label";
+    public static final String I18N_YAXIS_LABEL =
+        "chart.historical.discharge.yaxis.label";
+
+    public static final String I18N_YAXIS_SECOND_LABEL =
+        "chart.historical.discharge.yaxis.second.label";
 
     public static enum YAXIS {
         W(0), Q(1);
@@ -159,7 +164,8 @@
         }
         else if (FacetTypes.IS.MANUALPOINTS(name)) {
             HistoricalDischargeAccess.EvaluationMode mode =
-                new HistoricalDischargeAccess((D4EArtifact)getMaster()).getEvaluationMode();
+                new HistoricalDischargeAccess(
+                    (D4EArtifact)getMaster()).getEvaluationMode();
             int axis = mode == HistoricalDischargeAccess.EvaluationMode.W
                 ? YAXIS.Q.idx
                 : YAXIS.W.idx;
@@ -228,7 +234,11 @@
      * looks like a "step chart".
      */
     protected TimeSeriesCollection newTimeSeriesCollection(
-        Timerange[] timeranges, double[] values, ThemeDocument theme, String desc) {
+        Timerange[] timeranges,
+        double[] values,
+        ThemeDocument theme,
+        String desc
+    ) {
         log.debug("Create new TimeSeriesCollection for: " + desc);
 
         TimeSeriesCollection tsc = new TimeSeriesCollection();
@@ -263,7 +273,8 @@
     }
 
     /**
-     * Creates an array that consists of two <i>FixedMillisecond</i> periods [start, end].
+     * Create array that consists of two
+     * <i>FixedMillisecond</i> periods [start, end].
      *
      * @param timerange
      *            Supports start and end time.
@@ -274,7 +285,9 @@
         Date start = new Date(timerange.getStart());
         Date end = new Date(timerange.getEnd() - 1000 * 60 * 60 * 24);
 
-        return new RegularTimePeriod[] { new FixedMillisecond(start), new FixedMillisecond(end) };
+        return new RegularTimePeriod[] {
+            new FixedMillisecond(start),
+            new FixedMillisecond(end) };
     }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :
--- a/artifacts/src/main/java/org/dive4elements/river/exports/LegendProcessor.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/LegendProcessor.java	Fri Jan 19 11:23:42 2018 +0100
@@ -38,7 +38,8 @@
      * @return hash for given legenditem to identify mergeables.
      */
     protected static String legendItemHash(LegendItem li) {
-        // TODO Do proper implementation. Ensure that only mergable sets are created.
+        // TODO Do proper implementation.
+        // Ensure that only mergable sets are created.
         // getFillPaint()
         // getFillPaintTransformer()
         // getLabel()
@@ -86,7 +87,8 @@
             return;
         }
 
-        HashMap<String, List<LegendItem>> entries = new LinkedHashMap<String, List<LegendItem>>();
+        HashMap<String, List<LegendItem>> entries =
+            new LinkedHashMap<String, List<LegendItem>>();
         for (Iterator<LegendItem> i = old.iterator(); i.hasNext();) {
             LegendItem item = i.next();
             String hash = legendItemHash(item);
@@ -114,8 +116,9 @@
             if (itemList.size() >= AGGR_THRESHOLD) {
                 // Now do merging.
                 // XXX: DEAD CODE // LegendItem item = itemList.get(0);
-                // Unfortunately we cannot clone and just setDescription, as this
-                // method was added in JFreeChart 1.0.14 (we are at .13).
+                // Unfortunately we cannot clone and just setDescription,
+                // as this method was added in JFreeChart 1.0.14
+                // (we are at .13).
 
                 // Remove the shapes of all but the first items,
                 // to prevent "overfill" of legenditemblock.
@@ -125,11 +128,21 @@
 
                         // Make shape and line really small.
                         LegendItem merged = new LegendItem(
-                            "," + litem.getLabel(), litem.getDescription(), litem.getToolTipText(),
-                            litem.getURLText(), false, SPACE,
-                            false, litem.getFillPaint(), false,
-                            litem.getOutlinePaint(), litem.getOutlineStroke(), false,
-                            SPACE, litem.getLineStroke(), litem.getLinePaint());
+                            "," + litem.getLabel(),
+                            litem.getDescription(),
+                            litem.getToolTipText(),
+                            litem.getURLText(),
+                            false,
+                            SPACE,
+                            false,
+                            litem.getFillPaint(),
+                            false,
+                            litem.getOutlinePaint(),
+                            litem.getOutlineStroke(),
+                            false,
+                            SPACE,
+                            litem.getLineStroke(),
+                            litem.getLinePaint());
                         newLegend.add(merged);
                     }
                     else {
--- a/artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator.java	Fri Jan 19 11:23:42 2018 +0100
@@ -92,7 +92,8 @@
     public static final String I18N_2YAXIS_LABEL =
         "chart.longitudinal.section.yaxis.second.label";
 
-    public static final String I18N_CHART_TITLE_DEFAULT  = "W-L\u00e4ngsschnitt";
+    public static final String I18N_CHART_TITLE_DEFAULT =
+        "W-L\u00e4ngsschnitt";
     public static final String I18N_XAXIS_LABEL_DEFAULT  = "km";
     public static final String I18N_YAXIS_LABEL_DEFAULT  = "W [NN + m]";
     public static final String I18N_2YAXIS_LABEL_DEFAULT = "Q [m\u00b3/s]";
@@ -228,7 +229,8 @@
             label = msg(getQAxisLabelKey(), getQAxisDefaultLabel());
         }
         else if (index == YAXIS.D.idx) {
-            label = msg(I18N_WDIFF_YAXIS_LABEL, I18N_WDIFF_YAXIS_LABEL_DEFAULT);
+            label = msg(
+                I18N_WDIFF_YAXIS_LABEL, I18N_WDIFF_YAXIS_LABEL_DEFAULT);
         }
 
         return label;
@@ -345,19 +347,24 @@
         Processor annotationProcessor = new AnnotationProcessor();
 
         if (wProcessor.canHandle(name)) {
-            wProcessor.doOut(this, artifactAndFacet, attr, visible, YAXIS.W.idx);
+            wProcessor.doOut(
+                this, artifactAndFacet, attr, visible, YAXIS.W.idx);
         }
         if (qProcessor.canHandle(name)) {
-            qProcessor.doOut(this, artifactAndFacet, attr, visible, YAXIS.Q.idx);
+            qProcessor.doOut(
+                this, artifactAndFacet, attr, visible, YAXIS.Q.idx);
         }
         else if (bdyProcessor.canHandle(name)) {
-           bdyProcessor.doOut(this, artifactAndFacet, attr, visible, YAXIS.W.idx);
+           bdyProcessor.doOut(
+               this, artifactAndFacet, attr, visible, YAXIS.W.idx);
         }
         else if (bdhyProcessor.canHandle(name)) {
-           bdhyProcessor.doOut(this, artifactAndFacet, attr, visible, YAXIS.W.idx);
+           bdhyProcessor.doOut(
+               this, artifactAndFacet, attr, visible, YAXIS.W.idx);
         }
         else if (annotationProcessor.canHandle(name)) {
-            annotationProcessor.doOut(this, artifactAndFacet, attr, visible, 0);
+            annotationProcessor.doOut(
+                this, artifactAndFacet, attr, visible, 0);
         }
         else if (name.equals(W_DIFFERENCES)) {
             doWDifferencesOut(
@@ -402,7 +409,8 @@
             return;
          }
 
-        XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
+        XYSeries series =
+            new StyledXYSeries(aandf.getFacetDescription(), theme);
 
         if (log.isDebugEnabled()) {
             if (wkms.size() > 0) {
@@ -473,20 +481,24 @@
             up = new StyledXYSeries(seriesName, false, theme);
             if (data.getUpperData() instanceof WQKms) {
                 if (FacetTypes.IS.Q(data.getUpperFacetName())) {
-                    StyledSeriesBuilder.addPointsKmQ(up, (WQKms) data.getUpperData());
+                    StyledSeriesBuilder.addPointsKmQ(
+                        up, (WQKms)data.getUpperData());
                 }
                 else {
-                    StyledSeriesBuilder.addPoints(up, (WKms) data.getUpperData());
+                    StyledSeriesBuilder.addPoints(
+                        up, (WKms) data.getUpperData());
                 }
             }
             else if (data.getUpperData() instanceof double[][]) {
-                StyledSeriesBuilder.addPoints(up, (double [][]) data.getUpperData(), false);
+                StyledSeriesBuilder.addPoints(
+                    up, (double [][]) data.getUpperData(), false);
             }
             else if (data.getUpperData() instanceof WKms) {
                 StyledSeriesBuilder.addPoints(up, (WKms) data.getUpperData());
             }
             else if (data.getUpperData() instanceof Lines.LineData) {
-                StyledSeriesBuilder.addPoints(up, ((Lines.LineData) data.getUpperData()).points, false);
+                StyledSeriesBuilder.addPoints(
+                    up, ((Lines.LineData) data.getUpperData()).points, false);
             }
             else {
                 log.error("Do not know how to deal with (up) area info from: "
@@ -494,7 +506,8 @@
             }
         }
 
-        // TODO Depending on style, the area (e.g. 20m^2) should be added as annotation.
+        // TODO Depending on style, the area (e.g. 20m^2)
+        // should be added as annotation.
 
         if (data.getLowerData() != null) {
             // TODO: Sort this out: when the two series have the same name,
@@ -502,23 +515,31 @@
             down = new StyledXYSeries(seriesName + " ", false, theme);
             if (data.getLowerData() instanceof WQKms) {
                 if (FacetTypes.IS.Q(data.getLowerFacetName())) {
-                    StyledSeriesBuilder.addPointsKmQ(down, (WQKms) data.getLowerData());
+                    StyledSeriesBuilder.addPointsKmQ(
+                        down, (WQKms) data.getLowerData());
                 }
                 else {
-                    StyledSeriesBuilder.addPoints(down, (WQKms) data.getLowerData());
+                    StyledSeriesBuilder.addPoints(
+                        down, (WQKms) data.getLowerData());
                 }
             }
             else if (data.getLowerData() instanceof double[][]) {
-                StyledSeriesBuilder.addPoints(down, (double[][]) data.getLowerData(), false);
+                StyledSeriesBuilder.addPoints(
+                    down, (double[][]) data.getLowerData(), false);
             }
             else if (data.getLowerData() instanceof WKms) {
-                StyledSeriesBuilder.addPoints(down, (WKms) data.getLowerData());
+                StyledSeriesBuilder.addPoints(
+                    down, (WKms) data.getLowerData());
             }
             else if (data.getLowerData() instanceof Lines.LineData) {
-                StyledSeriesBuilder.addPoints(down, ((Lines.LineData) data.getLowerData()).points, false);
+                StyledSeriesBuilder.addPoints(
+                    down,
+                    ((Lines.LineData) data.getLowerData()).points,
+                    false);
             }
             else {
-                log.error("Do not know how to deal with (down) area info from: "
+                log.error(
+                    "Do not know how to deal with (down) area info from: "
                     + data.getLowerData());
             }
         }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator2.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator2.java	Fri Jan 19 11:23:42 2018 +0100
@@ -27,7 +27,8 @@
 
 public class LongitudinalSectionGenerator2 extends DiagramGenerator
 {
-    private static Logger log = Logger.getLogger(LongitudinalSectionGenerator2.class);
+    private static Logger log = Logger.getLogger(
+        LongitudinalSectionGenerator2.class);
 
     /** Wrapper around the doOut info for postprocessing. */
     protected static class SuperBundle
@@ -35,7 +36,11 @@
         public ArtifactAndFacet bundle;
         public ThemeDocument theme;
         boolean visible;
-        public SuperBundle(ArtifactAndFacet bundle, ThemeDocument theme, boolean visible) {
+        public SuperBundle(
+            ArtifactAndFacet bundle,
+            ThemeDocument theme,
+            boolean visible
+        ) {
             this.bundle = bundle;
             this.theme = theme;
             this.visible = visible;
@@ -153,7 +158,10 @@
         calculateRadius(); // This calculates the real start and end km's
 
         for (SuperBundle superbundle: postOutAF) {
-            super.doOut(superbundle.bundle, superbundle.theme, superbundle.visible);
+            super.doOut(
+                superbundle.bundle,
+                superbundle.theme,
+                superbundle.visible);
         }
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/exports/MapGenerator.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/MapGenerator.java	Fri Jan 19 11:23:42 2018 +0100
@@ -73,7 +73,12 @@
     }
 
     @Override
-    public void init(String outName, Document request, OutputStream out, CallContext context) {
+    public void init(
+        String outName,
+        Document request,
+        OutputStream out,
+        CallContext context
+    ) {
         log.debug("MapGenerator.init");
 
         this.outName  = outName;
@@ -150,13 +155,22 @@
         try {
             if(wms instanceof WSPLGENLayerFacet) {
                 // Retrieve waterlevel ground differences from artifact
-                StateData dFrom = flys.getData(WaterlevelGroundDifferences.LOWER_FIELD);
-                StateData dTo   = flys.getData(WaterlevelGroundDifferences.UPPER_FIELD);
-                StateData dStep = flys.getData(WaterlevelGroundDifferences.DIFF_FIELD);
+                StateData dFrom =
+                    flys.getData(WaterlevelGroundDifferences.LOWER_FIELD);
+                StateData dTo =
+                    flys.getData(WaterlevelGroundDifferences.UPPER_FIELD);
+                StateData dStep =
+                    flys.getData(WaterlevelGroundDifferences.DIFF_FIELD);
 
-                String fromStr = dFrom != null ? (String) dFrom.getValue() : null;
-                String toStr   = dTo   != null ? (String) dTo.getValue()   : null;
-                String stepStr = dStep != null ? (String) dStep.getValue() : null;
+                String fromStr = dFrom != null
+                    ? (String) dFrom.getValue()
+                    : null;
+                String toStr   = dTo   != null
+                    ? (String) dTo.getValue()
+                    : null;
+                String stepStr = dStep != null
+                    ? (String) dStep.getValue()
+                    : null;
 
                 float from = Float.parseFloat(fromStr);
                 float to   = Float.parseFloat(toStr);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/OutGenerator.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/OutGenerator.java	Fri Jan 19 11:23:42 2018 +0100
@@ -43,7 +43,12 @@
      * @param context The CallContext that provides further information and
      * objects used for the output generation.
      */
-    void init(String outName, Document request, OutputStream out, CallContext context);
+    void init(
+        String outName,
+        Document request,
+        OutputStream out,
+        CallContext context
+    );
 
     /**
      * This method is used to tell the OutGenerator which artifact is the master
@@ -64,8 +69,8 @@
      * Creates the output of an Artifact and appends that single output to the
      * total output.
      *
-     * @param bundle The Facet and artifact that provides information and data for the
-     * single output.
+     * @param bundle The Facet and artifact that provides information and
+     * data for the single output.
      * @param attr A document that might contain some attributes used while
      * producing the output.
      * @param visible Specifies, if this output should be visible or not.
@@ -80,7 +85,7 @@
     void generate() throws IOException;
 
     /**
-     * This method is used to set a <i>Settings</i> object for the <i>Output</i>
+     * Used to set a <i>Settings</i> object for the <i>Output</i>
      * that is produced by this <i>OutGenerator</i>.
      *
      * @param settings The <i>Settings</i> that might be used while
--- a/artifacts/src/main/java/org/dive4elements/river/exports/OutputHelper.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/OutputHelper.java	Fri Jan 19 11:23:42 2018 +0100
@@ -57,7 +57,10 @@
         this.masterArtifact = masterArtifact;
     }
 
-    private static List<ContextInjector> getContextInjectors(CallContext context, String out) {
+    private static List<ContextInjector> getContextInjectors(
+        CallContext context,
+        String out
+    ) {
         RiverContext flysContext = context instanceof RiverContext
             ? (RiverContext)context
             : (RiverContext)context.globalContext();
@@ -189,7 +192,8 @@
         Document attr = db.getCollectionItemAttribute(identifier, uuid, meta);
 
         if (attr == null) {
-            attr = initItemAttribute(uuid, facet, pattern, index, outName, context);
+            attr = initItemAttribute(
+                uuid, facet, pattern, index, outName, context);
 
             if (attr == null) {
                 return null;
@@ -227,7 +231,8 @@
             vars);
 
         if (theme == null) {
-            log.warn("Could not find the theme in attribute of: " + facet + " " + uuid);
+            log.warn("Could not find the theme in attribute of: "
+                + facet + " " + uuid);
 
             Theme t = getThemeForFacet(
                 uuid, facet, pattern, index, outName, context);
@@ -364,11 +369,14 @@
                 Artifact artifact  = getArtifact(uuid, context);
                 D4EArtifact flys  = (D4EArtifact) artifact;
                 Facet face = flys.getNativeFacet(theme, outname);
-                log.debug("Looking for Native Facet for theme: " + theme + " and out: " +
-                        outname + " in artifact: " + uuid +
-                        face == null ? " Found. " : " Not Found. ");
+                log.debug("Looking for Native Facet for theme: "
+                    + theme + " and out: "
+                    + outname + " in artifact: " + uuid
+                    + face == null ? " Found. " : " Not Found. ");
                 if (face == null) {
-                    log.warn("Theme " + theme.getName() + " for " + outname + " has no facets!. Removing theme.");
+                    log.warn("Theme " + theme.getName()
+                        + " for " + outname
+                        + " has no facets!. Removing theme.");
                     themeList.remove(i);
                     i--;
                     continue;
@@ -437,7 +445,8 @@
             log.debug("OutputHelper.initItemAttribute");
         }
 
-        Theme t = getThemeForFacet(uuid, facet, pattern, index, outName, context);
+        Theme t = getThemeForFacet(
+            uuid, facet, pattern, index, outName, context);
 
         if (t == null) {
             log.info("Could not find theme for facet. Cancel initialization.");
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ReferenceCurveExporter.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/ReferenceCurveExporter.java	Fri Jan 19 11:23:42 2018 +0100
@@ -70,16 +70,25 @@
 
     public static final String DEFAULT_CSV_LOCATION_HEADER = "Lage";
 
-    public static final String RC_DEFAULT_CSV_KM_HEADER = "Fluss-Km";
-    public static final String RC_DEFAULT_CSV_W_M_HEADER  = "W (m + NHN)";
-    public static final String RC_DEFAULT_CSV_W_CM_HEADER  = "W (cm am Pegel)";
-    public static final String RC_DEFAULT_CSV_Q_HEADER  = "gleichw. Q (m\u00b3/s)";
+    public static final String RC_DEFAULT_CSV_KM_HEADER =
+        "Fluss-Km";
+    public static final String RC_DEFAULT_CSV_W_M_HEADER =
+        "W (m + NHN)";
+    public static final String RC_DEFAULT_CSV_W_CM_HEADER =
+        "W (cm am Pegel)";
+    public static final String RC_DEFAULT_CSV_Q_HEADER =
+        "gleichw. Q (m\u00b3/s)";
 
-    public static final String PDF_HEADER_MODE = "export.reference_curve.pdf.mode";
-    public static final String JASPER_FILE = "export.reference_curve.pdf.file";
-    public static final String JASPER_FILE_GAUGE = "export.reference_curve.pdf.file.gauge";
-    public static final String JASPER_FILE_GAUGE_END = "export.reference_curve.pdf.file.gauge.end";
-    public static final String JASPER_FILE_GAUGE_START_END = "export.reference_curve.pdf.file.gauge.start.end";
+    public static final String PDF_HEADER_MODE =
+        "export.reference_curve.pdf.mode";
+    public static final String JASPER_FILE =
+        "export.reference_curve.pdf.file";
+    public static final String JASPER_FILE_GAUGE =
+        "export.reference_curve.pdf.file.gauge";
+    public static final String JASPER_FILE_GAUGE_END =
+        "export.reference_curve.pdf.file.gauge.end";
+    public static final String JASPER_FILE_GAUGE_START_END =
+        "export.reference_curve.pdf.file.gauge.start.end";
 
     /** The storage that contains all WKms objects for the different facets. */
     protected List<WWQQ[]> data;
@@ -111,7 +120,8 @@
             generatePDF();
         }
         else {
-            throw new IOException("invalid facet (" + facet + ") for exporter");
+            throw new IOException(
+                "invalid facet (" + facet + ") for exporter");
         }
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ReferenceCurveGenerator.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/ReferenceCurveGenerator.java	Fri Jan 19 11:23:42 2018 +0100
@@ -169,7 +169,8 @@
         }
         else if (name.equals(MAINVALUES_W)) {
             doAnnotations(
-                ((RiverAnnotation) artifactFacet.getData(context)).flipStickyAxis(),
+                ((RiverAnnotation)artifactFacet.getData(context))
+                    .flipStickyAxis(),
                 artifactFacet,
                 theme,
                 visible);
@@ -223,7 +224,8 @@
     ){
         log.debug("ReferenceCurveGenerator.doPointOut");
 
-        XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
+        XYSeries series =
+            new StyledXYSeries(aandf.getFacetDescription(), theme);
 
         series.add(point.getX(), point.getY());
 
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ReportGenerator.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/ReportGenerator.java	Fri Jan 19 11:23:42 2018 +0100
@@ -47,7 +47,12 @@
     }
 
     @Override
-    public void init(String outName, Document request, OutputStream out, CallContext context) {
+    public void init(
+        String outName,
+        Document request,
+        OutputStream out,
+        CallContext context
+    ) {
         log.debug("init");
         this.outName = outName;
         this.out     = out;
@@ -102,7 +107,7 @@
 
 
     /**
-     * This method is not implemented. Override it in subclasses if those need a
+     * Not implemented. Override it in subclasses if those need a
      * <i>Settings</i> object.
      */
     public void setSettings(Settings settings) {
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ShapeExporter.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/ShapeExporter.java	Fri Jan 19 11:23:42 2018 +0100
@@ -1,3 +1,11 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
 package org.dive4elements.river.exports;
 
 import java.io.File;
@@ -37,7 +45,12 @@
     }
 
     @Override
-    public void init(String outName, Document request, OutputStream out, CallContext context) {
+    public void init(
+        String outName,
+        Document request,
+        OutputStream out,
+        CallContext context
+    ) {
         this.outName = outName;
         this.request = request;
         this.out = out;
@@ -55,7 +68,11 @@
     }
 
     @Override
-    public void doOut(ArtifactAndFacet bundle, ThemeDocument attr, boolean visible) {
+    public void doOut(
+        ArtifactAndFacet bundle,
+        ThemeDocument attr,
+        boolean visible
+    ) {
         String name = bundle.getFacetName();
 
         if (!isFacetValid(name)) {
--- a/artifacts/src/main/java/org/dive4elements/river/exports/StyledSeriesBuilder.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/StyledSeriesBuilder.java	Fri Jan 19 11:23:42 2018 +0100
@@ -40,7 +40,8 @@
 
 
     /**
-     * Add points to series, create gaps if certain distance between points is met.
+     * Add points to series, create gaps if certain distance
+     * between points is met.
      *
      * @param series Series to add points to.
      * @param points Points to add to series, points[0] to 1st dim, points[1]
@@ -48,9 +49,15 @@
      * @param skipNANs if true, skip NAN values in points parameter. Otherwise,
      *                 the NaNs lead to gaps in graph.
      * @param distance if two consecutive entries in points[0] are more
-     *                 than distance apart, create a NaN value to skip in display.
+     *                 than distance apart, create a NaN value to skip
+     *                 in display.
      */
-    public static void addPoints(XYSeries series, double[][] points, boolean skipNANs, double distance) {
+    public static void addPoints(
+        XYSeries series,
+        double[][] points,
+        boolean skipNANs,
+        double distance
+    ) {
         if (points == null || points.length <= 1) {
             return;
         }
@@ -108,7 +115,11 @@
      *               to 2nd dim.
      * @param skipNANs if true, skip NAN values in points parameter.
      */
-    public static void addPoints(XYSeries series, double[][] points, boolean skipNANs) {
+    public static void addPoints(
+        XYSeries series,
+        double[][] points,
+        boolean skipNANs
+    ) {
         if (points == null || points.length <= 1) {
             return;
         }
@@ -218,7 +229,8 @@
                 double prevQ;
                 if (wqkms.getKm(i + 1) < wqkms.getKm(i)) {
                     /* Depending on the data direction the previous km / q
-                     * might have a larger index when we draw right to left data. */
+                     * might have a larger index when we draw
+                     * right to left data. */
                     prevX = wqkms.getKm(i + 1);
                     prevQ = wqkms.getQ(i + 1);
                 } else {
@@ -260,7 +272,12 @@
      * @param wAdd Value to add to each Q while adding to series.
      * @param wScale multiply with
      */
-    public static void addPointsQW(XYSeries series, double[][] qws, double wTrans, double wScale) {
+    public static void addPointsQW(
+        XYSeries series,
+        double[][] qws,
+        double wTrans,
+        double wScale
+    ) {
         if (qws == null || qws.length == 0) {
             return;
         }
@@ -281,7 +298,12 @@
      * @param wAdd Value to add to each Q while adding to series.
      * @param wScale multiply with
      */
-    public static void addPointsQW(XYSeries series, WQKms wqkms, double wTrans, double wScale) {
+    public static void addPointsQW(
+        XYSeries series,
+        WQKms wqkms,
+        double wTrans,
+        double wScale
+    ) {
         if (wqkms == null) {
             return;
         }
@@ -359,7 +381,8 @@
      * between the newly created and the given series.
      */
     public static XYSeries createGroundAtInfinity(XYSeries series) {
-        XYSeries ground = new XYSeries(series.getKey() + /** TODO rand + */ "INF");
+        XYSeries ground =
+            new XYSeries(series.getKey() + /** TODO rand + */ "INF");
         ground.add(series.getMinX(), -BIG_DOUBLE_VALUE);
         ground.add(series.getMaxX(), -BIG_DOUBLE_VALUE);
         return ground;
@@ -371,7 +394,8 @@
      * between the newly created and the given series.
      */
     public static XYSeries createCeilingAtInfinity(XYSeries series) {
-        XYSeries ground = new XYSeries(series.getKey() + /** TODO rand + */ "INF");
+        XYSeries ground =
+            new XYSeries(series.getKey() + /** TODO rand + */ "INF");
         ground.add(series.getMinX(), BIG_DOUBLE_VALUE);
         ground.add(series.getMaxX(), BIG_DOUBLE_VALUE);
         return ground;
--- a/artifacts/src/main/java/org/dive4elements/river/exports/TimeseriesChartGenerator.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/TimeseriesChartGenerator.java	Fri Jan 19 11:23:42 2018 +0100
@@ -183,10 +183,12 @@
          */
         java.net.URL imageURL;
         if (logo.equals("Intevation")) {
-            imageURL = XYChartGenerator.class.getResource("/images/intevation.png");
+            imageURL = XYChartGenerator.class.getResource(
+                "/images/intevation.png");
         }
         else { // TODO else if ...
-            imageURL = XYChartGenerator.class.getResource("/images/bfg_logo.gif");
+            imageURL = XYChartGenerator.class.getResource(
+                "/images/bfg_logo.gif");
         }
         imageIcon = new ImageIcon(imageURL);
         double xPos = 0d, yPos = 0d;
@@ -204,7 +206,8 @@
             yPos = (Double)getYBounds(0).getLower();
         }
         else if (placev.equals("center")) {
-            yPos = ((Double)getYBounds(0).getUpper() + (Double)getYBounds(0).getLower())/2d;
+            yPos = ((Double)getYBounds(0).getUpper()
+                + (Double)getYBounds(0).getLower())/2d;
         }
         else {
             log.debug("Unknown place-v value: " + placev);
@@ -220,7 +223,8 @@
             xPos = getRightX();
         }
         else if (placeh.equals("center")) {
-            xPos = ((Long)getXBounds(0).getUpper() + (Long)getXBounds(0).getLower())/2d;
+            xPos = ((Long)getXBounds(0).getUpper()
+                + (Long)getXBounds(0).getLower())/2d;
         }
         else {
             log.debug("Unknown place-h value: " + placeh);
@@ -266,7 +270,8 @@
 
         XYAnnotation xyannotation =
             new XYImageAnnotation(xPos, yPos, imageIcon.getImage(), anchor);
-        plot.getRenderer().addAnnotation(xyannotation, org.jfree.ui.Layer.BACKGROUND);
+        plot.getRenderer().addAnnotation(
+            xyannotation, org.jfree.ui.Layer.BACKGROUND);
     }
 
     /**
@@ -418,13 +423,13 @@
         if (rx == null) {
             log.warn("Range for x axis not set." +
                         " Using default values: 0 - 1.");
-            rx = new TimeBounds(0l, 1l);
+            rx = new TimeBounds(0L, 1L);
         }
 
         if (ry == null) {
             log.warn("Range for y axis not set." +
                         " Using default values: 0 - 1.");
-            ry = new DoubleBounds(0l, 1l);
+            ry = new DoubleBounds(0L, 1L);
         }
 
         log.debug("X Bounds at index " + index + " is: " + rx);
@@ -528,8 +533,10 @@
             long max  = total.getUpper().longValue();
             long diff = max > min ? max - min : min - max;
 
-            long newMin = Math.round(min + user.getLower().doubleValue() * diff);
-            long newMax = Math.round(min + user.getUpper().doubleValue() * diff);
+            long newMin = Math.round(
+                min + user.getLower().doubleValue() * diff);
+            long newMax = Math.round(
+                min + user.getUpper().doubleValue() * diff);
 
             TimeBounds newBounds = new TimeBounds(newMin, newMax);
 
@@ -585,7 +592,8 @@
 
 
     /**
-     * Adjusts the (look of) axes of a plot. This method sets the <i>labelFont</i> of the
+     * Adjusts the (look of) axes of a plot.
+     * This method sets the <i>labelFont</i> of the
      * X axis.
      *
      * (Duplicate in XYChartGenerator).
@@ -610,7 +618,8 @@
     }
 
 
-    protected Date decodeXAxisValue(JSONArray array) throws JSONException, ParseException {
+    protected Date decodeXAxisValue(JSONArray array)
+        throws JSONException, ParseException {
         try {
             double x = array.getDouble(0);
             long l = (new Double(x)).longValue();
@@ -639,7 +648,8 @@
 
         // Add text annotations for single points.
         List<XYTextAnnotation> xy = new ArrayList<XYTextAnnotation>();
-        HashMap<FixedMillisecond, String> names = new HashMap<FixedMillisecond, String>();
+        HashMap<FixedMillisecond, String> names =
+            new HashMap<FixedMillisecond, String>();
 
         try {
             JSONArray points = new JSONArray((String) o);
@@ -685,7 +695,8 @@
             new RiverAnnotation(null, null, null, theme);
         annotations.setTextAnnotations(xy);
 
-        // Do not generate second legend entry. (null was passed for the aand before).
+        // Do not generate second legend entry.
+        // (null was passed for the aand before).
         doAnnotations(annotations, null, theme, visible);
 
         addAxisDataset(tsc, axisIndex, visible);
@@ -768,7 +779,8 @@
                                     legendItem.getLinePaint()
                                     );
                             interLegend.setSeriesKey(series.getKey());
-                            log.debug("applySeriesAttributes: draw unfilled legend item");
+                            log.debug("applySeriesAttributes: "
+                                + "draw unfilled legend item");
                             plot.getLegendItems().add(interLegend);
                         }
                     }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/TypeSection.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/TypeSection.java	Fri Jan 19 11:23:42 2018 +0100
@@ -27,7 +27,11 @@
 
 
     /** Set a string value for a attribute with additional (choice) type. */
-    public void setChoiceStringValue(String key, String value, String choiceType) {
+    public void setChoiceStringValue(
+        String key,
+        String value,
+        String choiceType
+    ) {
         if (value == null || value.length() == 0) {
             return;
         }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java	Fri Jan 19 11:23:42 2018 +0100
@@ -161,9 +161,12 @@
 
         officalFixings = new ArrayList<WQKms>();
 
-        for (Artifact art: collection.getArtifactsByName(STATICWQKMSNAME, context)) {
+        for (Artifact art: collection.getArtifactsByName(
+                STATICWQKMSNAME, context)
+        ) {
             if (art instanceof StaticWQKmsArtifact) {
-                        IsOfficialAccess access = new IsOfficialAccess((D4EArtifact)art);
+                IsOfficialAccess access =
+                    new IsOfficialAccess((D4EArtifact)art);
                 StaticWQKmsArtifact sart = (StaticWQKmsArtifact) art;
                 if (!access.isOfficial()) {
                     continue;
@@ -537,7 +540,8 @@
     ) {
         log.info("WaterlevelExporter.writeCSVHeader");
 
-        String unit = RiverUtils.getRiver((D4EArtifact) master).getWstUnit().getName();
+        String unit = RiverUtils.getRiver(
+            (D4EArtifact) master).getWstUnit().getName();
 
         if (atGauge) {
             writer.writeNext(new String[] {
@@ -629,7 +633,8 @@
         if (flys instanceof WINFOArtifact) {
             if (wqkms != null && wqkms.getRawValue() != null) {
                 WINFOArtifact winfo = (WINFOArtifact) flys;
-                colDesc = RiverUtils.getNamedMainValue(winfo, wqkms.getRawValue());
+                colDesc = RiverUtils.getNamedMainValue(
+                    winfo, wqkms.getRawValue());
                 // For 'W am Pegel' s
                 if (colDesc == null) {
                     Double value = RiverUtils.getValueFromWQ(wqkms);
@@ -834,42 +839,6 @@
                     entry.getValue().add(wqkms.getW(idx), wqkms.getQ(idx));
                 }
             }
-
-            /* Variant: Interpolate the values
-            // Now get the lines for the of the calculation
-            Map <Double, WstLine> calcLines = writer.getLines();
-
-            // Create an interpolater for the official KM -> W relation
-            UnivariateRealFunction wFunc = new LinearInterpolator(
-                    ).interpolate(wqkms.allKms().toNativeArray(),
-                        wqkms.allWs().toNativeArray());
-
-            // Now for each calculated point add the interpolated official
-            for (Map.Entry<Double, WstLine> entry : calcLines.entrySet()) {
-                try {
-                    double wVal = wFunc.value(entry.getKey().doubleValue());
-                    // Matching Q's are guranteed otherwise we would
-                    // not have an official line
-                    entry.getValue().add(wVal, entry.getValue().getQ(0));
-                }
-                catch (FunctionEvaluationException aode) {
-                    // should not happen
-                    log.error("spline interpolation failed", aode);
-                    // entry.getValue().add(Double.NaN, entry.getValue().getQ(0));
-                }
-            }*/
-
-             /* Variant: Add all official fixings
-                // Warning the WSTWriter does not handle this properly
-                // as it writes the points for which only a calculation
-                // exists in the first column
-                int size = wqkms.size();
-                result = new double[4];
-                for (int i = 0; i < size; i++) {
-                    result = wqkms.get(i, result);
-                    writer.add(result);
-                }
-            */
         }
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/exports/XYChartGenerator.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/XYChartGenerator.java	Fri Jan 19 11:23:42 2018 +0100
@@ -206,10 +206,12 @@
          */
         java.net.URL imageURL;
         if (logo.equals("Intevation")) {
-            imageURL = XYChartGenerator.class.getResource("/images/intevation.png");
+            imageURL = XYChartGenerator.class.getResource(
+                "/images/intevation.png");
         }
         else { // TODO else if ...
-            imageURL = XYChartGenerator.class.getResource("/images/bfg_logo.gif");
+            imageURL = XYChartGenerator.class.getResource(
+                "/images/bfg_logo.gif");
         }
         imageIcon = new ImageIcon(imageURL);
 
@@ -229,7 +231,8 @@
             yPos = (Double)getYBounds(0).getLower();
         }
         else if (placev.equals("center")) {
-            yPos = ((Double)getYBounds(0).getUpper() + (Double)getYBounds(0).getLower())/2d;
+            yPos = ((Double)getYBounds(0).getUpper()
+                + (Double)getYBounds(0).getLower())/2d;
         }
         else {
             log.debug("Unknown place-v value: " + placev);
@@ -245,7 +248,8 @@
             xPos = getRightX();
         }
         else if (placeh.equals("center")) {
-            xPos = ((Double)getXBounds(0).getUpper() + (Double)getXBounds(0).getLower())/2d;
+            xPos = ((Double)getXBounds(0).getUpper()
+                + (Double)getXBounds(0).getLower())/2d;
         }
         else {
             log.debug("Unknown place-h value: " + placeh);
@@ -291,7 +295,8 @@
 
         XYAnnotation xyannotation =
             new XYImageAnnotation(xPos, yPos, imageIcon.getImage(), anchor);
-        plot.getRenderer().addAnnotation(xyannotation, org.jfree.ui.Layer.BACKGROUND);
+        plot.getRenderer().addAnnotation(
+            xyannotation, org.jfree.ui.Layer.BACKGROUND);
     }
 
 
@@ -366,9 +371,14 @@
      * Registers an area to be drawn.
      * @param area Area to be drawn.
      * @param index 'axis index'
-     * @param visible Whether or not to be visible (important for range calculations).
+     * @param visible Whether or not to be visible
+     *                (important for range calculations).
      */
-    public void addAreaSeries(StyledAreaSeriesCollection area, int index, boolean visible) {
+    public void addAreaSeries(
+        StyledAreaSeriesCollection area,
+        int index,
+        boolean visible
+    ) {
         if (area == null) {
             log.warn("Cannot yet render above/under curve.");
             return;
@@ -536,7 +546,8 @@
 
 
             if (b != null && b.getLower().equals(b.getUpper())) {
-                log.debug("Check whether to expand a x axis.i ("+b.getLower() + "-" + b.getUpper()+")");
+                log.debug("Check whether to expand a x axis.i ("
+                    + b.getLower() + "-" + b.getUpper() + ")");
                 setXBounds(key, ChartHelper.expandBounds(b, 5));
             }
         }
@@ -658,12 +669,22 @@
     }
 
 
-    protected boolean zoomX(XYPlot plot, ValueAxis axis, Bounds bounds, Range x) {
+    protected boolean zoomX(
+        XYPlot plot,
+        ValueAxis axis,
+        Bounds bounds,
+        Range x
+    ) {
         return zoom(plot, axis, bounds, x);
     }
 
 
-    protected boolean zoomY(XYPlot plot, ValueAxis axis, Bounds bounds, Range x) {
+    protected boolean zoomY(
+        XYPlot plot,
+        ValueAxis axis,
+        Bounds bounds,
+        Range x
+    ) {
         return zoom(plot, axis, bounds, x);
     }
 
@@ -910,10 +931,12 @@
             log.error("Could not decode json.");
         }
 
-        RiverAnnotation annotations = new RiverAnnotation(null, null, null, theme);
+        RiverAnnotation annotations =
+            new RiverAnnotation(null, null, null, theme);
         annotations.setTextAnnotations(xy);
 
-        // Do not generate second legend entry. (null was passed for the aand before).
+        // Do not generate second legend entry.
+        // (null was passed for the aand before).
         doAnnotations(annotations, null, theme, visible);
         addAxisSeries(series, axisIndex, visible);
     }
@@ -925,7 +948,8 @@
      * @return hash for given legenditem to identify mergeables.
      */
     public static String legendItemHash(LegendItem li) {
-        // TODO Do proper implementation. Ensure that only mergable sets are created.
+        // TODO Do proper implementation.
+        // Ensure that only mergable sets are created.
         // getFillPaint()
         // getFillPaintTransformer()
         // getLabel()
--- a/artifacts/src/main/java/org/dive4elements/river/exports/extreme/ExtremeWQCurveGenerator.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/extreme/ExtremeWQCurveGenerator.java	Fri Jan 19 11:23:42 2018 +0100
@@ -72,9 +72,14 @@
             "W [NN + m]";
 
 
-    /** First, ask parent to add data, then handle extreme_wq_curve(_base) data.*/
+    /** First, ask parent to add data, then handle extreme_wq_curve(_base)
+     * data.*/
     @Override
-    public boolean prepareChartData(ArtifactAndFacet aaf, ThemeDocument theme, boolean visible) {
+    public boolean prepareChartData(
+        ArtifactAndFacet aaf,
+        ThemeDocument theme,
+        boolean visible
+    ) {
         if (super.prepareChartData(aaf, theme, visible)) {
             return true;
         }
@@ -102,7 +107,11 @@
     }
 
     /** Do Extreme Curve nonextrapolated points out. */
-    protected void doExtremeCurveBaseOut(ArtifactAndFacet aaf, ThemeDocument theme, boolean visible) {
+    protected void doExtremeCurveBaseOut(
+        ArtifactAndFacet aaf,
+        ThemeDocument theme,
+        boolean visible
+    ) {
         log.debug("doExtremeCurveBaseOut");
         ExtremeCurveFacet facet = (ExtremeCurveFacet) aaf.getFacet();
         Curve curve = (Curve) facet.getData(aaf.getArtifact(), context);
@@ -111,20 +120,25 @@
             return;
         }
 
-        XYSeries qwseries = new StyledXYSeries(aaf.getFacetDescription(), theme);
+        XYSeries qwseries = new StyledXYSeries(
+            aaf.getFacetDescription(), theme);
 
         double gaugeDatum = getCurrentGaugeDatum();
 
         if (gaugeDatum == 0d) {
-            StyledSeriesBuilder.addPointsQW(qwseries, curve.getQs(), curve.getWs());
+            StyledSeriesBuilder.addPointsQW(
+                qwseries, curve.getQs(), curve.getWs());
             addAxisSeries(qwseries, YAXIS.W.idx, visible);
         }
         else {
-            XYSeries series2 = new StyledXYSeries(aaf.getFacetDescription(), theme);
-            StyledSeriesBuilder.addPointsQW(series2, curve.getQs(), curve.getWs());
+            XYSeries series2 =
+                new StyledXYSeries(aaf.getFacetDescription(), theme);
+            StyledSeriesBuilder.addPointsQW(
+                series2, curve.getQs(), curve.getWs());
             addAxisSeries(series2, YAXIS.W.idx, false);
 
-            StyledSeriesBuilder.addPointsQW(qwseries, curve.getQs(), curve.getWs(), -gaugeDatum, 100d);
+            StyledSeriesBuilder.addPointsQW(
+                qwseries, curve.getQs(), curve.getWs(), -gaugeDatum, 100d);
 
             addAxisSeries(qwseries, YAXIS.WCm.idx, visible);
         }
@@ -134,7 +148,11 @@
 
 
     /** Do Extreme Curve out */
-    protected void doExtremeCurveOut(ArtifactAndFacet aaf, ThemeDocument theme, boolean visible) {
+    protected void doExtremeCurveOut(
+        ArtifactAndFacet aaf,
+        ThemeDocument theme,
+        boolean visible
+    ) {
         log.debug("doExtremeCurveOut");
         ExtremeCurveFacet facet = (ExtremeCurveFacet) aaf.getFacet();
         Curve curve = (Curve) facet.getData(aaf.getArtifact(), context);
@@ -231,7 +249,10 @@
             unit = "cm";
         }
 
-        return msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT, new Object[] { unit });
+        return msg(
+            I18N_YAXIS_LABEL,
+            I18N_YAXIS_LABEL_DEFAULT,
+            new Object[] { unit });
     }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/artifacts/src/main/java/org/dive4elements/river/exports/fixings/DeltaWtExporter.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/fixings/DeltaWtExporter.java	Fri Jan 19 11:23:42 2018 +0100
@@ -272,7 +272,8 @@
         log.debug("DeltaWtExporter.writeCSVHeader");
 
         /* issue825
-        km; Ereignis, Abfluss, GEMESSENER Wasserstand; Status (RECHTSBÜNDIG), del W
+        km; Ereignis, Abfluss, GEMESSENER Wasserstand;
+        Status (RECHTSBÜNDIG), del W
         */
 
         writer.writeNext(new String[] {
--- a/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixATExport.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixATExport.java	Fri Jan 19 11:23:42 2018 +0100
@@ -52,7 +52,11 @@
 
 
     @Override
-    public void doOut(ArtifactAndFacet bundle, ThemeDocument attr, boolean visible) {
+    public void doOut(
+        ArtifactAndFacet bundle,
+        ThemeDocument attr,
+        boolean visible
+    ) {
         log.debug("AT Export doOut().");
         Object data = bundle.getData(context);
         if (data instanceof CalculationResult) {
--- a/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixChartGenerator.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixChartGenerator.java	Fri Jan 19 11:23:42 2018 +0100
@@ -33,7 +33,12 @@
         "/art:action/art:attributes/art:currentKm/@art:km";
 
     @Override
-    public void init(String outName, Document request, OutputStream out, CallContext context) {
+    public void init(
+        String outName,
+        Document request,
+        OutputStream out,
+        CallContext context
+    ) {
         super.init(outName, request, out, context);
 
         Double currentKm = getCurrentKmFromRequest(request);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixDeltaWtGenerator.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixDeltaWtGenerator.java	Fri Jan 19 11:23:42 2018 +0100
@@ -166,7 +166,8 @@
             ) {
         String name = artifactFacet.getFacetName();
         log.debug("FixDeltaWtGenerator.doOut: " + name);
-        log.debug("Theme description is: " + artifactFacet.getFacetDescription());
+        log.debug("Theme description is: "
+            + artifactFacet.getFacetDescription());
 
         this.artifact = (D4EArtifact)artifactFacet.getArtifact();
 
@@ -291,14 +292,17 @@
         addAxisDataset(tsc, 0, visible);
 
         if (visible && theme.parseShowLineLabel()) {
-            List<XYTextAnnotation> textAnnos = new ArrayList<XYTextAnnotation>();
+            List<XYTextAnnotation> textAnnos =
+                new ArrayList<XYTextAnnotation>();
             XYTextAnnotation anno = new CollisionFreeXYTextAnnotation(
-                    "\u0394 W(t) [cm] " + (float)Math.round(qwd.qwd.getDeltaW() * 10000) / 10000,
+                    "\u0394 W(t) [cm] "
+                    + (float)Math.round(qwd.qwd.getDeltaW() * 10000) / 10000,
                     tsc.getXValue(0, 0),
                     qwd.qwd.getDeltaW());
             textAnnos.add(anno);
 
-            RiverAnnotation flysAnno = new RiverAnnotation(null, null, null, theme);
+            RiverAnnotation flysAnno =
+                new RiverAnnotation(null, null, null, theme);
             flysAnno.setTextAnnotations(textAnnos);
             addAnnotations(flysAnno);
         }
@@ -319,8 +323,12 @@
     }
 
 
-    protected void doQWDEventsOut(QWD qwd, String desc, ThemeDocument theme, boolean visible)
-    {
+    protected void doQWDEventsOut(
+        QWD qwd,
+        String desc,
+        ThemeDocument theme,
+        boolean visible
+    ) {
         TimeSeriesCollection tsc = new TimeSeriesCollection();
 
         TimeSeries   series = new StyledTimeSeries(desc, theme);
@@ -367,7 +375,8 @@
 
 
     /**
-     * @param annoIdxMap map of index in qwds to series/data item indices in tsc.
+     * @param annoIdxMap map of index in qwds to series/data item indices
+     *                   in tsc.
      */
     protected void doQWDTextAnnotations(Map<Integer, int[]> annoIdxMap,
             TimeSeriesCollection tsc, QWD qwd, ThemeDocument theme,
@@ -429,8 +438,10 @@
             return;
         }
         double[] value = (double[]) data;
-        StyledDomainMarker lower = new StyledDomainMarker((value[0] * -1), 0, theme);
-        StyledDomainMarker upper = new StyledDomainMarker(0, value[0], theme);
+        StyledDomainMarker lower =
+            new StyledDomainMarker((value[0] * -1), 0, theme);
+        StyledDomainMarker upper =
+            new StyledDomainMarker(0, value[0], theme);
 
         valueMarker.add(lower);
         valueMarker.add(upper);
@@ -463,7 +474,12 @@
 
 
     @Override
-    public void init(String outName, Document request, OutputStream out, CallContext context) {
+    public void init(
+        String outName,
+        Document request,
+        OutputStream out,
+        CallContext context
+    ) {
         super.init(outName, request, out, context);
 
         Double currentKm = FixChartGenerator.getCurrentKmFromRequest(request);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixWQCurveGenerator.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixWQCurveGenerator.java	Fri Jan 19 11:23:42 2018 +0100
@@ -156,22 +156,27 @@
                     fixedWinMRange.getUpperBound());
         }
 
-        log.debug("Syncing Axis Bounds. Bounds W: " + boundsInMGauge.toString() +
-                " Bounds Wcm: " + boundsInCM.toString());
+        log.debug("Syncing Axis Bounds. Bounds W: "
+            + boundsInMGauge.toString()
+            + " Bounds Wcm: " + boundsInCM.toString());
 
         double datum = getCurrentGaugeDatum();
 
         // Convert boundsInMGauge to Datum+cm
-        double convertedLower = ((Double)boundsInMGauge.getLower() - datum) * 100;
-        double convertedUpper = ((Double)boundsInMGauge.getUpper() - datum) * 100;
-        Bounds convertedBounds = new DoubleBounds(convertedLower, convertedUpper);
+        double convertedLower =
+            ((Double)boundsInMGauge.getLower() - datum) * 100;
+        double convertedUpper =
+            ((Double)boundsInMGauge.getUpper() - datum) * 100;
+        Bounds convertedBounds =
+            new DoubleBounds(convertedLower, convertedUpper);
 
         // Now combine both Ranges
         boundsInCM = boundsInCM.combine(convertedBounds);
 
         // Recalculate absolute bounds
-        boundsInMGauge = new DoubleBounds((Double)boundsInCM.getLower() / 100d + datum,
-                                          (Double)boundsInCM.getUpper() / 100d + datum);
+        boundsInMGauge = new DoubleBounds(
+            (Double)boundsInCM.getLower() / 100d + datum,
+            (Double)boundsInCM.getUpper() / 100d + datum);
 
         // Set the new combined bounds
         setYBounds(YAXIS.W.idx, boundsInMGauge);
@@ -181,7 +186,11 @@
     }
 
     @Override
-    public void doOut(ArtifactAndFacet aaf, ThemeDocument doc, boolean visible) {
+    public void doOut(
+        ArtifactAndFacet aaf,
+        ThemeDocument doc,
+        boolean visible
+    ) {
         log.debug("doOut: " + aaf.getFacetName());
         if (!prepareChartData(aaf, doc, visible)) {
             log.warn("Unknown facet, name " + aaf.getFacetName());
@@ -192,7 +201,11 @@
      * Return true if data could be handled,
      * to be overridden to add more handled data.
      */
-    public boolean prepareChartData(ArtifactAndFacet aaf, ThemeDocument doc, boolean visible) {
+    public boolean prepareChartData(
+        ArtifactAndFacet aaf,
+        ThemeDocument doc,
+        boolean visible
+    ) {
         String name = aaf.getFacetName();
 
         this.artifact = (D4EArtifact) aaf.getArtifact();
@@ -266,7 +279,11 @@
 
 
     /** Add sector average points to chart. */
-    protected void doSectorAverageOut(ArtifactAndFacet aaf, ThemeDocument doc, boolean visible) {
+    protected void doSectorAverageOut(
+        ArtifactAndFacet aaf,
+        ThemeDocument doc,
+        boolean visible
+    ) {
         log.debug("doSectorAverageOut");
 
         QWDDateRange qwdd = (QWDDateRange) aaf.getData(context);
@@ -321,7 +338,8 @@
 
         if (visible && doc.parseShowPointLabel()) {
 
-            List<XYTextAnnotation> textAnnos = new ArrayList<XYTextAnnotation>();
+            List<XYTextAnnotation> textAnnos =
+                new ArrayList<XYTextAnnotation>();
 
             DateFormat dateFormat = DateFormat.getDateInstance(
                 DateFormat.SHORT);
@@ -331,7 +349,8 @@
                 w);
             textAnnos.add(anno);
 
-            RiverAnnotation flysAnno = new RiverAnnotation(null, null, null, doc);
+            RiverAnnotation flysAnno =
+                new RiverAnnotation(null, null, null, doc);
             flysAnno.setTextAnnotations(textAnnos);
             addAnnotations(flysAnno);
         }
@@ -339,7 +358,11 @@
 
 
     /** Add reference event points to chart. */
-    protected void doReferenceEventsOut(ArtifactAndFacet aaf, ThemeDocument doc, boolean visible) {
+    protected void doReferenceEventsOut(
+        ArtifactAndFacet aaf,
+        ThemeDocument doc,
+        boolean visible
+    ) {
         log.debug("doReferenceEventsOut");
 
         QWI qwd = (QWI)aaf.getData(context);
@@ -379,9 +402,11 @@
                 qwd.getQ(),
                 w);
 
-            List<XYTextAnnotation> textAnnos = new ArrayList<XYTextAnnotation>();
+            List<XYTextAnnotation> textAnnos =
+                new ArrayList<XYTextAnnotation>();
             textAnnos.add(anno);
-            RiverAnnotation flysAnno = new RiverAnnotation(null, null, null, doc);
+            RiverAnnotation flysAnno =
+                new RiverAnnotation(null, null, null, doc);
             flysAnno.setTextAnnotations(textAnnos);
             addAnnotations(flysAnno);
         }
@@ -409,13 +434,15 @@
                 series.add(wqkms.getQ(i), wqkms.getW(i), false);
                 addAxisSeries(series, YAXIS.W.idx, visible);
                 if(visible && theme.parseShowPointLabel()) {
-                    List<XYTextAnnotation> textAnnos = new ArrayList<XYTextAnnotation>();
+                    List<XYTextAnnotation> textAnnos =
+                        new ArrayList<XYTextAnnotation>();
                     XYTextAnnotation anno = new CollisionFreeXYTextAnnotation(
                             title,
                             wqkms.getQ(i),
                             factor*(wqkms.getW(i)-gaugeDatum));
                     textAnnos.add(anno);
-                    RiverAnnotation flysAnno = new RiverAnnotation(null, null, null, theme);
+                    RiverAnnotation flysAnno =
+                        new RiverAnnotation(null, null, null, theme);
                     flysAnno.setTextAnnotations(textAnnos);
                     addAnnotations(flysAnno);
                 }
@@ -424,7 +451,11 @@
         }
     }
 
-    protected void doEventsOut(ArtifactAndFacet aaf, ThemeDocument doc, boolean visible) {
+    protected void doEventsOut(
+        ArtifactAndFacet aaf,
+        ThemeDocument doc,
+        boolean visible
+    ) {
         log.debug("doEventsOut");
         // Find W/Q at km.
         addPointFromWQKms((WQKms) aaf.getData(context),
@@ -432,7 +463,11 @@
     }
 
 
-    protected void doWQCurveOut(ArtifactAndFacet aaf, ThemeDocument doc, boolean visible) {
+    protected void doWQCurveOut(
+        ArtifactAndFacet aaf,
+        ThemeDocument doc,
+        boolean visible
+    ) {
         log.debug("doWQCurveOut");
 
         FixWQCurveFacet facet = (FixWQCurveFacet)aaf.getFacet();
@@ -472,7 +507,10 @@
                 // Use second axis at cm if at gauge.
                 for (int i = 0, N = series.getItemCount(); i < N; i++) {
                     series.updateByIndex(
-                        i, new Double(100d*(series.getY(i).doubleValue()-gaugeDatum)));
+                        i,
+                        new Double(100d *
+                                (series.getY(i).doubleValue() - gaugeDatum))
+                    );
                 }
                 addAxisSeries(series, YAXIS.WCm.idx, visible);
             }
@@ -482,7 +520,11 @@
         }
     }
 
-    protected void doOutlierOut(ArtifactAndFacet aaf, ThemeDocument doc, boolean visible) {
+    protected void doOutlierOut(
+        ArtifactAndFacet aaf,
+        ThemeDocument doc,
+        boolean visible
+    ) {
         log.debug("doOutlierOut");
 
         QWI[] qws = (QWI[])aaf.getData(context);
@@ -491,7 +533,11 @@
 
 
     /** Add markers for q sectors. */
-    protected void doQSectorOut(ArtifactAndFacet aaf, ThemeDocument theme, boolean visible) {
+    protected void doQSectorOut(
+        ArtifactAndFacet aaf,
+        ThemeDocument theme,
+        boolean visible
+    ) {
         log.debug("doQSectorOut");
         if (!visible) {
             return;
@@ -504,7 +550,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;
         }
@@ -571,7 +619,8 @@
             double [][] data = (double [][]) wqkms;
             for (int i = 0; i< data[0].length; i++) {
                 xy.add(new StickyAxisAnnotation(aandf.getFacetDescription(),
-                        (float) data[1][i], StickyAxisAnnotation.SimpleAxis.Y_AXIS));
+                        (float) data[1][i],
+                        StickyAxisAnnotation.SimpleAxis.Y_AXIS));
             }
 
             doAnnotations(new RiverAnnotation(facet.getDescription(), xy),
@@ -660,13 +709,15 @@
             // be delivered by the facet already (instead of in the Generator).
             log.debug("FixWQCurveGenerator: doWQOut: WQKms");
 
-            addPointFromWQKms((WQKms) aaf.getData(context), aaf.getFacetDescription(), theme, visible);
+            addPointFromWQKms((WQKms)aaf.getData(context),
+                aaf.getFacetDescription(), theme, visible);
         }
         else {
             log.debug("FixWQCurveGenerator: doWQOut: double[][]");
             double [][] data = (double [][]) wqkms;
 
-            XYSeries series = new StyledXYSeries(aaf.getFacetDescription(), false, true, theme);
+            XYSeries series = new StyledXYSeries(
+                aaf.getFacetDescription(), false, true, theme);
             StyledSeriesBuilder.addPoints(series, data, true);
 
             addAxisSeries(series, YAXIS.W.idx, visible);
@@ -802,7 +853,10 @@
             ? "cm"
             : RiverUtils.getRiver(flys).getWstUnit().getName();
 
-        return msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT, new Object[] { unit });
+        return msg(
+            I18N_YAXIS_LABEL,
+            I18N_YAXIS_LABEL_DEFAULT,
+            new Object[] { unit });
     }
 
     @Override
--- a/artifacts/src/main/java/org/dive4elements/river/exports/injector/InjectorConstants.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/injector/InjectorConstants.java	Fri Jan 19 11:23:42 2018 +0100
@@ -1,3 +1,11 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
 package org.dive4elements.river.exports.injector;
 
 
--- a/artifacts/src/main/java/org/dive4elements/river/exports/injector/KmFromGaugeNameInjector.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/injector/KmFromGaugeNameInjector.java	Fri Jan 19 11:23:42 2018 +0100
@@ -1,3 +1,11 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
 package org.dive4elements.river.exports.injector;
 
 import org.apache.log4j.Logger;
@@ -17,14 +25,19 @@
 implements ContextInjector
 {
 
-    private static Logger log = Logger.getLogger(KmFromGaugeNameInjector.class);
+    private static Logger log = Logger.getLogger(
+        KmFromGaugeNameInjector.class);
 
     @Override
     public void setup(Element cfg) {
     }
 
     @Override
-    public void injectContext(CallContext ctx, Artifact artifact, Document doc) {
+    public void injectContext(
+        CallContext ctx,
+        Artifact artifact,
+        Document doc
+    ) {
         if (ctx.getContextValue(CURRENT_KM) instanceof Number) {
             return;
         }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/injector/KmFromGaugeNumberInjector.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/injector/KmFromGaugeNumberInjector.java	Fri Jan 19 11:23:42 2018 +0100
@@ -1,3 +1,11 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
 package org.dive4elements.river.exports.injector;
 
 import org.apache.log4j.Logger;
--- a/artifacts/src/main/java/org/dive4elements/river/exports/injector/KmFromLocationInjector.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/injector/KmFromLocationInjector.java	Fri Jan 19 11:23:42 2018 +0100
@@ -1,3 +1,11 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
 package org.dive4elements.river.exports.injector;
 
 import org.apache.log4j.Logger;
--- a/artifacts/src/main/java/org/dive4elements/river/exports/injector/KmFromRequestInjector.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/injector/KmFromRequestInjector.java	Fri Jan 19 11:23:42 2018 +0100
@@ -1,3 +1,11 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
 package org.dive4elements.river.exports.injector;
 
 import org.apache.log4j.Logger;
@@ -17,7 +25,8 @@
 public class KmFromRequestInjector
 implements ContextInjector
 {
-    private static final Logger log = Logger.getLogger(KmFromRequestInjector.class);
+    private static final Logger log = Logger.getLogger(
+        KmFromRequestInjector.class);
 
     public static final String XPATH_CHART_CURRENTKM =
         "/art:action/art:attributes/art:currentKm/@art:km";
--- a/artifacts/src/main/java/org/dive4elements/river/exports/injector/PNPInjector.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/injector/PNPInjector.java	Fri Jan 19 11:23:42 2018 +0100
@@ -1,3 +1,11 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
 package org.dive4elements.river.exports.injector;
 
 import org.apache.log4j.Logger;
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceExporter.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceExporter.java	Fri Jan 19 11:23:42 2018 +0100
@@ -204,8 +204,11 @@
             header.add(msg(CSV_HEADER_DIFF, "cm"));
             if (results.length > 0 &&
                 results[0] instanceof BedDiffYearResult) {
-                header.add(msg(CSV_HEADER_SOUNDING1, "soundung width minuend [m]"));
-                header.add(msg(CSV_HEADER_SOUNDING2, "sounding width subtrahend [m]"));
+                header.add(
+                    msg(CSV_HEADER_SOUNDING1, "soundung width minuend [m]"));
+                header.add(
+                    msg(CSV_HEADER_SOUNDING2,
+                        "sounding width subtrahend [m]"));
                 header.add(msg(CSV_HEADER_GAP1, "data gap minuend"));
                 header.add(msg(CSV_HEADER_GAP2, "data gap subtrahend"));
             }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedQualityExporter.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedQualityExporter.java	Fri Jan 19 11:23:42 2018 +0100
@@ -135,7 +135,8 @@
         }
 
         header.add(msg(CSV_HEADER_KM, "km"));
-        DateFormat df = Formatter.getDateFormatter(context.getMeta(), "dd.MM.yyyy");
+        DateFormat df = Formatter.getDateFormatter(
+            context.getMeta(), "dd.MM.yyyy");
         for (BedQualityResult result: results) {
             String d1 = df.format(result.getDateRange().getFrom());
             String d2 = df.format(result.getDateRange().getTo());
@@ -146,10 +147,12 @@
                 String i18n;
                 if (value.isDiameterResult()) {
                     i18n = CSV_HEADER_BASE + ".diameter." + value.getType();
-                    header.add(msg(i18n, i18n) +
-                        " - " + value.getName().toUpperCase() + " - " + d1 + "-" + d2);
+                    header.add(msg(i18n, i18n)
+                        + " - " + value.getName().toUpperCase()
+                        + " - " + d1 + "-" + d2);
                 } else {
-                    i18n = CSV_HEADER_BASE + "." + value.getName() + "." + value.getType();
+                    i18n = CSV_HEADER_BASE + "." + value.getName()
+                        + "." + value.getType();
                     header.add(msg(i18n, i18n) + " - " + d1 + "-" + d2);
                 }
             }
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/AreaProcessor.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/AreaProcessor.java	Fri Jan 19 11:23:42 2018 +0100
@@ -33,8 +33,12 @@
 
     private static final Logger log = Logger.getLogger(AreaProcessor.class);
 
-    protected XYSeries getSeries(String seriesName, Object data, String facetType,
-            ThemeDocument theme) {
+    protected XYSeries getSeries(
+        String seriesName,
+        Object data,
+        String facetType,
+        ThemeDocument theme
+    ) {
         if (data == null || facetType == null) {
             return null;
         }
@@ -62,7 +66,8 @@
             StyledSeriesBuilder.addPoints(series, (WKms) data);
         }
         else if (data instanceof Lines.LineData) {
-            StyledSeriesBuilder.addPoints(series, ((Lines.LineData) data).points, false);
+            StyledSeriesBuilder.addPoints(
+                series, ((Lines.LineData) data).points, false);
         }
         else {
             log.error("Do not know how to deal with (up) area info from: "
@@ -89,11 +94,14 @@
         String lowerFacetName = data.getLowerFacetName();
         String upperFacetName = data.getUpperFacetName();
 
-        XYSeries up   = getSeries(seriesName, data.getUpperData(), upperFacetName, theme);
-        XYSeries down = getSeries(seriesName + " ", data.getLowerData(), lowerFacetName, theme);
+        XYSeries up = getSeries(
+            seriesName, data.getUpperData(), upperFacetName, theme);
+        XYSeries down = getSeries(
+            seriesName + " ", data.getLowerData(), lowerFacetName, theme);
 
 
-        // TODO Depending on style, the area (e.g. 20m^2) should be added as annotation.
+        // TODO Depending on style, the area (e.g. 20m^2)
+        // should be added as annotation.
 
         if (up == null && down != null) {
             area.setMode(StyledAreaSeriesCollection.FILL_MODE.ABOVE);
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/BedDiffHeightYearProcessor.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/BedDiffHeightYearProcessor.java	Fri Jan 19 11:23:42 2018 +0100
@@ -50,13 +50,15 @@
 
         if (!(data instanceof double[][])) {
             // Should not happen if canHandle is correct
-            log.error("Can't process " + data.getClass().getName() + " objects");
+            log.error("Can't process " + data.getClass().getName()
+                + " objects");
             return;
         }
 
         double[][] bData = (double[][]) data;
 
-        StyledXYSeries series = new StyledXYSeries(bundle.getFacetDescription(), theme);
+        StyledXYSeries series =
+            new StyledXYSeries(bundle.getFacetDescription(), theme);
         series.putMetaData(metaData, bundle.getArtifact(), context);
 
         StyledSeriesBuilder.addPoints(series, bData, false, GAP_TOLERANCE);
@@ -77,12 +79,14 @@
 
         if (!(data instanceof double[][])) {
             // Should not happen if canHandle is correct
-            log.error("Can't process " + data.getClass().getName() + " objects");
+            log.error("Can't process " + data.getClass().getName()
+                + " objects");
             return;
         }
 
         double[][] bData = (double[][]) data;
-        XYSeries series = new StyledXYSeries(bundle.getFacetDescription(), theme);
+        XYSeries series =
+            new StyledXYSeries(bundle.getFacetDescription(), theme);
         StyledSeriesBuilder.addPoints(series, bData, false, GAP_TOLERANCE);
 
         generator.addAxisSeries(series, index, visible);
@@ -90,9 +94,10 @@
 
     @Override
     public boolean canHandle(String facetType) {
-        return BED_DIFFERENCE_HEIGHT_YEAR.equals(facetType) // from BedDiffYearHeight
-            || BED_DIFFERENCE_HEIGHT_YEAR_FILTERED.equals(facetType) // from BedDiffYearHeight
-            ;
+        return BED_DIFFERENCE_HEIGHT_YEAR.equals(facetType)
+            // from BedDiffYearHeight
+            || BED_DIFFERENCE_HEIGHT_YEAR_FILTERED.equals(facetType);
+            // from BedDiffYearHeight
     }
 
 
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/BedDiffYearProcessor.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/BedDiffYearProcessor.java	Fri Jan 19 11:23:42 2018 +0100
@@ -53,7 +53,8 @@
         }
 
         if (!(data instanceof double[][])) {
-            log.error("Can't process " + data.getClass().getName() + " objects");
+            log.error("Can't process " + data.getClass().getName()
+                + " objects");
             return;
         }
         double[][] bData = (double[][]) data;
@@ -62,7 +63,8 @@
             bData[1][i] *= 100d;
         }
 
-        StyledXYSeries series = new StyledXYSeries(bundle.getFacetDescription(), theme);
+        StyledXYSeries series =
+            new StyledXYSeries(bundle.getFacetDescription(), theme);
         series.putMetaData(metaData, bundle.getArtifact(), context);
         StyledSeriesBuilder.addPoints(series,
             bData,
@@ -76,8 +78,10 @@
 
     @Override
     public boolean canHandle(String facetType) {
-        return BED_DIFFERENCE_YEAR.equals(facetType) // from BedDifferencesYear
-            || BED_DIFFERENCE_YEAR_FILTERED.equals(facetType); // from BedDifferencesYear
+        return BED_DIFFERENCE_YEAR.equals(facetType)
+            // from BedDifferencesYear
+            || BED_DIFFERENCE_YEAR_FILTERED.equals(facetType);
+            // from BedDifferencesYear
     }
 
     @Override
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/BedHeightProcessor.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/BedHeightProcessor.java	Fri Jan 19 11:23:42 2018 +0100
@@ -45,7 +45,8 @@
             ArtifactAndFacet bundle,
             ThemeDocument    theme,
             boolean          visible) {
-        XYSeries series = prepareSeries(bundle, theme, generator.getCallContext());
+        XYSeries series = prepareSeries(
+            bundle, theme, generator.getCallContext());
         if (series != null) {
             generator.addAxisSeries(series, axisName, visible);
         }
@@ -59,7 +60,8 @@
             boolean visible,
             int index
     ) {
-        XYSeries series = prepareSeries(bundle, theme, generator.getCallContext());
+        XYSeries series = prepareSeries(
+            bundle, theme, generator.getCallContext());
         if (series != null) {
             generator.addAxisSeries(series, index, visible);
         }
@@ -101,8 +103,10 @@
         return FacetTypes.BEDHEIGHT.equals(facetType)
             || FacetTypes.BED_DIFFERENCE_YEAR_HEIGHT1.equals(facetType)
             || FacetTypes.BED_DIFFERENCE_YEAR_HEIGHT2.equals(facetType)
-            || FacetTypes.BED_DIFFERENCE_YEAR_HEIGHT1_FILTERED.equals(facetType)
-            || FacetTypes.BED_DIFFERENCE_YEAR_HEIGHT2_FILTERED.equals(facetType);
+            || FacetTypes.BED_DIFFERENCE_YEAR_HEIGHT1_FILTERED.equals(
+                facetType)
+            || FacetTypes.BED_DIFFERENCE_YEAR_HEIGHT2_FILTERED.equals(
+                facetType);
     }
 
     @Override
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/DefaultProcessor.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/DefaultProcessor.java	Fri Jan 19 11:23:42 2018 +0100
@@ -60,7 +60,8 @@
 
 
     /**
-     * Returns true if the Processor class is able to generate output for a facet type
+     * Returns true if Processor class is able to generate
+     * output for facet type
      *
      * @param facettype Name of the facet type
      * @return true if the facettype can be processed
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/DeltaWProcessor.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/DeltaWProcessor.java	Fri Jan 19 11:23:42 2018 +0100
@@ -58,7 +58,8 @@
             doReferenceEventsOut(generator, bundle, theme, visible);
         } else if (facettype.equals(FacetTypes.FIX_ANALYSIS_EVENTS_LS)) {
             doAnalysisEventsOut(generator, bundle, theme, visible);
-        } else if (facettype.startsWith(FacetTypes.FIX_SECTOR_AVERAGE_LS_DEVIATION)) {
+        } else if (facettype.startsWith(
+                FacetTypes.FIX_SECTOR_AVERAGE_LS_DEVIATION)) {
             doSectorAverageDeviationOut(generator, bundle, theme, visible);
         } else if (facettype.equals(FacetTypes.FIX_DEVIATION_LS)) {
             doReferenceDeviationOut(generator, bundle, theme, visible);
@@ -98,7 +99,8 @@
             return;
         }
 
-        XYSeries series = new StyledXYSeries(bundle.getFacetDescription(), doc);
+        XYSeries series = new StyledXYSeries(
+            bundle.getFacetDescription(), doc);
 
         for (KMIndex.Entry<AnalysisPeriod> entry: kms) {
             double km = entry.getKm();
@@ -127,8 +129,8 @@
 
         XYSeriesCollection col = new XYSeriesCollection();
 
-        StyledXYSeries series = new StyledXYSeries(bundle.getFacetDescription(), false,
-                doc);
+        StyledXYSeries series = new StyledXYSeries(
+            bundle.getFacetDescription(), false, doc);
 
         for (KMIndex.Entry<QWD> entry: kms) {
             double km = entry.getKm();
@@ -157,7 +159,8 @@
 
         XYSeriesCollection col = new XYSeriesCollection();
 
-        StyledXYSeries series = new StyledXYSeries(bundle.getFacetDescription(), false, doc);
+        StyledXYSeries series = new StyledXYSeries(
+            bundle.getFacetDescription(), false, doc);
 
         for (KMIndex.Entry<QWD> entry: kms) {
             double km = entry.getKm();
@@ -190,8 +193,8 @@
         StyledAreaSeriesCollection area = new StyledAreaSeriesCollection(doc);
         XYSeries upper =
                 new StyledXYSeries(bundle.getFacetDescription(), false, doc);
-        XYSeries lower =
-                new StyledXYSeries(bundle.getFacetDescription() + " ", false, doc);
+        XYSeries lower = new StyledXYSeries(
+            bundle.getFacetDescription() + " ", false, doc);
 
         for (KMIndex.Entry<AnalysisPeriod> entry: kms) {
             double km = entry.getKm();
@@ -230,8 +233,8 @@
         StyledAreaSeriesCollection area = new StyledAreaSeriesCollection(doc);
         XYSeries upper =
                 new StyledXYSeries(bundle.getFacetDescription(), false, doc);
-        XYSeries lower =
-                new StyledXYSeries(bundle.getFacetDescription() + " ", false, doc);
+        XYSeries lower = new StyledXYSeries(
+            bundle.getFacetDescription() + " ", false, doc);
 
         for (KMIndex.Entry<double[]> entry: kms) {
             double km = entry.getKm();
@@ -257,7 +260,8 @@
 
     @Override
     public String getAxisLabel(DiagramGenerator generator) {
-        return generator.msg(I18N_DW_YAXIS_LABEL, I18N_DW_YAXIS_LABEL_DEFAULT);
+        return generator.msg(
+            I18N_DW_YAXIS_LABEL, I18N_DW_YAXIS_LABEL_DEFAULT);
     }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/DischargeProcessor.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/DischargeProcessor.java	Fri Jan 19 11:23:42 2018 +0100
@@ -124,7 +124,8 @@
     @Override
     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();
 
         if (yAxisLabel != null && !yAxisLabel.isEmpty()) {
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/FixDeltaWAProcessor.java	Thu Jan 18 18:34:41 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/FixDeltaWAProcessor.java	Fri Jan 19 11:23:42 2018 +0100
@@ -42,7 +42,8 @@
         CallContext context = generator.getCallContext();
         Object data = bundle.getData(context);
 
-        XYSeries series = new StyledXYSeries(bundle.getFacetDescription(), theme);