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
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
1 /* Copyright (C) 2017 by Bundesanstalt für Gewässerkunde
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
2 * Software engineering by
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
3 * Björnsen Beratende Ingenieure GmbH
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
5 *
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
6 * This file is Free Software under the GNU AGPL (>=v3)
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
7 * and comes with ABSOLUTELY NO WARRANTY! Check out the
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
8 * documentation coming with Dive4Elements River for details.
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
9 */
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
10
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
11 package org.dive4elements.river.artifacts.sinfo.flowdepthminmax;
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
12
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
13 import java.util.Collection;
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
14
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
15 import org.dive4elements.river.artifacts.access.RangeAccess;
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
16 import org.dive4elements.river.artifacts.sinfo.SINFOArtifact;
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
17 import org.dive4elements.river.artifacts.sinfo.SinfoCalcMode;
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
18 import org.dive4elements.river.artifacts.sinfo.flowdepth.WstSoundingIdPair;
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
19
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
20 /**
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
21 * Access to the flow depth calculation type specific SInfo artifact data.
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
22 * REMARK: this class is NOT intended to be hold in the results (or anywhere else), in order to avoid a permanent
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
23 * reference to the artifact instance.
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
24 * Hence we do NOT cache any data.
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
25 *
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
26 * @author Gernot Belger
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
27 */
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
28 final class FlowDepthMinMaxAccess extends RangeAccess {
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
29
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
30 private static final String FIELD_DIFFIDS = "diffids";
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
31
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
32 public FlowDepthMinMaxAccess(final SINFOArtifact artifact) {
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
33 super(artifact);
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
34
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
35 /* assert calculation mode */
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
36 final SinfoCalcMode calculationMode = artifact.getCalculationMode();
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
37 assert (calculationMode == SinfoCalcMode.sinfo_calc_flow_depth_minmax);
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
38 }
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
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
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
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
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
43 }
5d5d482da3e9 Implementing SINFO - FlowDepthMinMax calculation
gernotbelger
parents:
diff changeset
44 }

http://dive4elements.wald.intevation.org