Mercurial > dive4elements > river
changeset 1103:e0243627ba62
Use FLYSUtils.getRiver instead of WINFOArtifact.getRiver.
flys-artifacts/trunk@2606 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Mon, 29 Aug 2011 09:26:07 +0000 |
parents | 7bd514eb4b2c |
children | 9383a4608d9f |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/ComputedDischargeCurveState.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/DurationCurveState.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQAdapted.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQSelect.java flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeCurveGenerator.java |
diffstat | 6 files changed, 29 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Mon Aug 29 09:11:15 2011 +0000 +++ b/flys-artifacts/ChangeLog Mon Aug 29 09:26:07 2011 +0000 @@ -1,3 +1,14 @@ +2011-08-29 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + Use FLYSUtils.getRiver instead of WINFOArtifact.getRiver. + + * src/main/java/de/intevation/flys/artifacts/states/ComputedDischargeCurveState.java, + src/main/java/de/intevation/flys/artifacts/states/WQAdapted.java, + src/main/java/de/intevation/flys/artifacts/states/WQSelect.java, + src/main/java/de/intevation/flys/artifacts/states/DurationCurveState.java, + src/main/java/de/intevation/flys/exports/DischargeCurveGenerator.java: + Use FLYSUtils.getRiver instead of WINFOArtifact.getRiver. + 2011-08-29 Felix Wolfsteller <felix.wolfsteller@intevation.de> Commit accidentally omitted result of refactoring (WINFO/FLYSUtils/getRiver).
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/ComputedDischargeCurveState.java Mon Aug 29 09:11:15 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/ComputedDischargeCurveState.java Mon Aug 29 09:26:07 2011 +0000 @@ -20,6 +20,7 @@ import de.intevation.flys.artifacts.resources.Resources; +import de.intevation.flys.utils.FLYSUtils; /** * The final state that will be reached after the discharge curve calculation @@ -59,7 +60,7 @@ for (int i = 0; i < wqkms.length; ++i) { Object[] args = new Object[] { - winfo.getRiver().getName(), + FLYSUtils.getRiver(winfo).getName(), wqkms[i].getName() };
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/DurationCurveState.java Mon Aug 29 09:11:15 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/DurationCurveState.java Mon Aug 29 09:26:07 2011 +0000 @@ -21,6 +21,8 @@ import de.intevation.flys.artifacts.resources.Resources; +import de.intevation.flys.utils.FLYSUtils; + /** * The final state that will be reached after the duration curve calculation @@ -62,7 +64,7 @@ if (wqday != null && facets != null) { Object[] args = new Object[] { - winfo.getRiver().getName() + FLYSUtils.getRiver(winfo).getName() }; String nameW = Resources.getMsg(
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQAdapted.java Mon Aug 29 09:11:15 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQAdapted.java Mon Aug 29 09:26:07 2011 +0000 @@ -123,7 +123,7 @@ WINFOArtifact flysArtifact = (WINFOArtifact) artifact; double[] dist = FLYSUtils.getKmRange(flysArtifact); - River river = flysArtifact.getRiver(); + River river = FLYSUtils.getRiver(flysArtifact); Wst wst = WstFactory.getWst(river); List<Gauge> gauges = flysArtifact.getGauges(); @@ -337,9 +337,9 @@ throw new IllegalArgumentException("error_missing_wq_data"); } - List<Gauge> gauges = ((WINFOArtifact) artifact).getGauges(); - River river = ((WINFOArtifact) artifact).getRiver(); - Wst wst = WstFactory.getWst(river); + List<Gauge> gauges = flys.getGauges(); + River river = FLYSUtils.getRiver(flys); + Wst wst = WstFactory.getWst(river); for (Gauge gauge: gauges) { Range range = gauge.getRange();
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQSelect.java Mon Aug 29 09:11:15 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQSelect.java Mon Aug 29 09:26:07 2011 +0000 @@ -23,6 +23,9 @@ import de.intevation.flys.artifacts.model.WstFactory; import de.intevation.flys.artifacts.resources.Resources; +import de.intevation.flys.utils.FLYSUtils; + + /** * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> */ @@ -185,9 +188,9 @@ WINFOArtifact flysArtifact = (WINFOArtifact) artifact; - River river = flysArtifact.getRiver(); - Gauge gauge = flysArtifact.getGauge(); - Wst wst = WstFactory.getWst(river); + River river = FLYSUtils.getRiver(flysArtifact); + Gauge gauge = flysArtifact.getGauge(); + Wst wst = WstFactory.getWst(river); double[] minmaxQ = gauge != null ? wst.determineMinMaxQ(gauge.getRange())
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeCurveGenerator.java Mon Aug 29 09:11:15 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeCurveGenerator.java Mon Aug 29 09:26:07 2011 +0000 @@ -26,6 +26,8 @@ import de.intevation.flys.artifacts.model.WQKms; +import de.intevation.flys.utils.FLYSUtils; + /** * An OutGenerator that generates discharge curves. * @@ -115,7 +117,7 @@ String gaugeName = wqkms.getName(); - River river = flysArtifact.getRiver(); + River river = FLYSUtils.getRiver(flysArtifact); if (river == null) { logger.debug("no river found");