changeset 113:0db6eacad0e6

Read SDE connection settings.
author vc11884admin@VC11884.win.bsh.de
date Tue, 14 Jun 2011 17:19:49 +0200
parents 82a220ac7033
children 93699e8f2d1f
files ChangeLog src/java/de/intevation/mxd/reader/FeatureLayerReader.java
diffstat 2 files changed, 21 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Jun 14 12:46:35 2011 +0200
+++ b/ChangeLog	Tue Jun 14 17:19:49 2011 +0200
@@ -1,3 +1,8 @@
+2011-06-14  Raimund Renkert  <raimund.renkert@intevation.de>
+
+	* src/java/de/intevation/mxd/FeatureLayerReader.java:
+	  Read SDE connection settings.
+
 2011-06-14  Raimund Renkert  <raimund.renkert@intevation.de>
 
 	* src/java/de/intevation/mxd/ArcGISInitializer.java:
--- a/src/java/de/intevation/mxd/reader/FeatureLayerReader.java	Tue Jun 14 12:46:35 2011 +0200
+++ b/src/java/de/intevation/mxd/reader/FeatureLayerReader.java	Tue Jun 14 17:19:49 2011 +0200
@@ -6,7 +6,7 @@
 import com.esri.arcgis.carto.FeatureLayer;
 import com.esri.arcgis.geodatabase.FeatureClassName;
 import com.esri.arcgis.system.IName;
-
+import com.esri.arcgis.system.IPropertySet;
 import org.w3c.dom.Element;
 
 import de.intevation.mxd.utils.MapToXMLUtils;
@@ -110,7 +110,21 @@
 
         }
         else if(datatype.equals("SDE Feature Class")) {
-            //TODO Read SDE data settings
+            IPropertySet set = layer.getWorkspace().getConnectionProperties();
+            Object names[] = new Object[set.getCount()];
+            Object prop[] = new Object[set.getCount()];
+            set.getAllProperties(names, prop);
+            layerElement.setAttribute("connection_type", "SDE");
+            for(int i = 0; i < names.length; i++) {
+                if(names[i] != null) {
+                    String[] prop_names = (String[])names[i];
+                    for(int j = 0; j < prop_names.length; j++) {
+                        layerElement.setAttribute(
+                            prop_names[j].toLowerCase(),
+                            set.getProperty(prop_names[j]).toString());
+                    }
+                }
+            }
         }
         return layerElement;
     }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)