comparison artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineAccess.java @ 9321:a978b601a034

Salix: Fixed ArrrayoutOfBoundsException; minor cleanup
author gernotbelger
date Fri, 27 Jul 2018 10:25:09 +0200
parents 9a9f076d5716
children 2da486c7c05f
comparison
equal deleted inserted replaced
9320:61e6d158a20f 9321:a978b601a034
21 * Hence we do NOT cache any data. 21 * Hence we do NOT cache any data.
22 * 22 *
23 * @author Gernot Belger 23 * @author Gernot Belger
24 */ 24 */
25 final class SalixLineAccess extends RangeAccess { 25 final class SalixLineAccess extends RangeAccess {
26
27 static final String FIELD_DIFFID_CURRENT = "diffid_current";
28 static final String FIELD_DIFFID_HIST = "diffid_historical";
29 // calculation_mode
30 // ld_from , ld_to
31 // use_scenario (boolean)
32 // ld_from_part; ld_to_part
33 // scenario_selection (mögliche Werte:"scenarioType.option1" "scenarioType.option2" "scenarioType.option3"
34 26
35 /** 27 /**
36 * Type of a salix line scenario with key property used by the client 28 * Type of a salix line scenario with key property used by the client
37 */ 29 */
38 public enum ScenarioType { 30 public enum ScenarioType {
66 /* assert calculation mode */ 58 /* assert calculation mode */
67 final UinfoCalcMode calculationMode = artifact.getCalculationMode(); 59 final UinfoCalcMode calculationMode = artifact.getCalculationMode();
68 assert (calculationMode == UinfoCalcMode.uinfo_salix_line); 60 assert (calculationMode == UinfoCalcMode.uinfo_salix_line);
69 } 61 }
70 62
71 public boolean getUseScenario() { 63 private boolean getUseScenario() {
72 return super.getBoolean("use_scenario"); 64 return super.getBoolean("use_scenario");
73 } 65 }
74 66
75 public ScenarioType getScenario() { 67 public ScenarioType getScenario() {
76 if (getUseScenario()) 68 if (getUseScenario())
77 return ScenarioType.forKey(getString("scenario_selection")); 69 return ScenarioType.forKey(getString("scenario_selection"));
78 else 70
79 return ScenarioType.NONE; 71 return ScenarioType.NONE;
80 } 72 }
81 73
82 public Double getFromPart() { 74 public Double getFromPart() {
83 return getDouble("ld_from_part"); 75 return getDouble("ld_from_part");
84 } 76 }

http://dive4elements.wald.intevation.org