aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/knowcenter/wag/egov/egiz/tools/Normalizer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/knowcenter/wag/egov/egiz/tools/Normalizer.java')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/tools/Normalizer.java34
1 files changed, 18 insertions, 16 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/tools/Normalizer.java b/src/main/java/at/knowcenter/wag/egov/egiz/tools/Normalizer.java
index 3dafb31..d5550f8 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/tools/Normalizer.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/tools/Normalizer.java
@@ -42,6 +42,7 @@ import at.knowcenter.wag.egov.egiz.exceptions.SettingsException;
* @see at.knowcenter.wag.egov.egiz.cfg.SettingsReader
*/
public class Normalizer implements Serializable {
+// 04.11.2010 changed by exthex - normalize methods use and propagate the keepMultipleNewlines parameter
/**
* SVUID.
@@ -187,18 +188,18 @@ public class Normalizer implements Serializable {
rawString_ = rawString;
}
- /**
- * Return the normalized string. If the chached value does not exist the normalize method from the
- * current normalizer implementation is called.
- *
- * @return the normalized string
- */
- public String getNormalizedString() {
- if (normString_ == null) {
- normalize();
- }
- return normString_;
- }
+// /**
+// * Return the normalized string. If the chached value does not exist the normalize method from the
+// * current normalizer implementation is called.
+// *
+// * @return the normalized string
+// */
+// public String getNormalizedString() {
+// if (normString_ == null) {
+// normalize();
+// }
+// return normString_;
+// }
/**
* Set a normalizer version. This activity load the new requested normalizer implementation.
@@ -224,11 +225,12 @@ public class Normalizer implements Serializable {
* Wrapper method. Call the normalizer implementation method.
*
* @param rawString the raw string to normalize
+ * @param keepMultipleNewlines
* @return the normalized string
* @see NormalizeV01
*/
- public String normalize(String rawString) {
- return normalize_.normalize(rawString);
+ public String normalize(String rawString, boolean keepMultipleNewlines) {
+ return normalize_.normalize(rawString, keepMultipleNewlines);
}
/**
@@ -237,9 +239,9 @@ public class Normalizer implements Serializable {
* @return the normalized string
* @see NormalizeV01
*/
- public String normalize() {
+ public String normalize(boolean keepMultipleNewlines) {
if (normString_ == null) {
- normString_ = normalize(rawString_);
+ normString_ = normalize(rawString_, keepMultipleNewlines);
}
return normString_;
}