Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/common/AccessHelper.java @ 9069:1ffd38826175
access uinfo.vegetationzones+inundation_duration
author | gernotbelger |
---|---|
date | Tue, 15 May 2018 12:00:26 +0200 |
parents | 2ed3824a3d53 |
children |
comparison
equal
deleted
inserted
replaced
9068:a5cf8d7bff3c | 9069:1ffd38826175 |
---|---|
35 return getString("ye_select"); // ACHTUNG, Ergebniswerte wurden geändert in state.sinfo.epoch und state.sinfo.year | 35 return getString("ye_select"); // ACHTUNG, Ergebniswerte wurden geändert in state.sinfo.epoch und state.sinfo.year |
36 | 36 |
37 } | 37 } |
38 | 38 |
39 /** [year1, years2,..] if its about years. */ | 39 /** [year1, years2,..] if its about years. */ |
40 public int[] getYears(final String yearSelectedValue) { | 40 public int[] getYears(final String yearSelectedValue, final String yearKey) { |
41 int[] years = null; | 41 int[] years = null; |
42 // if (years != null) { | 42 // if (years != null) { |
43 // return years; | 43 // return years; |
44 // } | 44 // } |
45 if (getYearEpoch().equals(yearSelectedValue)) { | 45 if (getYearEpoch().equals(yearSelectedValue)) { |
46 final TIntArrayList ints = new TIntArrayList(); | 46 final TIntArrayList ints = new TIntArrayList(); |
47 final String yearsData = getString("years"); | 47 final String yearsData = getString(yearKey); |
48 if (yearsData == null || yearsData.isEmpty()) { | 48 if (yearsData == null || yearsData.isEmpty()) { |
49 log.warn("No years provided"); | 49 log.warn("No years provided"); |
50 return null; | 50 return null; |
51 } | 51 } |
52 for (final String sValue : yearsData.split(" ")) { | 52 for (final String sValue : yearsData.split(" ")) { |
67 return years; | 67 return years; |
68 } | 68 } |
69 return null; | 69 return null; |
70 } | 70 } |
71 | 71 |
72 public int[][] getEpochs(final String epochSelectedValue) { | 72 public int[][] getEpochs(final String epochSelectedValue, final String epochKey) { |
73 int epochs[][] = null; | 73 int epochs[][] = null; |
74 // if (epochs != null) { | 74 // if (epochs != null) { |
75 // return epochs; | 75 // return epochs; |
76 // } | 76 // } |
77 | 77 |
78 if (!getYearEpoch().equals(epochSelectedValue)) { | 78 if (!getYearEpoch().equals(epochSelectedValue)) { |
79 return null; | 79 return null; |
80 } | 80 } |
81 | 81 |
82 final String data = getString("epochs"); | 82 final String data = getString(epochKey); |
83 | 83 |
84 if (data == null) { | 84 if (data == null) { |
85 log.warn("No 'epochs' parameter specified!"); | 85 log.warn("No 'epochs' parameter specified!"); |
86 return null; | 86 return null; |
87 } | 87 } |