diff src/java/de/intevation/mxd/reader/GroupLayerReader.java @ 244:276f63c86f1c

Refactored group layer handling and "wms_title" metadata.
author raimund renkert <raimund.renkert@intevation.de>
date Tue, 09 Aug 2011 17:27:18 +0200
parents df4e0946ef02
children 2cb2f26d0d54
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/reader/GroupLayerReader.java	Tue Aug 09 14:24:51 2011 +0200
+++ b/src/java/de/intevation/mxd/reader/GroupLayerReader.java	Tue Aug 09 17:27:18 2011 +0200
@@ -44,8 +44,7 @@
  *
  * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a>
  */
-public class GroupLayerReader
-implements ILayerReader {
+public class GroupLayerReader {
 
     /**
      * The logger.
@@ -91,7 +90,7 @@
      *
      * @return The layer XML element.
      */
-    public Element read()
+    public Element read(String group)
     throws IOException{
         logger.debug("read()");
         Element layerElement = null;
@@ -105,7 +104,7 @@
                     if (layerElement == null) {
                         continue;
                     }
-                    layerElement.setAttribute("group", layer.getName());
+                    layerElement.setAttribute("group", group + "/" + layer.getName());
                     IFeatureRenderer renderer =
                         ((FeatureLayer)lay).getRenderer();
                     IRendererReader rreader;
@@ -164,6 +163,11 @@
                                      renderer.getClass().toString());
                     }
                 }
+                else if(lay instanceof GroupLayer) {
+                    GroupLayerReader glr = new GroupLayerReader (lay);
+                    glr.setUtil(this.util);
+                    layerElement = glr.read("/" + layer.getName());
+                }
             }
             catch(Exception e) {
                 invalidLayerCount++;
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)