[PATCH 6 of 6] merged

Wald Commits scm-commit at wald.intevation.org
Wed Oct 1 13:42:29 CEST 2014


# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1412163739 -7200
# Node ID 24d044866c2ab513326dbd3980de18118a122f3e
# Parent  e15d2fc7aab4b9d47a050609cafa87de8e5db5e2
# Parent  0d3d018fc6321accf6217162b6dd4423a26ebee7
merged.

diff -r e15d2fc7aab4 -r 24d044866c2a artifacts/doc/conf/generators/discharge-diagrams.xml
--- a/artifacts/doc/conf/generators/discharge-diagrams.xml	Wed Oct 01 13:41:38 2014 +0200
+++ b/artifacts/doc/conf/generators/discharge-diagrams.xml	Wed Oct 01 13:42:19 2014 +0200
@@ -4,7 +4,7 @@
   <output-generator names="historical_discharge_wq,historical_discharge_wq_chartinfo"
       class="org.dive4elements.river.exports.DischargeGenerator"
       converter="org.dive4elements.river.exports.DiagramAttributes"
-      injectors="org.dive4elements.river.exports.injector.KmFromGaugeNumberInjector.java,org.dive4elements.river.exports.injector.PNPInjector">
+      injectors="org.dive4elements.river.exports.injector.KmFromGaugeNumberInjector,org.dive4elements.river.exports.injector.PNPInjector">
     <title key="chart.historical.discharge.title" default="chart.historical.discharge.title"/>
     &discharge-defaults;
   </output-generator>
diff -r e15d2fc7aab4 -r 24d044866c2a artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java	Wed Oct 01 13:41:38 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java	Wed Oct 01 13:42:19 2014 +0200
@@ -48,7 +48,6 @@
 import org.dive4elements.river.jfree.XYMetaSeriesCollection;
 
 import org.dive4elements.river.themes.ThemeDocument;
-import org.dive4elements.river.utils.RiverUtils;
 
 import org.jfree.chart.ChartFactory;
 import org.jfree.chart.JFreeChart;
@@ -152,8 +151,6 @@
         CallContext  context
     ) {
         super.init(outName, request, out, context);
-
-        RiverUtils.setKMFromRequestInContext(request, context);
     }
 
     private void setInvertedFromConfig() {
diff -r e15d2fc7aab4 -r 24d044866c2a artifacts/src/main/java/org/dive4elements/river/utils/RiverUtils.java
--- a/artifacts/src/main/java/org/dive4elements/river/utils/RiverUtils.java	Wed Oct 01 13:41:38 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/utils/RiverUtils.java	Wed Oct 01 13:42:19 2014 +0200
@@ -890,30 +890,5 @@
         return q;
     }
 
-    /** Parses the request and checks if it contains a currentKM setting.
-     * If this is the case the currentKM is added to the context.*/
-    public static void setKMFromRequestInContext(Document request,
-            CallContext context) {
-        Double dKm;
-        String km = XMLUtils.xpathString(
-            request,
-            XPATH_CHART_CURRENTKM,
-            ArtifactNamespaceContext.INSTANCE);
-
-        if (km == null) {
-            return;
-        }
-
-        try {
-            dKm = Double.valueOf(km);
-        } catch (NumberFormatException nfe) {
-            return;
-        }
-
-        if (log.isDebugEnabled()) {
-            log.debug("currentKm = " + dKm);
-        }
-        context.putContextValue(CURRENT_KM, dKm);
-    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :


More information about the Dive4Elements-commits mailing list