Mercurial > dive4elements > river
changeset 1102:7bd514eb4b2c
Commit accidentally omitted result of refactoring (WINFO/FLYSUtils/getRiver).
flys-artifacts/trunk@2605 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Mon, 29 Aug 2011 09:11:15 +0000 |
parents | 82798c992975 |
children | e0243627ba62 |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java |
diffstat | 2 files changed, 17 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Mon Aug 29 09:07:55 2011 +0000 +++ b/flys-artifacts/ChangeLog Mon Aug 29 09:11:15 2011 +0000 @@ -1,3 +1,10 @@ +2011-08-29 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + Commit accidentally omitted result of refactoring (WINFO/FLYSUtils/getRiver). + + * src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java: + Removed implementations of getRiver, update calls to use FLYSUtils. + 2011-08-29 Felix Wolfsteller <felix.wolfsteller@intevation.de> Interpolate Q main values, generate interpolated W main values on the fly from @@ -25,8 +32,7 @@ New function to retrieve river of an artifact, slightly modified from WINFOArtifact. - * src/main/java/de/intevation/flys/artifacts/AnnotationArtifact.java, - src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java: + * src/main/java/de/intevation/flys/artifacts/AnnotationArtifact.java: Removed implementations of getRiver, update calls to use FLYSUtils. 2011-08-29 Felix Wolfsteller <felix.wolfsteller@intevation.de>
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java Mon Aug 29 09:07:55 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java Mon Aug 29 09:11:15 2011 +0000 @@ -292,7 +292,7 @@ { logger.debug("WINFOArtifact.getWaterlevelData"); - River river = getRiver(); + River river = FLYSUtils.getRiver(this); if (river == null) { return error(new WQKms[0], "No river selected."); } @@ -382,7 +382,7 @@ public CalculationResult getDurationCurveData() { logger.debug("WINFOArtifact.getDurationCurveData"); - River r = getRiver(); + River r = FLYSUtils.getRiver(this); if (r == null) { return error(null, "Cannot determine river."); @@ -441,7 +441,7 @@ */ public CalculationResult getDischargeCurveData() { - River river = getRiver(); + River river = FLYSUtils.getRiver(this); if (river == null) { return error(new WQKms[0], "no river found"); } @@ -497,7 +497,7 @@ { logger.debug("WINFOArtifact.getComputedDischargeCurveData"); - River r = getRiver(); + River r = FLYSUtils.getRiver(this); if (r == null) { return error(new WQKms[0], "Cannot determine river."); @@ -552,7 +552,7 @@ logger.debug("WINFOArtifact.getDischargeLongitudinalSectionData"); - River river = getRiver(); + River river = FLYSUtils.getRiver(this); if (river == null) { logger.debug("No river selected."); return error(new WQKms[0], "No river selected."); @@ -614,7 +614,7 @@ logger.debug("FLYSArtifact.getQsForWs"); } - River r = getRiver(); + River r = FLYSUtils.getRiver(this); if (r == null) { logger.warn("no river found"); return null; @@ -656,19 +656,6 @@ return qs; } - /** - * Returns the selected River object based on the 'river' data that might - * have been inserted by the user. - * - * @return the selected River or null if no river has been chosen yet. - */ - public River getRiver() { - StateData dRiver = getData("river"); - - return dRiver != null - ? RiverFactory.getRiver((String) dRiver.getValue()) - : null; - } /** * Determines the selected mode of distance/range input. @@ -786,7 +773,7 @@ * @return the gauge. */ public Gauge getGauge() { - River river = getRiver(); + River river = FLYSUtils.getRiver(this); if (river == null) { logger.debug("no river found"); @@ -822,12 +809,12 @@ */ public List<Gauge> getGauges() { - River river = getRiver(); + River river = FLYSUtils.getRiver(this); if (river == null) { return null; } - double [] dist = FLYSUtils.getKmRange(this); + double [] dist = FLYSUtils.getKmRange(this); if (dist == null) { return null; }