Mercurial > mxd2map
diff 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 |
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/reader/FeatureLayerReader.java Tue Jun 07 14:59:00 2011 +0200 +++ b/src/java/de/intevation/mxd/reader/FeatureLayerReader.java Wed Jun 08 11:28:36 2011 +0200 @@ -89,10 +89,29 @@ FeatureClassName name = (FeatureClassName)fcn; layerElement.setAttribute("data_source", name.getName()); } + else { + logger.debug ("Unknown FeatureClass name:" + fcn.getClass().toString()); + } - layerElement.setAttribute( - "workspace", - layer.getWorkspace().getPathName()); + + String datatype = layer.getDataSourceType(); + if(datatype.equals("Shapefile Feature Class")) { + layerElement.setAttribute("connection_type", "local"); + layerElement.setAttribute( + "workspace", + layer.getWorkspace().getPathName()); + } + else if(datatype.equals("File Geodatabase Feature Class")){ + layerElement.setAttribute("connection_type", "ogr"); + layerElement.setAttribute("data", layer.getFeatureClass().getFeatureDataset().getName()); + layerElement.setAttribute( + "workspace", + layer.getWorkspace().getPathName()); + + } + else if(datatype.equals("SDE Feature Class")) { + //TODO Read SDE data settings + } return layerElement; } }