diff src/java/de/intevation/mxd/reader/UniqueValueRendererReader.java @ 134:acc9e5430177

Handle SDE connection attributes and expressions.
author vc11884admin@VC11884.win.bsh.de
date Wed, 22 Jun 2011 12:01:28 +0200
parents 6c3d880db7c5
children 1623c8c99135
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/reader/UniqueValueRendererReader.java	Tue Jun 21 15:22:06 2011 +0200
+++ b/src/java/de/intevation/mxd/reader/UniqueValueRendererReader.java	Wed Jun 22 12:01:28 2011 +0200
@@ -84,10 +84,28 @@
 
             try {
                 String value = renderer.getValue(i);
+                value = value.replaceAll(" ", "");
+                if(value.indexOf(",") > 0) {
+                    int j = 0;
+                    while(value.indexOf(",") > 0) {
+                        String v = value.substring(0, value.indexOf(","));
+                        rendererElement.setAttribute("value_" + j, v);
+                        value = value.substring(
+                            value.indexOf(",") + 1,
+                            value.length());
+                        j++;
+                    }
+                    rendererElement.setAttribute("value_" + j, value);
+                }
+                else {
+                    rendererElement.setAttribute("value", value);
+                }
+
+                value = renderer.getValue(i);
                 rendererElement.setAttribute("name", renderer.esri_getClass(i));
                 rendererElement.setAttribute("description",
-                renderer.getDescription(value));
-                rendererElement.setAttribute("value", value);
+                    renderer.getDescription(value));
+
                 rendererElement.setAttribute("label", renderer.getLabel(value));
                 rendererElement.setAttribute(
                     "field_count",
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)