changeset 4858:56fbdcdb7ff2

ChartGenerator, DurationCurveExporter: Updated to use RangeAccess instead of FLYSUtils.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 23 Jan 2013 13:03:25 +0100
parents c7133c1f8ede
children e31231d0a720
files flys-artifacts/src/main/java/de/intevation/flys/exports/ChartGenerator.java flys-artifacts/src/main/java/de/intevation/flys/exports/DurationCurveExporter.java
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/ChartGenerator.java	Wed Jan 23 13:02:27 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/ChartGenerator.java	Wed Jan 23 13:03:25 2013 +0100
@@ -8,6 +8,7 @@
 import de.intevation.artifacts.CallMeta;
 import de.intevation.artifacts.PreferredLocale;
 import de.intevation.artifacts.common.utils.XMLUtils;
+import de.intevation.flys.artifacts.access.RangeAccess;
 import de.intevation.flys.artifacts.FLYSArtifact;
 import de.intevation.flys.artifacts.resources.Resources;
 import de.intevation.flys.collections.FLYSArtifactCollection;
@@ -1423,7 +1424,8 @@
     protected double[] getRange() {
         FLYSArtifact flys = (FLYSArtifact) master;
 
-        return FLYSUtils.getKmRange(flys);
+        RangeAccess rangeAccess = new RangeAccess(flys, null);
+        return rangeAccess.getKmRange();
     }
 
 
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/DurationCurveExporter.java	Wed Jan 23 13:02:27 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/DurationCurveExporter.java	Wed Jan 23 13:03:25 2013 +0100
@@ -27,6 +27,7 @@
 
 import de.intevation.flys.artifacts.FLYSArtifact;
 
+import de.intevation.flys.artifacts.access.RangeAccess;
 import de.intevation.flys.artifacts.model.WQDay;
 import de.intevation.flys.artifacts.model.CalculationResult;
 import de.intevation.flys.artifacts.model.WKmsJRDataSource;
@@ -218,7 +219,8 @@
 
         source.addMetaData("date", df.format(new Date()));
 
-        double[] kms = FLYSUtils.getKmRange(flys);
+        RangeAccess rangeAccess = new RangeAccess(flys, null);
+        double[] kms = rangeAccess.getKmRange();
         source.addMetaData("range", String.valueOf(kms[0]));
 
         source.addMetaData("calculation", Resources.getMsg(

http://dive4elements.wald.intevation.org