comparison 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
comparison
equal deleted inserted replaced
112:82a220ac7033 113:0db6eacad0e6
4 4
5 import com.esri.arcgis.carto.ILayer; 5 import com.esri.arcgis.carto.ILayer;
6 import com.esri.arcgis.carto.FeatureLayer; 6 import com.esri.arcgis.carto.FeatureLayer;
7 import com.esri.arcgis.geodatabase.FeatureClassName; 7 import com.esri.arcgis.geodatabase.FeatureClassName;
8 import com.esri.arcgis.system.IName; 8 import com.esri.arcgis.system.IName;
9 9 import com.esri.arcgis.system.IPropertySet;
10 import org.w3c.dom.Element; 10 import org.w3c.dom.Element;
11 11
12 import de.intevation.mxd.utils.MapToXMLUtils; 12 import de.intevation.mxd.utils.MapToXMLUtils;
13 13
14 /** 14 /**
108 "workspace", 108 "workspace",
109 layer.getWorkspace().getPathName()); 109 layer.getWorkspace().getPathName());
110 110
111 } 111 }
112 else if(datatype.equals("SDE Feature Class")) { 112 else if(datatype.equals("SDE Feature Class")) {
113 //TODO Read SDE data settings 113 IPropertySet set = layer.getWorkspace().getConnectionProperties();
114 Object names[] = new Object[set.getCount()];
115 Object prop[] = new Object[set.getCount()];
116 set.getAllProperties(names, prop);
117 layerElement.setAttribute("connection_type", "SDE");
118 for(int i = 0; i < names.length; i++) {
119 if(names[i] != null) {
120 String[] prop_names = (String[])names[i];
121 for(int j = 0; j < prop_names.length; j++) {
122 layerElement.setAttribute(
123 prop_names[j].toLowerCase(),
124 set.getProperty(prop_names[j]).toString());
125 }
126 }
127 }
114 } 128 }
115 return layerElement; 129 return layerElement;
116 } 130 }
117 } 131 }
118 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 132 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)