Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/verticalcrosssection/VerticalCrossSectionOutputState.java @ 1090:51f3edc9d743
Added missing classes of the last commit.
gnv-artifacts/trunk@1204 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Sat, 12 Jun 2010 13:00:45 +0000 |
parents | cc4ec127d666 |
children | f953c9a559d8 |
comparison
equal
deleted
inserted
replaced
1089:1dc08501a1be | 1090:51f3edc9d743 |
---|---|
189 * @param callContext The CallContext object. | 189 * @param callContext The CallContext object. |
190 * @return the data used to create a VerticalCrossProfileChart. | 190 * @return the data used to create a VerticalCrossProfileChart. |
191 */ | 191 */ |
192 protected Object getData(String uuid, CallContext callContext) { | 192 protected Object getData(String uuid, CallContext callContext) { |
193 Collection<Result> result = null; | 193 Collection<Result> result = null; |
194 InputData meshLine = inputData.get("mesh_linestring"); | |
195 InputData meshId = inputData.get("meshid"); | 194 InputData meshId = inputData.get("meshid"); |
195 String meshLine = getLineString(); | |
196 | 196 |
197 if (meshLine == null) { | 197 if (meshLine == null) { |
198 log.error("mesh_linestring is not defined"); | 198 log.error("mesh_linestring is not defined"); |
199 throw new IllegalStateException("missing mesh_linestring"); | 199 throw new IllegalStateException("missing mesh_linestring"); |
200 } | 200 } |
203 log.error("meshid is not defined"); | 203 log.error("meshid is not defined"); |
204 throw new IllegalStateException("missing meshid"); | 204 throw new IllegalStateException("missing meshid"); |
205 } | 205 } |
206 | 206 |
207 Coordinate [] coords = WKTUtils.toCoordinates( | 207 Coordinate [] coords = WKTUtils.toCoordinates( |
208 meshLine.getValue()); | 208 meshLine); |
209 | 209 |
210 if (coords == null) { | 210 if (coords == null) { |
211 throw new IllegalStateException("cannot read coordinates"); | 211 throw new IllegalStateException("cannot read coordinates"); |
212 } | 212 } |
213 | 213 |
238 Arrays.asList(coords), | 238 Arrays.asList(coords), |
239 preProcess(result), | 239 preProcess(result), |
240 callContext); | 240 callContext); |
241 | 241 |
242 return obj; | 242 return obj; |
243 } | |
244 | |
245 | |
246 protected String getLineString() { | |
247 InputData meshLine = inputData.get("mesh_linestring"); | |
248 | |
249 return meshLine != null ? meshLine.getValue() : null; | |
243 } | 250 } |
244 | 251 |
245 | 252 |
246 @Override | 253 @Override |
247 protected String getSelectedInputDataName(String uuid, String id) { | 254 protected String getSelectedInputDataName(String uuid, String id) { |