changeset 6386:a81fbbda28e7 double-precision

Flow velocity model parser: more and improved log output
author Tom Gottfried <tom.gottfried@intevation.de>
date Fri, 21 Jun 2013 14:34:06 +0200
parents 55a2f9e0d6ab
children b95504c34060
files backend/src/main/java/org/dive4elements/river/importer/parsers/FlowVelocityModelParser.java
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/FlowVelocityModelParser.java	Tue Jun 18 19:33:40 2013 +0200
+++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/FlowVelocityModelParser.java	Fri Jun 21 14:34:06 2013 +0200
@@ -115,18 +115,19 @@
 
         if (m.matches()) {
             String mainValueStr = m.group(1);
+	    log.debug("mainValueStr = '" + mainValueStr + "'");
             String gaugeStr     = m.group(2);
 
             Object[] valueData = handleMainValueString(mainValueStr);
             Object[] gaugeData = handleGaugeString(gaugeStr);
 
             if (valueData == null || valueData.length < 2) {
-                log.warn("skip invalid MainValue part: '" + line + "'");
+                log.warn("skip invalid MainValue part in '" + line + "'");
                 return;
             }
 
             if (gaugeData == null || gaugeData.length < 2) {
-                log.warn("skip invalid gauge part: '" + line + "'");
+                log.warn("skip invalid gauge part in '" + line + "'");
                 return;
             }
 
@@ -151,6 +152,7 @@
     protected Object[] handleMainValueString(String mainValueStr) {
         Matcher mA = META_MAINVALUE_A.matcher(mainValueStr);
         if (mA.matches()) {
+	    log.debug("mainValueStr matches META_MAINVALUE_A");
             String name = mA.group(0);
 
             return new Object[] { name, name };
@@ -158,6 +160,7 @@
 
         Matcher mB = META_MAINVALUE_B.matcher(mainValueStr);
         if (mB.matches()) {
+	    log.debug("mainValueStr matches META_MAINVALUE_B");
             String lower = mB.group(1);
             String upper = mB.group(4);
 
@@ -166,6 +169,7 @@
 
         Matcher mC = META_MAINVALUE_C.matcher(mainValueStr);
         if (mC.matches()) {
+	    log.debug("mainValueStr matches META_MAINVALUE_C");
             String facA  = mC.group(1);
             String nameA = mC.group(2);
             String facB  = mC.group(3);
@@ -181,6 +185,7 @@
 
         Matcher mD = META_MAINVALUE_D.matcher(mainValueStr);
         if (mD.matches()) {
+	    log.debug("mainValueStr matches META_MAINVALUE_D");
             String loFacA  = mD.group(2);
             String loNameA = mD.group(3);
             String loFacB  = mD.group(4);
@@ -205,12 +210,14 @@
 
         Matcher mE = META_MAINVALUE_E.matcher(mainValueStr);
         if (mE.matches()) {
+	    log.debug("mainValueStr matches META_MAINVALUE_E");
             String lower = mE.group(1);
             String upper = mE.group(4);
 
             return new Object[] { lower, upper };
         }
 
+	log.debug("mainValueStr not matched");
         return null;
     }
 

http://dive4elements.wald.intevation.org