[PATCH] Importer: depths are always numbers assumed to represent centimeters

Wald Commits scm-commit at wald.intevation.org
Fri May 16 17:51:58 CEST 2014


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1400255515 -7200
# Node ID 952b57b43e2fab1af900cc4019366df1378f47f9
# Parent  2e30d2c725fab274002fd76a6b42f93fff89db3d
Importer: depths are always numbers assumed to represent centimeters.

diff -r 2e30d2c725fa -r 952b57b43e2f backend/src/main/java/org/dive4elements/river/importer/parsers/PorosityParser.java
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/PorosityParser.java	Fri May 16 17:12:36 2014 +0200
+++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/PorosityParser.java	Fri May 16 17:51:55 2014 +0200
@@ -38,7 +38,7 @@
         NumberFormat.getInstance(DEFAULT_LOCALE);
 
     public static final Pattern META_DEPTH =
-        Pattern.compile("^Tiefe: (\\w++)-(\\w++)( (\\w++))?.*");
+        Pattern.compile("^Tiefe: (\\d++)-(\\d++).*");
 
     public static final Pattern META_TIMEINTERVAL =
         Pattern.compile("^Zeitraum: (\\d{4})-(\\d{4}).*");
diff -r 2e30d2c725fa -r 952b57b43e2f backend/src/main/java/org/dive4elements/river/importer/parsers/SedimentDensityParser.java
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/SedimentDensityParser.java	Fri May 16 17:12:36 2014 +0200
+++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/SedimentDensityParser.java	Fri May 16 17:51:55 2014 +0200
@@ -37,7 +37,7 @@
         NumberFormat.getInstance(DEFAULT_LOCALE);
 
     public static final Pattern META_DEPTH =
-        Pattern.compile("^Tiefe: (\\w++)-(\\w++)( (\\w++))?.*");
+        Pattern.compile("^Tiefe: (\\d++)-(\\d++).*");
 
     public static final Pattern META_YEAR =
         Pattern.compile("^Jahr: (\\d{4}).*");


More information about the Dive4Elements-commits mailing list