Mercurial > mxd2map
annotate src/java/de/intevation/mxd/reader/GroupLayerReader.java @ 152:8a87c796bf47
Fixed expression for the first min value.
author | vc11884admin@VC11884.win.bsh.de |
---|---|
date | Thu, 30 Jun 2011 13:48:09 +0200 |
parents | 2bf35f0babd0 |
children | f4eb506499f5 |
rev | line source |
---|---|
148
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
1 package de.intevation.mxd.reader; |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
2 |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
3 import java.io.IOException; |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
4 |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
5 import org.apache.log4j.Logger; |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
6 |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
7 import com.esri.arcgis.carto.ILayer; |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
8 import com.esri.arcgis.carto.FeatureLayer; |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
9 import com.esri.arcgis.carto.GdbRasterCatalogLayer; |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
10 import com.esri.arcgis.carto.IFeatureRenderer; |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
11 import com.esri.arcgis.carto.SimpleRenderer; |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
12 import com.esri.arcgis.carto.ClassBreaksRenderer; |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
13 import com.esri.arcgis.carto.UniqueValueRenderer; |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
14 import com.esri.arcgis.carto.GroupLayer; |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
15 |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
16 import org.w3c.dom.Document; |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
17 import org.w3c.dom.Element; |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
18 |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
19 import de.intevation.mxd.ArcGISInitializer; |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
20 import de.intevation.mxd.utils.MapToXMLUtils; |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
21 |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
22 |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
23 /** |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
24 * Reads Layer information. |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
25 * |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
26 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a> |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
27 */ |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
28 public class GroupLayerReader |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
29 implements ILayerReader { |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
30 |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
31 /** |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
32 * The logger. |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
33 */ |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
34 private static final Logger logger = |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
35 Logger.getLogger(FeatureLayerReader.class); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
36 |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
37 /** |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
38 * Privte member. |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
39 */ |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
40 private GroupLayer layer; |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
41 private MapToXMLUtils util; |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
42 private int invalidLayerCount; |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
43 |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
44 public GroupLayerReader(ILayer layer) |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
45 throws Exception { |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
46 if(layer instanceof GroupLayer) { |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
47 this.layer = (GroupLayer)layer; |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
48 invalidLayerCount = 0; |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
49 } |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
50 else { |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
51 throw new Exception("Not an instance of GroupLayer: " + |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
52 layer.getClass().toString()); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
53 } |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
54 } |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
55 |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
56 /** |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
57 * Setter for XML document helper. |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
58 * |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
59 * @param util The helper for storing map information. |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
60 */ |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
61 public void setUtil(MapToXMLUtils util) { |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
62 this.util = util; |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
63 } |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
64 |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
65 /** |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
66 * Reads the Layer content. |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
67 * |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
68 * @return The layer XML element. |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
69 */ |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
70 public Element read() |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
71 throws IOException{ |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
72 logger.debug("read()"); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
73 Element layerElement = null; |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
74 for(int i = 0; i < layer.getCount();i++) { |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
75 ILayer lay = layer.getLayer(i); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
76 try { |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
77 if (lay instanceof FeatureLayer) { |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
78 FeatureLayerReader lr = new FeatureLayerReader(lay); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
79 lr.setUtil(util); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
80 layerElement = lr.read(); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
81 if (layerElement == null) { |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
82 continue; |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
83 } |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
84 layerElement.setAttribute("group", layer.getName()); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
85 IFeatureRenderer renderer = |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
86 ((FeatureLayer)lay).getRenderer(); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
87 IRendererReader rreader; |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
88 if(renderer instanceof SimpleRenderer) { |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
89 rreader = new SimpleRendererReader(renderer); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
90 rreader.setParent(layerElement); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
91 rreader.setUtil(util); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
92 rreader.read(); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
93 } |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
94 else if(renderer instanceof ClassBreaksRenderer) { |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
95 rreader = new ClassBreakRendererReader(renderer); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
96 rreader.setParent(layerElement); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
97 rreader.setUtil(util); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
98 rreader.read(); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
99 } |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
100 else if(renderer instanceof UniqueValueRenderer) { |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
101 rreader = new UniqueValueRendererReader(renderer); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
102 rreader.setParent(layerElement); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
103 rreader.setUtil(util); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
104 rreader.read(); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
105 } |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
106 else{ |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
107 logger.debug("Not a known renderer type " + |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
108 renderer.getClass().toString()); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
109 } |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
110 } |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
111 else if(lay instanceof GdbRasterCatalogLayer) { |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
112 GdbRasterCatalogLayerReader gclr = |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
113 new GdbRasterCatalogLayerReader(lay); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
114 gclr.setUtil(util); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
115 layerElement = gclr.read(); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
116 layerElement.setAttribute("group", layer.getName()); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
117 IFeatureRenderer renderer = |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
118 ((GdbRasterCatalogLayer)lay).getRenderer(); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
119 IRendererReader rreader; |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
120 if(renderer instanceof SimpleRenderer) { |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
121 rreader = new SimpleRendererReader(renderer); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
122 rreader.setParent(layerElement); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
123 rreader.setUtil(util); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
124 rreader.read(); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
125 } |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
126 else if(renderer instanceof ClassBreaksRenderer) { |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
127 rreader = new ClassBreakRendererReader(renderer); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
128 rreader.setParent(layerElement); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
129 rreader.setUtil(util); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
130 rreader.read(); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
131 } |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
132 else if(renderer instanceof UniqueValueRenderer) { |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
133 rreader = new UniqueValueRendererReader(renderer); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
134 rreader.setParent(layerElement); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
135 rreader.setUtil(util); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
136 rreader.read(); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
137 } |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
138 else { |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
139 logger.debug("Not a known renderer type " + |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
140 renderer.getClass().toString()); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
141 } |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
142 } |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
143 } |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
144 catch(Exception e) { |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
145 invalidLayerCount++; |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
146 if(i == 0 && (i + 1) == layer.getCount() || |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
147 invalidLayerCount == layer.getCount()) { |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
148 throw new IOException( |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
149 "No valid layer in MXD file." + |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
150 " Aborting."); |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
151 } |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
152 } |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
153 } |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
154 return layerElement; |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
155 } |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
156 } |
2bf35f0babd0
Implemented new group layer functionality.
vc11884admin@VC11884.win.bsh.de
parents:
diff
changeset
|
157 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |