Mercurial > dive4elements > river
comparison backend/src/main/java/org/dive4elements/river/importer/parsers/WstParser.java @ 7003:3d83a4cf33ba double-precision
Range import: enforce a<b not only for WSTs and set only a for zero-length ranges.
author | Tom Gottfried <tom.gottfried@intevation.de> |
---|---|
date | Thu, 12 Sep 2013 18:58:19 +0200 |
parents | 0850a4983fcd |
children | c5214e04b9b8 |
comparison
equal
deleted
inserted
replaced
7002:0850a4983fcd | 7003:3d83a4cf33ba |
---|---|
383 if (kmHist1 != null && kmHist2 != null | 383 if (kmHist1 != null && kmHist2 != null |
384 && kmHist1.compareTo(kmHist2) < 0) { | 384 && kmHist1.compareTo(kmHist2) < 0) { |
385 BigDecimal t = minKm; minKm = maxKm; maxKm = t; | 385 BigDecimal t = minKm; minKm = maxKm; maxKm = t; |
386 } | 386 } |
387 addInterval(minKm, maxKm, aktAbfluesse); | 387 addInterval(minKm, maxKm, aktAbfluesse); |
388 | |
389 fixRangesOrder(); | |
390 } | 388 } |
391 finally { | 389 finally { |
392 in.close(); | 390 in.close(); |
393 } | 391 } |
394 } | |
395 | |
396 protected void fixRangesOrder() { | |
397 wst.fixRangesOrder(); | |
398 } | 392 } |
399 | 393 |
400 protected void addValue(BigDecimal km, BigDecimal w, int index) { | 394 protected void addValue(BigDecimal km, BigDecimal w, int index) { |
401 if (w != null) { | 395 if (w != null) { |
402 ImportWstColumn column = wst.getColumn(index); | 396 ImportWstColumn column = wst.getColumn(index); |