diff flys-backend/src/main/java/de/intevation/flys/importer/ImportRiver.java @ 2827:85b25e74594f

Added temp classes used during the import process of flow velocity data. flys-backend/trunk@4244 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 17 Apr 2012 08:50:15 +0000
parents c3f8cf0cdf69
children ac13e466a55e
line wrap: on
line diff
--- a/flys-backend/src/main/java/de/intevation/flys/importer/ImportRiver.java	Tue Apr 17 06:51:39 2012 +0000
+++ b/flys-backend/src/main/java/de/intevation/flys/importer/ImportRiver.java	Tue Apr 17 08:50:15 2012 +0000
@@ -112,6 +112,8 @@
 
     protected List<ImportMorphWidth> morphologicalWidths;
 
+    protected List<ImportFlowVelocityModel> flowVelocityModels;
+
     protected ImportWst wst;
 
     protected ImportUnit wstUnit;
@@ -130,6 +132,7 @@
         floodProtection     = new ArrayList<ImportWst>();
         sedimentDensities   = new ArrayList<ImportSedimentDensity>();
         morphologicalWidths = new ArrayList<ImportMorphWidth>();
+        flowVelocityModels  = new ArrayList<ImportFlowVelocityModel>();
     }
 
     public ImportRiver(
@@ -944,7 +947,19 @@
         if (!Config.INSTANCE.skipFlowVelocity()) {
             log.info("store flow velocity");
 
-            // TODO
+            River river = getPeer();
+
+            for (ImportFlowVelocityModel flowVelocityModel: flowVelocityModels){
+                try {
+                    flowVelocityModel.storeDependencies(river);
+                }
+                catch (SQLException sqle) {
+                    log.error("Error while storing flow velocity model.", sqle);
+                }
+                catch (ConstraintViolationException cve) {
+                    log.error("Error while storing flow velocity model.", cve);
+                }
+            }
         }
     }
 

http://dive4elements.wald.intevation.org