Mercurial > mxd2map
diff src/java/de/intevation/mxd/reader/MultiLayerFillSymbolReader.java @ 79:5becdfe6ebae
merged with raimunds stuff
author | Stephan Holl <stephan.holl@intevation.de> |
---|---|
date | Fri, 27 May 2011 12:54:55 +0200 |
parents | 9ea64427ac7e |
children | 83932f18dddc |
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/reader/MultiLayerFillSymbolReader.java Thu May 26 16:13:50 2011 +0200 +++ b/src/java/de/intevation/mxd/reader/MultiLayerFillSymbolReader.java Fri May 27 12:54:55 2011 +0200 @@ -87,26 +87,21 @@ * @return The XML node. */ public Element read() - throws IOException { + throws Exception { logger.debug("read()"); for(int i = 0; i < symbol.getLayerCount(); i++) { - try { - ISymbol sym = (ISymbol)symbol.getLayer(i); + ISymbol sym = (ISymbol)symbol.getLayer(i); - if(sym instanceof SimpleFillSymbol) { - ISymbolReader sreader = new SimpleFillSymbolReader(sym); - sreader.setParent(renderer); - sreader.setUtil(util); - sreader.read(); - } - else { - logger.debug("The type of " + sym.getClass().toString() + - " is not implemented!"); - } + FillSymbolReader fsr = new FillSymbolReader(); + if(fsr.canRead(sym)) { + fsr.setSymbol(sym); + fsr.setParent(renderer); + fsr.setUtil(util); + fsr.read(); } - catch(Exception e) { - e.printStackTrace(); - return null; + else { + logger.debug("The type of " + sym.getClass().toString() + + " is not implemented!"); } } return renderer;