# HG changeset patch # User Felix Wolfsteller # Date 1363162773 -3600 # Node ID 1e403a0efc2107786659cb633509b9435a61810c # Parent 8f71fe38977ce2418d49db8c131e40eaa2e85f98 ImportRiver: Light cleaning up, waterlevelimport more parralel to other imports. diff -r 8f71fe38977c -r 1e403a0efc21 flys-backend/src/main/java/de/intevation/flys/importer/ImportRiver.java --- a/flys-backend/src/main/java/de/intevation/flys/importer/ImportRiver.java Tue Mar 12 19:43:11 2013 +0100 +++ b/flys-backend/src/main/java/de/intevation/flys/importer/ImportRiver.java Wed Mar 13 09:19:33 2013 +0100 @@ -130,6 +130,9 @@ protected List floodProtection; + /** Wst-structures from waterlevel-csv files. */ + protected List waterlevels; + /** Wst-structures from waterlevel-difference-csv files. */ protected List waterlevelDifferences; @@ -203,6 +206,7 @@ fixations = new ArrayList(); officialLines = new ArrayList(); floodWater = new ArrayList(); + waterlevels = new ArrayList(); waterlevelDifferences = new ArrayList(); floodProtection = new ArrayList(); sedimentDensities = new ArrayList(); @@ -564,7 +568,7 @@ for(ImportWst iw: parser.getWaterlevels()) { iw.setDescription("CSV/" + iw.getDescription()); iw.setKind(6); - fixations.add(iw); + waterlevels.add(iw); } } @@ -1083,6 +1087,7 @@ storeMorphologicalWidth(); storeFlowVelocity(); storeSedimentYield(); + storeWaterlevels(); storeWaterlevelDifferences(); storeMeasurementStations(); storeSQRelations(); @@ -1129,14 +1134,27 @@ if (!Config.INSTANCE.skipFixations() || !Config.INSTANCE.skipWaterlevels()) { log.info("store fixation wsts and/or csvs"); River river = getPeer(); - for (ImportWst fwst: fixations) { - log.debug("name: " + fwst.getDescription()); - fwst.storeDependencies(river); + for (ImportWst fWst: fixations) { + log.debug("Fixation name: " + fWst.getDescription()); + fWst.storeDependencies(river); } } } + /** Store wsts from waterlevel-csv files. */ + public void storeWaterlevels() { + if (!Config.INSTANCE.skipWaterlevels()) + + log.info("store waterlevel wsts from csv"); + River river = getPeer(); + for (ImportWst wWst: waterlevels) { + log.debug("Waterlevel name: " + wWst.getDescription()); + wWst.storeDependencies(river); + } + } + + /** Store wsts from waterleveldifference-csv files. */ public void storeWaterlevelDifferences() { if (!Config.INSTANCE.skipWaterlevelDifferences())