comparison flys-backend/src/main/java/de/intevation/flys/importer/PegelGltParser.java @ 185:a60edcfe5f53

Added new helper models for import. flys-backend/trunk@1503 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 17 Mar 2011 16:12:39 +0000
parents 4ab2c3bd474c
children cf8cbcb6a10d
comparison
equal deleted inserted replaced
184:4ab2c3bd474c 185:a60edcfe5f53
72 } 72 }
73 73
74 double from = Double.parseDouble(parts[0].replace(",", ".")); 74 double from = Double.parseDouble(parts[0].replace(",", "."));
75 double to = Double.parseDouble(parts[1].replace(",", ".")); 75 double to = Double.parseDouble(parts[1].replace(",", "."));
76 if (to < from) { double t = from; from = to; to = t; } 76 if (to < from) { double t = from; from = to; to = t; }
77 ImportRange range = new ImportRange(from, to);
77 File staFile = FileTools.repair(new File(parent, parts[2])); 78 File staFile = FileTools.repair(new File(parent, parts[2]));
78 File atFile = FileTools.repair(new File(parent, parts[3])); 79 File atFile = FileTools.repair(new File(parent, parts[3]));
79 80
80 if (log.isDebugEnabled()) { 81 if (log.isDebugEnabled()) {
81 log.debug("\tfrom: " + from); 82 log.debug("\tfrom: " + from);
82 log.debug("\tto: " + to); 83 log.debug("\tto: " + to);
83 log.debug("\tsta: " + staFile); 84 log.debug("\tsta: " + staFile);
84 log.debug("\tat: " + atFile); 85 log.debug("\tat: " + atFile);
85 } 86 }
86 87
87 gauges.add(new ImportGauge(from, to, staFile, atFile)); 88 gauges.add(new ImportGauge(range, staFile, atFile));
88 } 89 }
89 } 90 }
90 finally { 91 finally {
91 if (in != null) { 92 if (in != null) {
92 in.close(); 93 in.close();

http://dive4elements.wald.intevation.org