Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationAccess.java @ 9624:02ca823ec9c6
zu Pos 20 Nachtrag; infrastructureChoice
author | dnt_bjoernsen <d.tironi@bjoernsen.de> |
---|---|
date | Fri, 11 Oct 2019 18:30:36 +0200 |
parents | 929d645691ae |
children |
rev | line source |
---|---|
9067 | 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.flood_duration; | |
12 | |
9624
02ca823ec9c6
zu Pos 20 Nachtrag; infrastructureChoice
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents:
9398
diff
changeset
|
13 import java.util.List; |
02ca823ec9c6
zu Pos 20 Nachtrag; infrastructureChoice
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents:
9398
diff
changeset
|
14 |
9067 | 15 import org.apache.log4j.Logger; |
16 import org.dive4elements.river.artifacts.access.RangeAccess; | |
17 import org.dive4elements.river.artifacts.sinfo.SINFOArtifact; | |
18 import org.dive4elements.river.artifacts.sinfo.SinfoCalcMode; | |
9624
02ca823ec9c6
zu Pos 20 Nachtrag; infrastructureChoice
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents:
9398
diff
changeset
|
19 import org.dive4elements.river.artifacts.sinfo.flood_duration.InfrastructureServerClientXChange.Element; |
9229
0dcd1cd41915
Different themes/facets for left bank and right bank infrastructures in S-Info flood durations, some fixmes done
mschaefer
parents:
9176
diff
changeset
|
20 import org.dive4elements.river.artifacts.sinfo.flood_duration.RiversideRadioChoice.RiversideChoiceKey; |
9067 | 21 |
22 /** | |
9176
1614cb14308f
Work on calculations for S-Info flood duration workflow
mschaefer
parents:
9145
diff
changeset
|
23 * Access to the flood duration calculation type specific SInfo artifact data. |
9067 | 24 * REMARK: this class is NOT intended to be hold in the results (or anywhere else), in order to avoid a permanent |
25 * reference to the artifact instance. | |
26 * Hence we do NOT cache any data. | |
27 * | |
28 * @author Gernot Belger | |
29 */ | |
30 final class FloodDurationAccess extends RangeAccess { | |
31 | |
32 private static Logger log = Logger.getLogger(FloodDurationAccess.class); | |
33 | |
34 public FloodDurationAccess(final SINFOArtifact artifact) { | |
35 super(artifact); | |
36 | |
37 /* assert calculation mode */ | |
38 final SinfoCalcMode calculationMode = artifact.getCalculationMode(); | |
39 assert (calculationMode == SinfoCalcMode.sinfo_calc_flood_duration); | |
40 } | |
41 | |
42 @Override | |
43 public Double getStep() { | |
44 return super.getStep(); | |
45 } | |
46 | |
9229
0dcd1cd41915
Different themes/facets for left bank and right bank infrastructures in S-Info flood durations, some fixmes done
mschaefer
parents:
9176
diff
changeset
|
47 public RiversideChoiceKey getRiverside() { |
0dcd1cd41915
Different themes/facets for left bank and right bank infrastructures in S-Info flood durations, some fixmes done
mschaefer
parents:
9176
diff
changeset
|
48 return RiversideChoiceKey.fromKey(super.getString("riverside")); |
9067 | 49 } |
9398
929d645691ae
Fixed: sinfo flood duration: no w/q problem report with unchecked wspl option
mschaefer
parents:
9229
diff
changeset
|
50 |
929d645691ae
Fixed: sinfo flood duration: no w/q problem report with unchecked wspl option
mschaefer
parents:
9229
diff
changeset
|
51 public boolean getIsWspl() { |
929d645691ae
Fixed: sinfo flood duration: no w/q problem report with unchecked wspl option
mschaefer
parents:
9229
diff
changeset
|
52 return super.getBoolean("wspl").booleanValue(); |
929d645691ae
Fixed: sinfo flood duration: no w/q problem report with unchecked wspl option
mschaefer
parents:
9229
diff
changeset
|
53 } |
9624
02ca823ec9c6
zu Pos 20 Nachtrag; infrastructureChoice
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents:
9398
diff
changeset
|
54 |
02ca823ec9c6
zu Pos 20 Nachtrag; infrastructureChoice
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents:
9398
diff
changeset
|
55 public List<Element> getInfrastructureChoices() { |
02ca823ec9c6
zu Pos 20 Nachtrag; infrastructureChoice
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents:
9398
diff
changeset
|
56 return InfrastructureServerClientXChange.parse(super.getString("flood_infrastructure")); |
02ca823ec9c6
zu Pos 20 Nachtrag; infrastructureChoice
dnt_bjoernsen <d.tironi@bjoernsen.de>
parents:
9398
diff
changeset
|
57 } |
9067 | 58 } |