Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/importer/parsers/BedHeightParser.java @ 3662:0d27d02b1208
backend: Completed the error messages of the importer.
flys-backend/trunk@5266 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 24 Aug 2012 15:47:31 +0000 |
parents | 8926571e47fb |
children | 90f91ba077a8 |
comparison
equal
deleted
inserted
replaced
3661:3ea5e835ecce | 3662:0d27d02b1208 |
---|---|
190 } | 190 } |
191 else if (handleMetaOldElevationModel(obj, meta)) { | 191 else if (handleMetaOldElevationModel(obj, meta)) { |
192 return; | 192 return; |
193 } | 193 } |
194 else { | 194 else { |
195 log.warn("Meta line did not match any known type: " + line); | 195 log.warn("BHP: Meta line did not match any known type: " + line); |
196 } | 196 } |
197 } | 197 } |
198 | 198 |
199 | 199 |
200 protected boolean handleMetaYear(ImportBedHeight obj, String line) { | 200 protected boolean handleMetaYear(ImportBedHeight obj, String line) { |
206 try { | 206 try { |
207 obj.setYear(Integer.valueOf(tmp)); | 207 obj.setYear(Integer.valueOf(tmp)); |
208 return true; | 208 return true; |
209 } | 209 } |
210 catch (NumberFormatException e) { | 210 catch (NumberFormatException e) { |
211 log.warn("Error while parsing year!", e); | 211 log.warn("BHP: Error while parsing year!", e); |
212 } | 212 } |
213 } | 213 } |
214 | 214 |
215 return false; | 215 return false; |
216 } | 216 } |
233 Date toYear = getDateFromYear(upper); | 233 Date toYear = getDateFromYear(upper); |
234 | 234 |
235 obj.setTimeInterval(new ImportTimeInterval(fromYear, toYear)); | 235 obj.setTimeInterval(new ImportTimeInterval(fromYear, toYear)); |
236 } | 236 } |
237 catch (NumberFormatException e) { | 237 catch (NumberFormatException e) { |
238 log.warn("Error while parsing timeinterval!", e); | 238 log.warn("BHP: Error while parsing timeinterval!", e); |
239 } | 239 } |
240 | 240 |
241 return true; | 241 return true; |
242 } | 242 } |
243 | 243 |
254 try { | 254 try { |
255 obj.setSoundingWidth(Integer.valueOf(tmp)); | 255 obj.setSoundingWidth(Integer.valueOf(tmp)); |
256 return true; | 256 return true; |
257 } | 257 } |
258 catch (NumberFormatException e) { | 258 catch (NumberFormatException e) { |
259 log.warn("Error while parsing sounding width!", e); | 259 log.warn("BHP: Error while parsing sounding width!", e); |
260 } | 260 } |
261 } | 261 } |
262 | 262 |
263 return false; | 263 return false; |
264 } | 264 } |
312 obj.setRange(new ImportRange(lower, upper)); | 312 obj.setRange(new ImportRange(lower, upper)); |
313 | 313 |
314 return true; | 314 return true; |
315 } | 315 } |
316 catch (ParseException e) { | 316 catch (ParseException e) { |
317 log.warn("Error while parsing range!", e); | 317 log.warn("BHP: Error while parsing range!", e); |
318 } | 318 } |
319 } | 319 } |
320 | 320 |
321 return false; | 321 return false; |
322 } | 322 } |