changeset 6914:695a5f6599b4

Minor refactoring, renamed variable, extracted method.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Mon, 26 Aug 2013 14:28:19 +0200
parents 08527cc6341f
children 26e1562332e8
files artifacts/src/main/java/org/dive4elements/river/exports/process/DischargeProcessor.java
diffstat 1 files changed, 5 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- 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,

http://dive4elements.wald.intevation.org