diff src/java/de/intevation/mxd/reader/MXDReader.java @ 301:2cb2d8eb56ed

Add WMS Support in the Reader classes and add new Reader classes for WMS Layers
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 05 Sep 2012 16:19:18 +0200
parents 276f63c86f1c
children a9684178cb29
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/reader/MXDReader.java	Wed Sep 05 16:15:03 2012 +0200
+++ b/src/java/de/intevation/mxd/reader/MXDReader.java	Wed Sep 05 16:19:18 2012 +0200
@@ -33,6 +33,9 @@
 import com.esri.arcgis.carto.ClassBreaksRenderer;
 import com.esri.arcgis.carto.UniqueValueRenderer;
 import com.esri.arcgis.carto.GroupLayer;
+import com.esri.arcgis.carto.WMSMapLayer;
+import com.esri.arcgis.carto.WMSGroupLayer;
+import com.esri.arcgis.carto.WMSLayer;
 
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -224,6 +227,30 @@
                             throw new IOException ("Error reading grouplayer.");
                         }
                     }
+                    else if(layer instanceof WMSMapLayer) {
+                        WMSMapLayerReader lr = new WMSMapLayerReader(layer);
+                        lr.setUtil(util);
+                        Element layerElement = lr.read("");
+                        if(layerElement == null) {
+                            throw new IOException ("Error reading WMSMapLayer.");
+                        }
+                    }
+                    else if(layer instanceof WMSGroupLayer) {
+                        WMSGroupLayerReader lr = new WMSGroupLayerReader(layer);
+                        lr.setUtil(util);
+                        Element layerElement = lr.read("");
+                        if(layerElement == null) {
+                            throw new IOException ("Error reading WMSGrouplayer.");
+                        }
+                    }
+                    else if(layer instanceof WMSLayer) {
+                        WMSLayerReader lr = new WMSLayerReader(layer);
+                        lr.setUtil(util);
+                        Element layerElement = lr.read();
+                        if(layerElement == null) {
+                            throw new IOException ("Error reading WMSlayer.");
+                        }
+                    }
                     else {
                         logger.info(
                             "Layertype not known: " +
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)