Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/importer/parsers/DA66Parser.java @ 4791:fc571444da50
DA66Parser: Added doc, removed TODO, whitespace cosmetics.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 09 Jan 2013 09:19:15 +0100 |
parents | 0b60b77d4d00 |
children | 8b609ea08128 |
comparison
equal
deleted
inserted
replaced
4790:cd9540bd8040 | 4791:fc571444da50 |
---|---|
199 public Map<Double, List<XY>> getData() { | 199 public Map<Double, List<XY>> getData() { |
200 return data; | 200 return data; |
201 } | 201 } |
202 | 202 |
203 | 203 |
204 /** | |
205 * Walk a directory tree, parse its *.da66 files and store the | |
206 * data found. | |
207 */ | |
204 public void parseDA66s(File root, final Callback callback) { | 208 public void parseDA66s(File root, final Callback callback) { |
205 | 209 |
206 // TODO use the removeExtension/guess description and date. | |
207 FileTools.walkTree(root, new FileTools.FileVisitor() { | 210 FileTools.walkTree(root, new FileTools.FileVisitor() { |
208 @Override | 211 @Override |
209 public boolean visit(File file) { | 212 public boolean visit(File file) { |
210 if (file.isFile() && file.canRead() | 213 if (file.isFile() && file.canRead() |
211 && file.getName().toLowerCase().endsWith(".d66") | 214 && file.getName().toLowerCase().endsWith(".d66") |
249 } | 252 } |
250 else { | 253 else { |
251 return station; | 254 return station; |
252 } | 255 } |
253 } | 256 } |
257 | |
254 | 258 |
255 /** Apply the convention how to deal with numbers < -99.999 .*/ | 259 /** Apply the convention how to deal with numbers < -99.999 .*/ |
256 private String applyLetterConvention(String orig) { | 260 private String applyLetterConvention(String orig) { |
257 if (orig.endsWith("-")) { | 261 if (orig.endsWith("-")) { |
258 return "-" + orig.replace("-",""); | 262 return "-" + orig.replace("-",""); |