changeset 239:8aefef8a1626

Remove special characters from layername and classname.
author raimund renkert <raimund.renkert@intevation.de>
date Mon, 08 Aug 2011 17:09:06 +0200
parents e672f5134d6e
children b54afdbc5892
files ChangeLog src/java/de/intevation/mxd/writer/MapScriptWriter.java
diffstat 2 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Aug 08 17:06:17 2011 +0200
+++ b/ChangeLog	Mon Aug 08 17:09:06 2011 +0200
@@ -1,3 +1,8 @@
+2011-08-08  Raimund Renkert  <raimund.renkert@intevation.de>
+
+	* src/java/de/intevation/mxd/writer/MapScriptWriter.java:
+	  Remove special characters from layername and classname.
+
 2011-08-08  Raimund Renkert  <raimund.renkert@intevation.de>
 
 	* src/java/de/intevation/mxd/writer/MapScriptWriter.java:
--- a/src/java/de/intevation/mxd/writer/MapScriptWriter.java	Mon Aug 08 17:06:17 2011 +0200
+++ b/src/java/de/intevation/mxd/writer/MapScriptWriter.java	Mon Aug 08 17:09:06 2011 +0200
@@ -611,6 +611,11 @@
         tmp = tmp.replace ("ä", "ae");
         tmp = tmp.replace ("ü", "ue");
         tmp = tmp.replace ("ß", "ss");
+	tmp = tmp.replace ("/", "");
+	tmp = tmp.replace (",", "");
+	if(!s.equals(tmp)) {
+	    logger.info("Renamed \"" + s + "\" to \"" + tmp + "\".");
+	}
         return tmp;
     }
 }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)