Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/states/WQAdapted.java @ 5865:73da40528cf2
River artifacts: Renamed FLYSUtils to RiverUtils.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Sun, 28 Apr 2013 15:09:31 +0200 |
parents | 4897a58c8746 |
children | 59ff03ff48f1 |
comparison
equal
deleted
inserted
replaced
5864:f2e46a668fe6 | 5865:73da40528cf2 |
---|---|
34 | 34 |
35 import org.dive4elements.river.artifacts.FLYSArtifact; | 35 import org.dive4elements.river.artifacts.FLYSArtifact; |
36 | 36 |
37 import org.dive4elements.river.artifacts.model.RangeWithValues; | 37 import org.dive4elements.river.artifacts.model.RangeWithValues; |
38 import org.dive4elements.river.artifacts.model.WstFactory; | 38 import org.dive4elements.river.artifacts.model.WstFactory; |
39 import org.dive4elements.river.utils.FLYSUtils; | 39 import org.dive4elements.river.utils.RiverUtils; |
40 | 40 |
41 | 41 |
42 /** | 42 /** |
43 * State to input W/Q data. | 43 * State to input W/Q data. |
44 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 44 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
138 FLYSArtifact flysArtifact = (FLYSArtifact) artifact; | 138 FLYSArtifact flysArtifact = (FLYSArtifact) artifact; |
139 | 139 |
140 RangeAccess rangeAccess = new RangeAccess(flysArtifact, context); | 140 RangeAccess rangeAccess = new RangeAccess(flysArtifact, context); |
141 double[] dist = rangeAccess.getKmRange(); | 141 double[] dist = rangeAccess.getKmRange(); |
142 // TODO use Access to get River and gauges. | 142 // TODO use Access to get River and gauges. |
143 River river = FLYSUtils.getRiver(flysArtifact); | 143 River river = RiverUtils.getRiver(flysArtifact); |
144 Wst wst = WstFactory.getWst(river); | 144 Wst wst = WstFactory.getWst(river); |
145 List<Gauge> gauges = FLYSUtils.getGauges(flysArtifact); | 145 List<Gauge> gauges = RiverUtils.getGauges(flysArtifact); |
146 | 146 |
147 int num = gauges != null ? gauges.size() : 0; | 147 int num = gauges != null ? gauges.size() : 0; |
148 | 148 |
149 if (num == 0) { | 149 if (num == 0) { |
150 logger.warn("Selected distance matches no gauges."); | 150 logger.warn("Selected distance matches no gauges."); |
333 | 333 |
334 if (rwvs == null) { | 334 if (rwvs == null) { |
335 throw new IllegalArgumentException("error_missing_wq_data"); | 335 throw new IllegalArgumentException("error_missing_wq_data"); |
336 } | 336 } |
337 | 337 |
338 List<Gauge> gauges = FLYSUtils.getGauges((FLYSArtifact) artifact); | 338 List<Gauge> gauges = RiverUtils.getGauges((FLYSArtifact) artifact); |
339 | 339 |
340 for (Gauge gauge: gauges) { | 340 for (Gauge gauge: gauges) { |
341 Range range = gauge.getRange(); | 341 Range range = gauge.getRange(); |
342 double lower = range.getA().doubleValue(); | 342 double lower = range.getA().doubleValue(); |
343 double upper = range.getB().doubleValue(); | 343 double upper = range.getB().doubleValue(); |
363 | 363 |
364 if (rwvs == null) { | 364 if (rwvs == null) { |
365 throw new IllegalArgumentException("error_missing_wq_data"); | 365 throw new IllegalArgumentException("error_missing_wq_data"); |
366 } | 366 } |
367 | 367 |
368 List<Gauge> gauges = FLYSUtils.getGauges(flys); | 368 List<Gauge> gauges = RiverUtils.getGauges(flys); |
369 River river = FLYSUtils.getRiver(flys); | 369 River river = RiverUtils.getRiver(flys); |
370 Wst wst = WstFactory.getWst(river); | 370 Wst wst = WstFactory.getWst(river); |
371 | 371 |
372 for (Gauge gauge: gauges) { | 372 for (Gauge gauge: gauges) { |
373 Range range = gauge.getRange(); | 373 Range range = gauge.getRange(); |
374 double lower = range.getA().doubleValue(); | 374 double lower = range.getA().doubleValue(); |