changeset 100:bab3946a8bdc

Read the connection settings for file geodatabase.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 08 Jun 2011 11:28:36 +0200 (2011-06-08)
parents d6d2a4058ebf
children 461ee9193097
files ChangeLog src/java/de/intevation/mxd/reader/FeatureLayerReader.java
diffstat 2 files changed, 27 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Jun 07 14:59:00 2011 +0200
+++ b/ChangeLog	Wed Jun 08 11:28:36 2011 +0200
@@ -1,3 +1,8 @@
+2011-06-08  Raimund Renkert  <raimund.renkert@intevation.de>
+
+	* src/java/de/intevation/mxd/reader/FeatureLayerReader.java:
+	  Read the connection settings for file geodatabase.
+
 2011-06-07  Raimund Renkert  <raimund.renkert@intevation.de>
 
 	* src/java/de/intevation/mxd/writer/MapScriptWriter.java:
--- 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;
     }
 }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)