comparison src/java/de/intevation/mxd/writer/MapScriptWriter.java @ 99:d6d2a4058ebf

Set the class name to the layer name if it is empty.
author Raimund Renkert <rrenkert@intevation.de>
date Tue, 07 Jun 2011 14:59:00 +0200
parents 4696d0769f9c
children 3ca2ec55fb3b
comparison
equal deleted inserted replaced
98:4696d0769f9c 99:d6d2a4058ebf
207 //Create all found class objects and write the symbols and styles for 207 //Create all found class objects and write the symbols and styles for
208 //each class. 208 //each class.
209 for(int i = 0; i < list.getLength(); i++) { 209 for(int i = 0; i < list.getLength(); i++) {
210 Element classElement = (Element)list.item(i); 210 Element classElement = (Element)list.item(i);
211 classObj co = new classObj(layer); 211 classObj co = new classObj(layer);
212 co.setName(classElement.getAttribute("name")); 212 String name = classElement.getAttribute("name");
213 if (name.equals("")) {
214 name = layerElement.getAttribute("name");
215 if (list.getLength() > 1) {
216 name += "-" + i;
217 }
218 }
219 co.setName (name);
213 if(classElement.hasAttribute("field_count")) { 220 if(classElement.hasAttribute("field_count")) {
214 int count = 221 int count =
215 Integer.parseInt(classElement.getAttribute("field_count")); 222 Integer.parseInt(classElement.getAttribute("field_count"));
216 String exp = ""; 223 String exp = "";
217 for(int j = 0; j < count; j++) { 224 for(int j = 0; j < count; j++) {
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)