Mercurial > dive4elements > river
comparison backend/src/main/java/org/dive4elements/river/importer/parsers/SedimentYieldParser.java @ 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 | 1e2dfd91274d |
children | 563f3793d334 |
comparison
equal
deleted
inserted
replaced
6722:078d56dffc8c | 6723:796750499cd2 |
---|---|
246 * with respect to file location (offical epoch or not?) */ | 246 * with respect to file location (offical epoch or not?) */ |
247 private void initializeSedimentYields() { | 247 private void initializeSedimentYields() { |
248 // skip first column (Fluss-km) and last column (Hinweise) | 248 // skip first column (Fluss-km) and last column (Hinweise) |
249 current = new ImportSedimentYield[columnNames.length-2]; | 249 current = new ImportSedimentYield[columnNames.length-2]; |
250 | 250 |
251 Integer kind; | |
252 | |
253 if (inputFile.getAbsolutePath().contains("amtliche Epochen")) { | |
254 log.warn("is amtlichbamtlich"); | |
255 kind = new Integer(1); | |
256 } | |
257 else { | |
258 log.warn("is unamtlichbamtlich"); | |
259 kind = new Integer(0); | |
260 } | |
261 | |
251 for (int i = 0, n = columnNames.length; i < n-2; i++) { | 262 for (int i = 0, n = columnNames.length; i < n-2; i++) { |
252 current[i] = new ImportSedimentYield(this.description); | 263 current[i] = new ImportSedimentYield(this.description); |
253 current[i].setTimeInterval(getTimeInterval(columnNames[i+1])); | 264 current[i].setTimeInterval(getTimeInterval(columnNames[i+1])); |
254 current[i].setUnit(unit); | 265 current[i].setUnit(unit); |
255 current[i].setGrainFraction(grainFraction); | 266 current[i].setGrainFraction(grainFraction); |
267 current[i].setKind(kind); | |
256 } | 268 } |
257 } | 269 } |
258 | 270 |
259 | 271 |
260 private ImportTimeInterval getTimeInterval(String column) { | 272 private ImportTimeInterval getTimeInterval(String column) { |