comparison flys-backend/src/main/java/de/intevation/flys/importer/parsers/MorphologicalWidthParser.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 0a536eb5d668
children f63b39799d2d
comparison
equal deleted inserted replaced
3661:3ea5e835ecce 3662:0d27d02b1208
68 protected void handleMetaLine(String line) { 68 protected void handleMetaLine(String line) {
69 if (handleMetaUnit(line)) { 69 if (handleMetaUnit(line)) {
70 return; 70 return;
71 } 71 }
72 else { 72 else {
73 log.warn("Unknown meta line: '" + line + "'"); 73 log.warn("MWP: Unknown meta line: '" + line + "'");
74 } 74 }
75 } 75 }
76 76
77 77
78 protected boolean handleMetaUnit(String line) { 78 protected boolean handleMetaUnit(String line) {
92 92
93 protected void handleDataLine(String line) { 93 protected void handleDataLine(String line) {
94 String[] vals = line.split(SEPERATOR_CHAR); 94 String[] vals = line.split(SEPERATOR_CHAR);
95 95
96 if (vals == null || vals.length < 2) { 96 if (vals == null || vals.length < 2) {
97 log.warn("skip invalid data line: '" + line + "'"); 97 log.warn("MWP: skip invalid data line: '" + line + "'");
98 return; 98 return;
99 } 99 }
100 100
101 try { 101 try {
102 BigDecimal km = new BigDecimal(nf.parse(vals[0]).doubleValue()); 102 BigDecimal km = new BigDecimal(nf.parse(vals[0]).doubleValue());
109 width, 109 width,
110 desc 110 desc
111 )); 111 ));
112 } 112 }
113 catch (ParseException pe) { 113 catch (ParseException pe) {
114 log.warn("Error while parsing numbers in '" + line + "'"); 114 log.warn("MWP: Error while parsing numbers in '" + line + "'");
115 } 115 }
116 } 116 }
117 117
118 118
119 public List<ImportMorphWidth> getMorphologicalWidths() { 119 public List<ImportMorphWidth> getMorphologicalWidths() {

http://dive4elements.wald.intevation.org