changeset 4782:696285cef182

ImportRiver: Trigger basic (useless) da50 parsing.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 08 Jan 2013 12:29:04 +0100
parents e77b461fa360
children 5f10f1a7456b
files flys-backend/src/main/java/de/intevation/flys/importer/ImportRiver.java
diffstat 1 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-backend/src/main/java/de/intevation/flys/importer/ImportRiver.java	Tue Jan 08 12:26:29 2013 +0100
+++ b/flys-backend/src/main/java/de/intevation/flys/importer/ImportRiver.java	Tue Jan 08 12:29:04 2013 +0100
@@ -23,6 +23,7 @@
 import de.intevation.flys.importer.parsers.BedHeightEpochParser;
 import de.intevation.flys.importer.parsers.BedHeightSingleParser;
 import de.intevation.flys.importer.parsers.CrossSectionParser;
+import de.intevation.flys.importer.parsers.DA50Parser;
 import de.intevation.flys.importer.parsers.DA66Parser;
 import de.intevation.flys.importer.parsers.FlowVelocityMeasurementParser;
 import de.intevation.flys.importer.parsers.FlowVelocityModelParser;
@@ -967,12 +968,25 @@
         parser.parseW80s(riverDir, w80Callback);
     }
 
+
+    /**
+     * Create and use a DA50Parser, parse the files found, add the
+     * ross-sections found.
+     */
     public void parseDA50s() {
         if (Config.INSTANCE.skipDA50s()) {
             log.info("skip parsing DA50s");
             return;
         }
-        else log.warn("DA50 parsing not yet implemented");
+        DA50Parser parser = new DA50Parser();
+        File riverDir = wstFile
+            .getParentFile()  // Basisdaten
+            .getParentFile()  // Hydrologie
+            .getParentFile(); // <river>
+
+        ImportRiverCrossSectionParserCallback da50Callback =
+            new ImportRiverCrossSectionParserCallback("da50");
+        parser.parseDA50s(riverDir, da50Callback);
     }
 
 

http://dive4elements.wald.intevation.org