diff artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodHeightProcessor.java @ 9347:08f46ccd37ba

salix.regional refactoring
author gernotbelger
date Tue, 31 Jul 2018 16:04:01 +0200
parents 7100a555607c
children f8308db94634
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodHeightProcessor.java	Tue Jul 31 15:48:35 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodHeightProcessor.java	Tue Jul 31 16:04:01 2018 +0200
@@ -17,9 +17,9 @@
 import org.dive4elements.artifactdatabase.state.Facet;
 import org.dive4elements.artifacts.CallContext;
 import org.dive4elements.river.artifacts.common.AbstractCalculationResult;
+import org.dive4elements.river.artifacts.common.AbstractProcessor;
+import org.dive4elements.river.artifacts.common.ResultFacet;
 import org.dive4elements.river.artifacts.resources.Resources;
-import org.dive4elements.river.artifacts.sinfo.common.AbstractSInfoProcessor;
-import org.dive4elements.river.artifacts.sinfo.common.SInfoResultFacet;
 import org.dive4elements.river.artifacts.sinfo.common.SInfoResultType;
 import org.dive4elements.river.artifacts.sinfo.flood_duration.FloodDurationCalculationResult.ValueGetter;
 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
@@ -33,7 +33,7 @@
  * @author Matthias Schäfer
  *
  */
-public final class FloodHeightProcessor extends AbstractSInfoProcessor {
+public final class FloodHeightProcessor extends AbstractProcessor {
 
     private static final String FACET_FLOOD_HEIGHT_LEFT = "sinfo_facet_flood_height.left";
 
@@ -65,12 +65,12 @@
         if (facetIndex == 0) {
             final String description = Resources.getMsg(context.getMeta(), FACET_FLOOD_HEIGHT_DESCRIPTION, FACET_FLOOD_HEIGHT_DESCRIPTION,
                     SInfoResultType.localizeRiverside(context, AttributeKey.LEFT));
-            return new SInfoResultFacet(facetIndex, resultIndex, FACET_FLOOD_HEIGHT_LEFT, description, I18N_AXIS_LABEL, ComputeType.ADVANCE, id, hash);
+            return new ResultFacet(facetIndex, resultIndex, FACET_FLOOD_HEIGHT_LEFT, description, I18N_AXIS_LABEL, ComputeType.ADVANCE, id, hash);
         }
         else {
             final String description = Resources.getMsg(context.getMeta(), FACET_FLOOD_HEIGHT_DESCRIPTION, FACET_FLOOD_HEIGHT_DESCRIPTION,
                     SInfoResultType.localizeRiverside(context, AttributeKey.RIGHT));
-            return new SInfoResultFacet(facetIndex, resultIndex, FACET_FLOOD_HEIGHT_RIGHT, description, I18N_AXIS_LABEL, ComputeType.ADVANCE, id, hash);
+            return new ResultFacet(facetIndex, resultIndex, FACET_FLOOD_HEIGHT_RIGHT, description, I18N_AXIS_LABEL, ComputeType.ADVANCE, id, hash);
         }
     }
 
@@ -109,7 +109,7 @@
                     }
                 };
                 final double[][] points = ((FloodDurationCalculationResult) data).getMainValueDurationPoints(valuegetter, index);
-                return buildSeriesForType(points, generator, bundle, theme, visible, null);
+                return buildSeriesForPoints(points, generator, bundle, theme, visible, null);
             }
         }
 
@@ -124,6 +124,6 @@
 
         final double[][] points = data.getInfrastructurePoints(SInfoResultType.infrastructureHeight, riverside);
 
-        return buildSeriesForType(points, generator, bundle, theme, visible, null);
+        return buildSeriesForPoints(points, generator, bundle, theme, visible, null);
     }
 }
\ No newline at end of file

http://dive4elements.wald.intevation.org