diff flys-artifacts/src/main/java/de/intevation/flys/themes/ThemeMapping.java @ 3781:8e713e9bb4d7

Defined colors for bed quality themes. flys-artifacts/trunk@5488 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 17 Sep 2012 09:40:00 +0000
parents e74e707ff650
children a5f65e8983be
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/themes/ThemeMapping.java	Mon Sep 17 09:16:20 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/themes/ThemeMapping.java	Mon Sep 17 09:40:00 2012 +0000
@@ -88,7 +88,16 @@
             return true;
         }
         Matcher m = pattern.matcher(text);
-        return m.matches();
+        
+       if (m.matches()) {
+           logger.debug("Pattern matches: " + text);
+           return true;
+       }
+       else {
+           logger.debug(
+               "Pattern '"+ text + "' does not match: " + this.patternStr);
+           return false;
+       }
     }
 
 
@@ -116,7 +125,14 @@
         }
 
         // Test.
-        return artifact.getDataAsString(parts[0]).equals(parts[1]);
+        if (artifact.getDataAsString(parts[0]).equals(parts[1])) {
+            logger.debug("Matches master Attribute.");
+            return true;
+        }
+        else {
+            logger.debug("Does not match master Attribute.");
+            return false;
+        }
     }
 
 
@@ -129,7 +145,14 @@
             return true;
         }
 
-        return this.output.equals(output);
+        if (this.output.equals(output)) {
+            logger.debug("Output matches this mapping: " + output);
+            return true;
+        }
+        else {
+            logger.debug("Output '"+ output +"' does not match: "+ this.output);
+            return false;
+        }
     }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org