[PATCH] Use RiverAccess instead of RiverUtils
Wald Commits
scm-commit at wald.intevation.org
Thu Nov 27 17:46:54 CET 2014
# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1417106797 -3600
# Node ID 95fd15ece1efb38e00034a07c18c849ae8a692d1
# Parent f53d562d72505299ab6c9643f449c110c7c0ef29
Use RiverAccess instead of RiverUtils.
diff -r f53d562d7250 -r 95fd15ece1ef artifacts/src/main/java/org/dive4elements/river/artifacts/GaugeDischargeArtifact.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/GaugeDischargeArtifact.java Thu Nov 27 17:09:19 2014 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/GaugeDischargeArtifact.java Thu Nov 27 17:46:37 2014 +0100
@@ -31,15 +31,14 @@
import org.dive4elements.river.artifacts.model.Calculation;
import org.dive4elements.river.artifacts.model.CalculationResult;
+import org.dive4elements.river.artifacts.model.DischargeTables;
-import org.dive4elements.river.artifacts.model.DischargeTables;
+import org.dive4elements.river.artifacts.access.RiverAccess;
import org.dive4elements.river.model.Gauge;
import org.dive4elements.river.model.River;
import org.dive4elements.river.model.DischargeTable;
-import org.dive4elements.river.utils.RiverUtils;
-
/**
* Artifact to get discharge curves at gauges.
@@ -142,8 +141,8 @@
/** Get the Gauges which came with datacage data-document. */
public Gauge getGauge() {
- River river = RiverUtils.getRiver(this);
- return river.determineGaugeByName(getGaugeName());
+ return new RiverAccess((D4EArtifact)this).getRiver()
+ .determineGaugeByName(getGaugeName());
}
@@ -153,7 +152,7 @@
*/
public CalculationResult getDischargeCurveData() {
- River river = RiverUtils.getRiver(this);
+ River river = new RiverAccess((D4EArtifact)this).getRiver();
if (river == null) {
return error(new WQKms[0], "no.river.selected");
}
More information about the Dive4Elements-commits
mailing list