changeset 4859:e31231d0a720

WaterlevelExporter: Updated to use RangeAccess instead of FLYSUtils.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 23 Jan 2013 13:04:16 +0100
parents 56fbdcdb7ff2
children ba4d7f153890
files flys-artifacts/src/main/java/de/intevation/flys/exports/WaterlevelExporter.java
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/WaterlevelExporter.java	Wed Jan 23 13:03:25 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/WaterlevelExporter.java	Wed Jan 23 13:04:16 2013 +0100
@@ -32,6 +32,7 @@
 
 import de.intevation.flys.model.Gauge;
 
+import de.intevation.flys.artifacts.access.RangeAccess;
 import de.intevation.flys.artifacts.FLYSArtifact;
 import de.intevation.flys.artifacts.WINFOArtifact;
 import de.intevation.flys.artifacts.model.CalculationResult;
@@ -294,6 +295,8 @@
     protected void writeCSVMeta(CSVWriter writer) {
         logger.info("WaterlevelExporter.writeCSVMeta");
 
+        // TODO use Access instead of FLYSUtils
+
         CallMeta meta = context.getMeta();
 
         FLYSArtifact flys = (FLYSArtifact) master;
@@ -333,7 +336,8 @@
                 new Object[] { FLYSUtils.getRivername(flys) })
         });
 
-        double[] kms = FLYSUtils.getKmRange(flys);
+        RangeAccess rangeAccess = new RangeAccess(flys, null);
+        double[] kms = rangeAccess.getKmRange();
         writer.writeNext(new String[] {
             Resources.getMsg(
                 meta,
@@ -654,7 +658,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", kms[0] + " - " + kms[kms.length-1]);
 
         source.addMetaData("gauge", FLYSUtils.getGaugename(flys));

http://dive4elements.wald.intevation.org