Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthminmax/FlowDepthMinMaxAccess.java @ 9070:611a523fc42f
VegetationZoneAccessHelper, VegetationTablePanels verbessert
author | gernotbelger |
---|---|
date | Tue, 15 May 2018 18:04:36 +0200 |
parents | 0adc6d04de95 |
children |
rev | line source |
---|---|
8946 | 1 /* Copyright (C) 2017 by Bundesanstalt für Gewässerkunde |
2 * Software engineering by | |
3 * Björnsen Beratende Ingenieure GmbH | |
4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt | |
5 * | |
6 * This file is Free Software under the GNU AGPL (>=v3) | |
7 * and comes with ABSOLUTELY NO WARRANTY! Check out the | |
8 * documentation coming with Dive4Elements River for details. | |
9 */ | |
10 | |
11 package org.dive4elements.river.artifacts.sinfo.flowdepthminmax; | |
12 | |
13 import java.util.Collection; | |
14 | |
15 import org.dive4elements.river.artifacts.access.RangeAccess; | |
16 import org.dive4elements.river.artifacts.sinfo.SINFOArtifact; | |
17 import org.dive4elements.river.artifacts.sinfo.SinfoCalcMode; | |
18 import org.dive4elements.river.artifacts.sinfo.flowdepth.WstSoundingIdPair; | |
19 | |
20 /** | |
21 * Access to the flow depth calculation type specific SInfo artifact data. | |
22 * REMARK: this class is NOT intended to be hold in the results (or anywhere else), in order to avoid a permanent | |
23 * reference to the artifact instance. | |
24 * Hence we do NOT cache any data. | |
25 * | |
26 * @author Gernot Belger | |
27 */ | |
28 final class FlowDepthMinMaxAccess extends RangeAccess { | |
29 | |
30 private static final String FIELD_DIFFIDS = "diffids"; | |
31 | |
32 public FlowDepthMinMaxAccess(final SINFOArtifact artifact) { | |
33 super(artifact); | |
34 | |
35 /* assert calculation mode */ | |
36 final SinfoCalcMode calculationMode = artifact.getCalculationMode(); | |
37 assert (calculationMode == SinfoCalcMode.sinfo_calc_flow_depth_minmax); | |
38 } | |
39 | |
8993
0adc6d04de95
SInfo - FlowDepthMinMax: choosing bed heights, not bed height min and max separately
gernotbelger
parents:
8946
diff
changeset
|
40 public Collection<WstSoundingIdPair> getMinMaxPairs() { |
8946 | 41 final String diffids = getString(FIELD_DIFFIDS); |
8993
0adc6d04de95
SInfo - FlowDepthMinMax: choosing bed heights, not bed height min and max separately
gernotbelger
parents:
8946
diff
changeset
|
42 return WstSoundingIdPair.parsePairs(diffids); |
8946 | 43 } |
44 } |