Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/inundationduration/InundationDurationAccess.java @ 9190:0633f963c5be
uinfo.inundationduration workflow
author | gernotbelger |
---|---|
date | Thu, 28 Jun 2018 15:10:04 +0200 |
parents | dace17e26d33 |
children | 787fc085459b |
comparison
equal
deleted
inserted
replaced
9189:13a0c4be17ea | 9190:0633f963c5be |
---|---|
49 final UinfoCalcMode calculationMode = uinfo.getCalculationMode(); | 49 final UinfoCalcMode calculationMode = uinfo.getCalculationMode(); |
50 this.helper = new EpochYearAccessHelper(uinfo); | 50 this.helper = new EpochYearAccessHelper(uinfo); |
51 assert (calculationMode == UinfoCalcMode.uinfo_inundation_duration); | 51 assert (calculationMode == UinfoCalcMode.uinfo_inundation_duration); |
52 } | 52 } |
53 | 53 |
54 public Double getSedimentHeight() { | |
55 if (super.getBoolean("use_scenario")) { | |
56 return super.getDouble("sedimentheight"); // TODO: INPUT Valdiation (nicht hier, sondern im Panel. Erinnerung) | |
57 } | |
58 return null; | |
59 } | |
60 | |
61 public Integer getYear() { | 54 public Integer getYear() { |
62 final int[] years = this.helper.getYears("state.uinfo.year", "singleyear"); | 55 final int[] years = this.helper.getYears("state.uinfo.year", "singleyear"); |
63 if (years != null) { | 56 if (years != null) { |
64 return years[0]; | 57 return years[0]; |
65 } | 58 } |
76 } | 69 } |
77 | 70 |
78 } | 71 } |
79 | 72 |
80 public String getWMSScenarioUrl() { | 73 public String getWMSScenarioUrl() { |
81 if (super.getBoolean("use_scenario")) { | 74 if (getIsUseScenario()) { |
82 final UedauernPropertiesHelper helper = UedauernPropertiesHelper.getInstance(getRiverName()); | 75 final UedauernPropertiesHelper helper = UedauernPropertiesHelper.getInstance(getRiverName()); |
83 if (this.getYear() != null) { | 76 if (this.getYear() != null) { |
84 return helper.getScenarioUrlFromYear(this.getYear(), this.getDwspl()); | 77 return helper.getScenarioUrlFromYear(this.getYear(), this.getDwspl()); |
85 } else { | 78 } else { |
86 return helper.getMittelScenarioUrl(this.getDwspl()); // nur 2 cases... | 79 return helper.getMittelScenarioUrl(this.getDwspl()); // nur 2 cases... |
87 } | 80 } |
88 } | 81 } |
89 return ""; | 82 return ""; |
90 } | 83 } |
91 | 84 |
92 private Integer getDwspl() { | 85 public Integer getDwspl() { |
93 if (super.getBoolean("use_scenario")) { | 86 if (getIsUseScenario()) { |
94 return super.getInteger("sedimentheight"); | 87 return super.getInteger("sedimentheight"); |
95 } | 88 } |
96 return null; | 89 return null; |
97 } | 90 } |
98 | 91 |
99 public String getVegZones() { | 92 public String getVegZones() { |
100 // mit VegetationzonesAccess zusammenlegen (eine Zeile sparen...) | 93 // mit VegetationzonesAccess zusammenlegen (eine Zeile sparen...) |
101 return super.getString("vegzones"); | 94 return super.getString("vegzones"); |
102 } | 95 } |
103 | 96 |
97 public boolean getIsUseScenario() { | |
98 return super.getBoolean("use_scenario"); | |
99 } | |
100 | |
101 public Integer[] mittelStartEndYears() { | |
102 if (getIsUseScenario()) { | |
103 final UedauernPropertiesHelper helper = UedauernPropertiesHelper.getInstance(getRiverName()); | |
104 return helper.getMittelStartEnd(); | |
105 } | |
106 return null; | |
107 } | |
104 } | 108 } |