[PATCH 02 of 13] Minor refactoring, renamed variable, extracted method

Wald Commits scm-commit at wald.intevation.org
Mon Aug 26 15:27:11 CEST 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1377520099 -7200
# Node ID 695a5f6599b4d49f5d425b331576b0026cace685
# Parent  08527cc6341f800958666833c5651f577f9e6d05
Minor refactoring, renamed variable, extracted method.

diff -r 08527cc6341f -r 695a5f6599b4 artifacts/src/main/java/org/dive4elements/river/exports/process/DischargeProcessor.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/DischargeProcessor.java	Thu Aug 22 14:58:56 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/DischargeProcessor.java	Mon Aug 26 14:28:19 2013 +0200
@@ -60,29 +60,18 @@
             ArtifactAndFacet aandf,
             ThemeDocument theme,
             boolean visible,
-            int index
+            int axisIndex
     ) {
         CallContext context = generator.getCallContext();
         Object data = aandf.getData(context);
         if (false && data instanceof WQKms) {
             doWQKmsPointOut(
-                generator, (WQKms) data, aandf, theme, visible, index);
+                generator, (WQKms) data, aandf, theme, visible, axisIndex);
             return;
         }
         else if (data instanceof RiverAnnotation) {
-            if (!(generator instanceof DischargeCurveGenerator)) {
-                logger.error("DischargeProcessor can only be used in " +
-                    " in DischargeCurveGenerator-classes.");
-                return;
-            }
-            DischargeCurveGenerator dGenerator =
-                (DischargeCurveGenerator) generator;
-
-            RiverAnnotation mainValues = (RiverAnnotation) data;
-            dGenerator.translateRiverAnnotation(mainValues);
-            dGenerator.doAnnotations(
-                mainValues,
-                aandf, theme, visible);
+            doRiverAnnotationOut(
+                generator, (RiverAnnotation) data, aandf, theme, visible);
             return;
         }
         logger.error("Can't process " + data.getClass().getName() + " objects");
@@ -114,6 +103,7 @@
         boolean visible,
         int axidx
     ) {
+        logger.debug("doWQKmsPointOut");
         String title = aandf.getFacetDescription();
         XYSeries series = new StyledXYSeries(
             title,


More information about the Dive4elements-commits mailing list