diff flys-backend/src/main/java/de/intevation/flys/importer/AtFileParser.java @ 492:14de9246b356

Importer: parse historical discharge tables, too. TODO: store them in database. flys-backend/trunk@1840 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 05 May 2011 15:25:16 +0000
parents 8ea09ec7f0c8
children b35c5dc0f8b7
line wrap: on
line diff
--- a/flys-backend/src/main/java/de/intevation/flys/importer/AtFileParser.java	Thu May 05 14:51:54 2011 +0000
+++ b/flys-backend/src/main/java/de/intevation/flys/importer/AtFileParser.java	Thu May 05 15:25:16 2011 +0000
@@ -39,9 +39,11 @@
     }
 
 
-    public ImportDischargeTable parse(ImportGauge gauge) throws IOException {
+    public ImportDischargeTable parse(File file) throws IOException {
+        return parse(file, 0);
+    }
 
-        File file = gauge.getAtFile();
+    public ImportDischargeTable parse(File file, int kind) throws IOException {
 
         logger.info("parsing AT file: " + file);
 
@@ -51,7 +53,7 @@
 
         boolean beginning = true;
 
-        ImportDischargeTable dischargeTable = new ImportDischargeTable();
+        ImportDischargeTable dischargeTable = new ImportDischargeTable(kind);
 
         Date from = null;
         Date to   = null;
@@ -135,6 +137,7 @@
         }
 
         if (from != null) {
+            logger.info("from: " + from + " to: " + to);
             ImportTimeInterval interval = new ImportTimeInterval(from, to);
             dischargeTable.setTimeInterval(interval);
         }

http://dive4elements.wald.intevation.org