[Schmitzm-commits] r2383 - in trunk/schmitzm-adresses/src: main/java/de/schmitzm/adresses test/java/de/schmitzm/adresses
scm-commit at wald.intevation.org
scm-commit at wald.intevation.org
Tue Aug 6 21:53:45 CEST 2013
Author: alfonx
Date: 2013-08-06 21:53:45 +0200 (Tue, 06 Aug 2013)
New Revision: 2383
Modified:
trunk/schmitzm-adresses/src/main/java/de/schmitzm/adresses/AddrStringUtil.java
trunk/schmitzm-adresses/src/test/java/de/schmitzm/adresses/AddrStringUtilTest.java
Log:
Modified: trunk/schmitzm-adresses/src/main/java/de/schmitzm/adresses/AddrStringUtil.java
===================================================================
--- trunk/schmitzm-adresses/src/main/java/de/schmitzm/adresses/AddrStringUtil.java 2013-08-03 12:17:24 UTC (rev 2382)
+++ trunk/schmitzm-adresses/src/main/java/de/schmitzm/adresses/AddrStringUtil.java 2013-08-06 19:53:45 UTC (rev 2383)
@@ -602,6 +602,9 @@
strasse = rC.replaceAll(strasse, "\\bgeschw[\\.\\s-]", "geschwister");
strasse = rC.replaceAll(strasse, "\\bgebr[\\.\\s-]", "gebrueder");
+ strasse = rC.replaceAll(strasse, "^gr\\.", "grosse");// TODO INS SQL!
+ strasse = rC.replaceAll(strasse, "^kl\\.", "kleine");// TODO INS SQL!
+
strasse = norm(strasse);
return strasse;
@@ -693,7 +696,7 @@
txt = txt.replaceAll("(ä|ã€)", "ae");
txt = txt.replaceAll("(ü|ã¼|ãœ)", "ue");
-
+
txt = txt.replaceAll("ö", "oe");
txt = txt.replaceAll("ß", "ss");
txt = txt.replaceAll("[éè]", "e");
Modified: trunk/schmitzm-adresses/src/test/java/de/schmitzm/adresses/AddrStringUtilTest.java
===================================================================
--- trunk/schmitzm-adresses/src/test/java/de/schmitzm/adresses/AddrStringUtilTest.java 2013-08-03 12:17:24 UTC (rev 2382)
+++ trunk/schmitzm-adresses/src/test/java/de/schmitzm/adresses/AddrStringUtilTest.java 2013-08-06 19:53:45 UTC (rev 2383)
@@ -370,6 +370,9 @@
@Test
public void testNormalizeStrasse() {
+ // TODO auch ins SQL übertragen!!!
+ assertEquals("grosseoelbruchstrasse", AddrStringUtil.normalizeStr("Gr. Ölbruchstr."));
+
// TODO alle Umlaute auch hier!
// TODO aus ins SQL übertragen?!
assertEquals("kreuzaeckerstrasse", AddrStringUtil.normalizeStr("KreuzÀckerstrasse"));
More information about the Schmitzm-commits
mailing list