comparison src/java/de/intevation/mxd/reader/FeatureLayerReader.java @ 100:bab3946a8bdc

Read the connection settings for file geodatabase.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 08 Jun 2011 11:28:36 +0200
parents 18e4f143896b
children 0db6eacad0e6
comparison
equal deleted inserted replaced
99:d6d2a4058ebf 100:bab3946a8bdc
87 IName fcn = layer.getDataSourceName(); 87 IName fcn = layer.getDataSourceName();
88 if(fcn instanceof FeatureClassName) { 88 if(fcn instanceof FeatureClassName) {
89 FeatureClassName name = (FeatureClassName)fcn; 89 FeatureClassName name = (FeatureClassName)fcn;
90 layerElement.setAttribute("data_source", name.getName()); 90 layerElement.setAttribute("data_source", name.getName());
91 } 91 }
92 else {
93 logger.debug ("Unknown FeatureClass name:" + fcn.getClass().toString());
94 }
92 95
93 layerElement.setAttribute( 96
94 "workspace", 97 String datatype = layer.getDataSourceType();
95 layer.getWorkspace().getPathName()); 98 if(datatype.equals("Shapefile Feature Class")) {
99 layerElement.setAttribute("connection_type", "local");
100 layerElement.setAttribute(
101 "workspace",
102 layer.getWorkspace().getPathName());
103 }
104 else if(datatype.equals("File Geodatabase Feature Class")){
105 layerElement.setAttribute("connection_type", "ogr");
106 layerElement.setAttribute("data", layer.getFeatureClass().getFeatureDataset().getName());
107 layerElement.setAttribute(
108 "workspace",
109 layer.getWorkspace().getPathName());
110
111 }
112 else if(datatype.equals("SDE Feature Class")) {
113 //TODO Read SDE data settings
114 }
96 return layerElement; 115 return layerElement;
97 } 116 }
98 } 117 }
99 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 118 // 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)