Mercurial > mxd2map
diff src/java/de/intevation/mxd/reader/FeatureLayerReader.java @ 113:0db6eacad0e6
Read SDE connection settings.
author | vc11884admin@VC11884.win.bsh.de |
---|---|
date | Tue, 14 Jun 2011 17:19:49 +0200 |
parents | bab3946a8bdc |
children | 6c3d880db7c5 |
line wrap: on
line diff
--- 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; }