diff src/java/de/intevation/mxd/reader/MultiLayerMarkerSymbolReader.java @ 70:6d181c02efce

Added wrapper for marker symbol reader and extracted methods from symbol readers.
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 26 May 2011 14:28:52 +0200
parents 5c5ef5768893
children 7eba97e8201b
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/reader/MultiLayerMarkerSymbolReader.java	Thu May 26 12:44:59 2011 +0200
+++ b/src/java/de/intevation/mxd/reader/MultiLayerMarkerSymbolReader.java	Thu May 26 14:28:52 2011 +0200
@@ -2,19 +2,11 @@
 
 import java.io.IOException;
 
-import java.awt.Color;
-
 import org.apache.log4j.Logger;
 
 import com.esri.arcgis.display.ISymbol;
 import com.esri.arcgis.display.IMarkerSymbol;
 import com.esri.arcgis.display.MultiLayerMarkerSymbol;
-import com.esri.arcgis.display.ArrowMarkerSymbol;
-import com.esri.arcgis.display.CharacterMarkerSymbol;
-import com.esri.arcgis.display.PictureMarkerSymbol;
-
-import com.esri.arcgis.display.IColor;
-import com.esri.arcgis.display.RgbColor;
 
 import org.w3c.dom.Element;
 import de.intevation.mxd.utils.MapToXMLUtils;
@@ -92,31 +84,10 @@
         for(int i = 0; i < symbol.getLayerCount(); i++) {
             try {
                 ISymbol sym = (ISymbol)symbol.getLayer(i);
-
-                if(sym instanceof ArrowMarkerSymbol) {
-                    ISymbolReader sreader = new ArrowMarkerSymbolReader(sym);
-                    sreader.setParent(renderer);
-                    sreader.setUtil(util);
-                    sreader.read();
-                }
-                else if(sym instanceof CharacterMarkerSymbol) {
-                    ISymbolReader sreader = new CharacterMarkerSymbolReader(sym);
-                    sreader.setParent(renderer);
-                    sreader.setUtil(util);
-                    sreader.read();
-                }
-                else if(sym instanceof PictureMarkerSymbol) {
-                    ISymbolReader sreader = new PictureMarkerSymbolReader(sym);
-                    sreader.setParent(renderer);
-                    sreader.setUtil(util);
-                    sreader.read();
-                }
-                else {
-                    logger.debug("The type of " + sym.getClass().toString() +
-                                 " is not implemented!");
-                    System.out.println(
-                            "No known instance: " + sym.getClass().toString());
-                }
+                ISymbolReader sreader = new MarkerSymbolReader(sym);
+                sreader.setParent(renderer);
+                sreader.setUtil(util);
+                sreader.read();
             }
             catch(Exception e) {
                 e.printStackTrace();
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)