Mercurial > dive4elements > river
diff flys-backend/src/main/java/de/intevation/flys/importer/parsers/WstParser.java @ 5542:f3b270e5462e
Wst Parser: Another attempt to fix the order of the Q ranges.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Wed, 03 Apr 2013 20:16:01 +0200 |
parents | b09c095a0b7e |
children | 732a8bd44650 |
line wrap: on
line diff
--- a/flys-backend/src/main/java/de/intevation/flys/importer/parsers/WstParser.java Wed Apr 03 17:59:11 2013 +0200 +++ b/flys-backend/src/main/java/de/intevation/flys/importer/parsers/WstParser.java Wed Apr 03 20:16:01 2013 +0200 @@ -316,11 +316,13 @@ } } - } + } // for all lines in WST file wst.setUnit(new ImportUnit(einheit)); addInterval(minKm, maxKm, aktAbfluesse); + + fixRangesOrder(); } finally { if (in != null) { @@ -329,6 +331,10 @@ } } + protected void fixRangesOrder() { + wst.fixRangesOrder(); + } + protected void addValue(BigDecimal km, BigDecimal w, int index) { if (w != null) { ImportWstColumn column = wst.getColumn(index); @@ -360,10 +366,6 @@ return; } - if (to.compareTo(from) < 0) { - BigDecimal t = from; from = to; to = t; - } - ImportRange range = new ImportRange(from, to); // little workaround to make the q ranges tightly fit.