Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineAccess.java @ 9062:5198066492a9
Teilabschnitt Salix State
author | gernotbelger |
---|---|
date | Mon, 07 May 2018 17:25:53 +0200 |
parents | |
children | a5cf8d7bff3c |
comparison
equal
deleted
inserted
replaced
9061:41ec5095506f | 9062:5198066492a9 |
---|---|
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.uinfo.salix; | |
12 | |
13 import org.apache.commons.lang.math.DoubleRange; | |
14 import org.dive4elements.river.artifacts.access.RangeAccess; | |
15 import org.dive4elements.river.artifacts.uinfo.UINFOArtifact; | |
16 import org.dive4elements.river.artifacts.uinfo.UinfoCalcMode; | |
17 | |
18 /** | |
19 * Access to the flow depth calculation type specific SInfo artifact data. | |
20 * REMARK: this class is NOT intended to be hold in the results (or anywhere else), in order to avoid a permanent | |
21 * reference to the artifact instance. | |
22 * Hence we do NOT cache any data. | |
23 * | |
24 * @author Gernot Belger | |
25 */ | |
26 final class SalixLineAccess extends RangeAccess { | |
27 | |
28 static final String FIELD_DIFFID_CURRENT = "diffid_current"; | |
29 static final String FIELD_DIFFID_HIST = "diffid_historical"; | |
30 | |
31 public SalixLineAccess(final UINFOArtifact artifact) { | |
32 super(artifact); | |
33 | |
34 /* assert calculation mode */ | |
35 final UinfoCalcMode calculationMode = artifact.getCalculationMode(); | |
36 assert (calculationMode == UinfoCalcMode.uinfo_salix_line); | |
37 } | |
38 | |
39 public DoubleRange getRange() { | |
40 final double from = getFrom(); | |
41 final double to = getTo(); | |
42 return new DoubleRange(from, to); | |
43 } | |
44 | |
45 } |