Mercurial > mxd2map
comparison src/java/de/intevation/mxd/reader/SimpleRendererReader.java @ 44:9b5fb5e5914d
Added expressions for mapserver classes.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Mon, 18 Apr 2011 14:50:49 +0200 |
parents | ef7ca23c4233 |
children | 34a93dad7604 |
comparison
equal
deleted
inserted
replaced
43:ef7ca23c4233 | 44:9b5fb5e5914d |
---|---|
75 throws IOException { | 75 throws IOException { |
76 logger.debug("read()"); | 76 logger.debug("read()"); |
77 Element rendererElement; | 77 Element rendererElement; |
78 try { | 78 try { |
79 rendererElement = util.addRenderer(layer); | 79 rendererElement = util.addRenderer(layer); |
80 } | |
81 catch(Exception e) { | |
82 e.printStackTrace(); | |
83 return null; | |
84 } | |
85 | 80 |
86 rendererElement.setAttribute("label", renderer.getLabel()); | 81 rendererElement.setAttribute("label", renderer.getLabel()); |
87 rendererElement.setAttribute("description", renderer.getDescription()); | 82 rendererElement.setAttribute("description", renderer.getDescription()); |
88 symbol = renderer.getSymbol(); | 83 symbol = renderer.getSymbol(); |
89 try { | |
90 if(symbol instanceof SimpleMarkerSymbol){ | 84 if(symbol instanceof SimpleMarkerSymbol){ |
91 ISymbolReader isr= new SimpleMarkerSymbolReader(symbol); | 85 ISymbolReader isr= new SimpleMarkerSymbolReader(symbol); |
92 isr.setParent(rendererElement); | 86 isr.setParent(rendererElement); |
93 isr.setUtil(util); | 87 isr.setUtil(util); |
94 isr.read(); | 88 isr.read(); |
97 ISymbolReader isr = new SimpleFillSymbolReader(symbol); | 91 ISymbolReader isr = new SimpleFillSymbolReader(symbol); |
98 isr.setParent(rendererElement); | 92 isr.setParent(rendererElement); |
99 isr.setUtil(util); | 93 isr.setUtil(util); |
100 isr.read(); | 94 isr.read(); |
101 } | 95 } |
102 return rendererElement; | 96 return layer; |
103 } | 97 } |
104 catch(Exception e) { | 98 catch(Exception e) { |
105 e.printStackTrace(); | 99 e.printStackTrace(); |
100 return null; | |
106 } | 101 } |
107 return rendererElement; | |
108 } | 102 } |
109 } | 103 } |
110 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 104 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |