Mercurial > dive4elements > river
comparison backend/src/main/java/org/dive4elements/river/importer/ImportRiver.java @ 7343:d93bb557a94f double-precision
Do not log trace of WST-Parser parse exception and document it.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Tue, 15 Oct 2013 19:49:25 +0200 |
parents | 2ce7bacc940f |
children | e1b831fe435a |
comparison
equal
deleted
inserted
replaced
7342:c9b9176b0530 | 7343:d93bb557a94f |
---|---|
363 iw.setKind(5); | 363 iw.setKind(5); |
364 iw.setDescription(FLOOD_PROTECTION + "/" + iw.getDescription()); | 364 iw.setDescription(FLOOD_PROTECTION + "/" + iw.getDescription()); |
365 floodProtection.add(iw); | 365 floodProtection.add(iw); |
366 } | 366 } |
367 catch (WstParser.ParseException e) { | 367 catch (WstParser.ParseException e) { |
368 log.error(e); | 368 log.error(e.getMessage()); |
369 } | 369 } |
370 } | 370 } |
371 } | 371 } |
372 | 372 |
373 public void storeOfficialNumber() { | 373 public void storeOfficialNumber() { |
780 iw.setKind(4); | 780 iw.setKind(4); |
781 iw.setDescription(FLOOD_WATER + "/" + iw.getDescription()); | 781 iw.setDescription(FLOOD_WATER + "/" + iw.getDescription()); |
782 floodWater.add(iw); | 782 floodWater.add(iw); |
783 } | 783 } |
784 catch (WstParser.ParseException e) { | 784 catch (WstParser.ParseException e) { |
785 log.error(e); | 785 log.error(e.getMessage()); |
786 } | 786 } |
787 } | 787 } |
788 } | 788 } |
789 | 789 |
790 public void parseOfficialLines() throws IOException { | 790 public void parseOfficialLines() throws IOException { |
817 WstParser wstParser = new WstParser(iw); | 817 WstParser wstParser = new WstParser(iw); |
818 try { | 818 try { |
819 wstParser.parse(file); | 819 wstParser.parse(file); |
820 } | 820 } |
821 catch (WstParser.ParseException e) { | 821 catch (WstParser.ParseException e) { |
822 log.error(e); | 822 log.error(e.getMessage()); |
823 continue; | 823 continue; |
824 } | 824 } |
825 | 825 |
826 iw.setKind(3); | 826 iw.setKind(3); |
827 iw.setDescription(folder + "/" + iw.getDescription()); | 827 iw.setDescription(folder + "/" + iw.getDescription()); |
902 iw.setKind(2); | 902 iw.setKind(2); |
903 iw.setDescription(FIXATIONS+ "/" + iw.getDescription()); | 903 iw.setDescription(FIXATIONS+ "/" + iw.getDescription()); |
904 fixations.add(iw); | 904 fixations.add(iw); |
905 } | 905 } |
906 catch (WstParser.ParseException e) { | 906 catch (WstParser.ParseException e) { |
907 log.error(e); | 907 log.error(e.getMessage()); |
908 } | 908 } |
909 } | 909 } |
910 } | 910 } |
911 | 911 |
912 public void parseExtraWsts() throws IOException { | 912 public void parseExtraWsts() throws IOException { |
951 iw.setKind(1); | 951 iw.setKind(1); |
952 iw.setDescription(EXTRA_LONGITUDINALS + "/" + iw.getDescription()); | 952 iw.setDescription(EXTRA_LONGITUDINALS + "/" + iw.getDescription()); |
953 extraWsts.add(iw); | 953 extraWsts.add(iw); |
954 } | 954 } |
955 catch (WstParser.ParseException e) { | 955 catch (WstParser.ParseException e) { |
956 log.error(e); | 956 log.error(e.getMessage()); |
957 } | 957 } |
958 } | 958 } |
959 | 959 |
960 } | 960 } |
961 | 961 |
970 wstParser.parse(wstFile); | 970 wstParser.parse(wstFile); |
971 wst = wstParser.getWst(); | 971 wst = wstParser.getWst(); |
972 wst.setKmUp(wst.guessWaterLevelIncreasing()); | 972 wst.setKmUp(wst.guessWaterLevelIncreasing()); |
973 } | 973 } |
974 catch (WstParser.ParseException e) { | 974 catch (WstParser.ParseException e) { |
975 log.error(e); | 975 log.error(e.getMessage()); |
976 } | 976 } |
977 } | 977 } |
978 | 978 |
979 public void parseGauges() throws IOException { | 979 public void parseGauges() throws IOException { |
980 if (Config.INSTANCE.skipGauges()) { | 980 if (Config.INSTANCE.skipGauges()) { |