Mercurial > dive4elements > river
changeset 6723:796750499cd2
issue1393/SedimentYieldParser: set kind of SedimentYields
epending on import location.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 31 Jul 2013 11:12:53 +0200 |
parents | 078d56dffc8c |
children | 0baf7abffcc6 |
files | backend/src/main/java/org/dive4elements/river/importer/parsers/SedimentYieldParser.java |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/SedimentYieldParser.java Wed Jul 31 11:12:08 2013 +0200 +++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/SedimentYieldParser.java Wed Jul 31 11:12:53 2013 +0200 @@ -248,11 +248,23 @@ // skip first column (Fluss-km) and last column (Hinweise) current = new ImportSedimentYield[columnNames.length-2]; + Integer kind; + + if (inputFile.getAbsolutePath().contains("amtliche Epochen")) { + log.warn("is amtlichbamtlich"); + kind = new Integer(1); + } + else { + log.warn("is unamtlichbamtlich"); + kind = new Integer(0); + } + for (int i = 0, n = columnNames.length; i < n-2; i++) { current[i] = new ImportSedimentYield(this.description); current[i].setTimeInterval(getTimeInterval(columnNames[i+1])); current[i].setUnit(unit); current[i].setGrainFraction(grainFraction); + current[i].setKind(kind); } }