# HG changeset patch # User Felix Wolfsteller # Date 1358942656 -3600 # Node ID e31231d0a7209766f9943469faf38e474bf6c66b # Parent 56fbdcdb7ff23d4bd550161cc6d5cb07b11a31ce WaterlevelExporter: Updated to use RangeAccess instead of FLYSUtils. diff -r 56fbdcdb7ff2 -r e31231d0a720 flys-artifacts/src/main/java/de/intevation/flys/exports/WaterlevelExporter.java --- 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));