diff backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightParser.java @ 8560:6fcf4717605f

Meta-data on sounding width associated to bed heights is redundant to real data associated to values.
author "Tom Gottfried <tom@intevation.de>"
date Mon, 16 Feb 2015 11:48:05 +0100
parents 6d8d7425a6b5
children 2b3c8ea6cbee
line wrap: on
line diff
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightParser.java	Mon Feb 16 11:08:33 2015 +0100
+++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightParser.java	Mon Feb 16 11:48:05 2015 +0100
@@ -74,9 +74,6 @@
     public static final Pattern META_OLD_ELEVATION_SYSTEM =
         Pattern.compile("^urspr.ngliches H.hensystem:\\s(\\w++) (.* )??\\[(.*)\\].*");
 
-    public static final Pattern META_SOUNDING_WIDTH =
-        Pattern.compile("^ausgewertete Peilbreite: (\\d*).*");
-
     public static final Pattern META_RANGE =
         Pattern.compile("^Strecke:\\D*(\\d++.?\\d*) ?- ?(\\d++.?\\d*).*");
 
@@ -171,9 +168,6 @@
         else if (handleMetaTimeInterval(obj, meta)) {
             return;
         }
-        else if (handleMetaSoundingWidth(obj, meta)) {
-            return;
-        }
         else if (handleMetaComment(obj, meta)) {
             return;
         }
@@ -248,28 +242,6 @@
     }
 
 
-    protected boolean handleMetaSoundingWidth(ImportBedHeight obj, String line) {
-        Matcher m = META_SOUNDING_WIDTH.matcher(line);
-
-        if (m.matches()) {
-            String tmp = m.group(1);
-
-            try {
-                obj.setSoundingWidth(Integer.valueOf(tmp));
-                return true;
-            }
-            catch (NumberFormatException e) {
-                log.warn("BHP: Could not parse sounding width in line '" + line +
-                    "'. -> Set default value '0'");
-            }
-            obj.setSoundingWidth(0);
-            return true;
-        }
-
-        return false;
-    }
-
-
     protected boolean handleMetaComment(ImportBedHeight obj, String line) {
         Matcher m = META_COMMENTS.matcher(line);
 

http://dive4elements.wald.intevation.org