Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedHeightAccess.java @ 7919:868f55932fe6
Removed serverside path for bed height epochs.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Fri, 06 Jun 2014 16:59:16 +0200 |
parents | 793dfb2f4b7b |
children | e4606eae8ea5 |
comparison
equal
deleted
inserted
replaced
7918:5813c206ff64 | 7919:868f55932fe6 |
---|---|
93 type = getString("type"); | 93 type = getString("type"); |
94 } | 94 } |
95 return type; | 95 return type; |
96 } | 96 } |
97 | 97 |
98 public String getYearEpoch() { | |
99 if (yearEpoch == null) { | |
100 yearEpoch = getString("ye_select"); | |
101 } | |
102 return yearEpoch; | |
103 } | |
104 | |
105 | |
106 public int[] getBedHeightEpochIDs() { | |
107 if (epochIDs == null) { | |
108 String data = getString("soundings"); | |
109 | |
110 if (data == null) { | |
111 logger.warn("No 'soundings' parameter specified!"); | |
112 return null; | |
113 } | |
114 | |
115 String[] parts = data.split(";"); | |
116 | |
117 TIntArrayList ids = new TIntArrayList(); | |
118 | |
119 for (String part: parts) { | |
120 if (part.indexOf(SoundingsSelect.PREFIX_EPOCH) >= 0) { | |
121 String tmp = part.replace(SoundingsSelect.PREFIX_EPOCH, ""); | |
122 | |
123 try { | |
124 ids.add(Integer.parseInt(tmp)); | |
125 } | |
126 catch (NumberFormatException nfe) { | |
127 logger.warn("Cannot parse int from string: '" + tmp + "'"); | |
128 } | |
129 } | |
130 } | |
131 | |
132 epochIDs = ids.toNativeArray(); | |
133 } | |
134 | |
135 return epochIDs; | |
136 } | |
137 | |
138 public Integer getHeightId() { | 98 public Integer getHeightId() { |
139 if (heightId == null) { | 99 if (heightId == null) { |
140 heightId = getInteger("height_id"); | 100 heightId = getInteger("height_id"); |
141 } | 101 } |
142 return heightId; | 102 return heightId; |