changeset 5108:cf50783542a1

BundesWasserStrassenParser: Accept ',' and ';' as separator.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 27 Feb 2013 10:33:13 +0100
parents a929d9a9fa1e
children ab2f1e0be311 4898376c680b
files flys-backend/src/main/java/de/intevation/flys/importer/parsers/BundesWasserStrassenParser.java
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-backend/src/main/java/de/intevation/flys/importer/parsers/BundesWasserStrassenParser.java	Tue Feb 26 12:35:59 2013 +0100
+++ b/flys-backend/src/main/java/de/intevation/flys/importer/parsers/BundesWasserStrassenParser.java	Wed Feb 27 10:33:13 2013 +0100
@@ -49,9 +49,13 @@
     @Override
     protected void handleLine(int lineNum, String line) {
         String[] vals = line.split(",");
+        // Try both "," and ";" as separator.
         if (vals.length != 2) {
-            logger.warn("Invalid bwastr-id line:\n" + line);
-            return;
+            vals = line.split(";");
+            if (vals.length != 2) {
+                logger.warn("Invalid bwastr-id line:\n" + line);
+                return;
+            }
         }
         try{
             String name = unwrap(vals[0].toLowerCase());

http://dive4elements.wald.intevation.org