Mercurial > dive4elements > river
comparison 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 |
comparison
equal
deleted
inserted
replaced
3780:7fa38f8bcd8d | 3781:8e713e9bb4d7 |
---|---|
86 public boolean applyPattern(String text) { | 86 public boolean applyPattern(String text) { |
87 if (patternStr == null || patternStr.length() == 0) { | 87 if (patternStr == null || patternStr.length() == 0) { |
88 return true; | 88 return true; |
89 } | 89 } |
90 Matcher m = pattern.matcher(text); | 90 Matcher m = pattern.matcher(text); |
91 return m.matches(); | 91 |
92 if (m.matches()) { | |
93 logger.debug("Pattern matches: " + text); | |
94 return true; | |
95 } | |
96 else { | |
97 logger.debug( | |
98 "Pattern '"+ text + "' does not match: " + this.patternStr); | |
99 return false; | |
100 } | |
92 } | 101 } |
93 | 102 |
94 | 103 |
95 /** | 104 /** |
96 * Inspects Artifacts data given the masterAttr-condition. | 105 * Inspects Artifacts data given the masterAttr-condition. |
114 + masterAttr + "_"); | 123 + masterAttr + "_"); |
115 return false; | 124 return false; |
116 } | 125 } |
117 | 126 |
118 // Test. | 127 // Test. |
119 return artifact.getDataAsString(parts[0]).equals(parts[1]); | 128 if (artifact.getDataAsString(parts[0]).equals(parts[1])) { |
129 logger.debug("Matches master Attribute."); | |
130 return true; | |
131 } | |
132 else { | |
133 logger.debug("Does not match master Attribute."); | |
134 return false; | |
135 } | |
120 } | 136 } |
121 | 137 |
122 | 138 |
123 /** | 139 /** |
124 * Returns true if no output condition exists, or the condition is met | 140 * Returns true if no output condition exists, or the condition is met |
127 public boolean outputMatches(String output) { | 143 public boolean outputMatches(String output) { |
128 if (this.output == null || this.output.length() == 0) { | 144 if (this.output == null || this.output.length() == 0) { |
129 return true; | 145 return true; |
130 } | 146 } |
131 | 147 |
132 return this.output.equals(output); | 148 if (this.output.equals(output)) { |
149 logger.debug("Output matches this mapping: " + output); | |
150 return true; | |
151 } | |
152 else { | |
153 logger.debug("Output '"+ output +"' does not match: "+ this.output); | |
154 return false; | |
155 } | |
133 } | 156 } |
134 } | 157 } |
135 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 158 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |