annotate src/java/de/intevation/mxd/reader/MarkerSymbolReader.java @ 180:f4eb506499f5

Done some code styling and removed TODOs.
author Raimund Renkert <rrenkert@intevation.de>
date Mon, 11 Jul 2011 12:11:08 +0200
parents fb93f20478cc
children 0bde090506f9
rev   line source
70
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
1 package de.intevation.mxd.reader;
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
2
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
3 import java.lang.Exception;
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
4
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
5 import org.w3c.dom.Element;
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
6
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
7 import org.apache.log4j.Logger;
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
8
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
9 import com.esri.arcgis.display.ISymbol;
75
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
10 import com.esri.arcgis.display.IMarkerSymbol;
71
260748e3d08f Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 70
diff changeset
11 import com.esri.arcgis.display.SimpleMarkerSymbol;
70
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
12 import com.esri.arcgis.display.ArrowMarkerSymbol;
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
13 import com.esri.arcgis.display.CharacterMarkerSymbol;
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
14 import com.esri.arcgis.display.PictureMarkerSymbol;
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
15 import com.esri.arcgis.display.MultiLayerMarkerSymbol;
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
16
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
17 /**
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
18 * Wrapper for marker symbol reader.
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
19 *
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
20 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a>
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
21 */
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
22 public class MarkerSymbolReader
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
23 extends AbstractSymbolReader {
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
24
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
25 /**
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
26 * The logger.
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
27 */
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
28 private static final Logger logger =
75
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
29 Logger.getLogger(MarkerSymbolReader.class);
70
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
30
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
31 private ISymbol symbol;
75
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
32 private IMarkerSymbol markerSymbol;
70
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
33
71
260748e3d08f Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 70
diff changeset
34 public MarkerSymbolReader(ISymbol symbol)
260748e3d08f Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 70
diff changeset
35 throws Exception {
260748e3d08f Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 70
diff changeset
36 logger.debug("contructor(ISymbol)");
70
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
37 this.symbol = symbol;
75
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
38 this.markerSymbol = null;
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
39 }
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
40
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
41 public MarkerSymbolReader(IMarkerSymbol symbol)
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
42 throws Exception {
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
43 logger.debug("contructor(ISymbol)");
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
44 this.markerSymbol = symbol;
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
45 this.symbol = null;
70
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
46 }
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
47
71
260748e3d08f Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 70
diff changeset
48 public MarkerSymbolReader() {
260748e3d08f Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 70
diff changeset
49 logger.debug("contructor()");
260748e3d08f Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 70
diff changeset
50 this.symbol = null;
75
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
51 this.markerSymbol = null;
71
260748e3d08f Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 70
diff changeset
52 }
260748e3d08f Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 70
diff changeset
53
115
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
54 public Element read() {
75
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
55 logger.debug("read()");
70
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
56 ISymbolReader sreader = null;
75
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
57
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
58 if(symbol != null) {
115
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
59 try {
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
60 if(symbol instanceof SimpleMarkerSymbol) {
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
61 sreader = new SimpleMarkerSymbolReader(symbol);
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
62 }
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
63 else if(symbol instanceof ArrowMarkerSymbol) {
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
64 sreader = new ArrowMarkerSymbolReader(symbol);
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
65 }
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
66 else if(symbol instanceof CharacterMarkerSymbol) {
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
67 sreader = new CharacterMarkerSymbolReader(symbol);
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
68 }
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
69 else if(symbol instanceof PictureMarkerSymbol) {
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
70 sreader = new PictureMarkerSymbolReader(symbol);
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
71 }
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
72 else if(symbol instanceof MultiLayerMarkerSymbol) {
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
73 sreader = new MultiLayerMarkerSymbolReader(symbol);
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
74 }
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
75 else {
180
f4eb506499f5 Done some code styling and removed TODOs.
Raimund Renkert <rrenkert@intevation.de>
parents: 115
diff changeset
76 logger.debug("The reader for type " +
f4eb506499f5 Done some code styling and removed TODOs.
Raimund Renkert <rrenkert@intevation.de>
parents: 115
diff changeset
77 symbol.getClass().toString() +
115
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
78 " is not implemented!");
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
79 return parent;
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
80 }
75
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
81 }
115
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
82 catch(Exception e) {
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
83 logger.error(
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
84 "Could not read the symbol " +
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
85 symbol.getClass().toString());
75
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
86 return parent;
115
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
87
75
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
88 }
70
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
89 }
75
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
90 else if(markerSymbol != null) {
115
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
91 try {
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
92 if(markerSymbol instanceof SimpleMarkerSymbol) {
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
93 sreader = new SimpleMarkerSymbolReader(markerSymbol);
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
94 }
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
95 else if(markerSymbol instanceof ArrowMarkerSymbol) {
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
96 sreader = new ArrowMarkerSymbolReader(markerSymbol);
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
97 }
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
98 else if(markerSymbol instanceof CharacterMarkerSymbol) {
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
99 sreader = new CharacterMarkerSymbolReader(markerSymbol);
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
100 }
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
101 else if(markerSymbol instanceof PictureMarkerSymbol) {
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
102 sreader = new PictureMarkerSymbolReader(markerSymbol);
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
103 }
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
104 else if(markerSymbol instanceof MultiLayerMarkerSymbol) {
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
105 sreader = new MultiLayerMarkerSymbolReader(markerSymbol);
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
106 }
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
107 else {
180
f4eb506499f5 Done some code styling and removed TODOs.
Raimund Renkert <rrenkert@intevation.de>
parents: 115
diff changeset
108 logger.debug("The reader for type " +
f4eb506499f5 Done some code styling and removed TODOs.
Raimund Renkert <rrenkert@intevation.de>
parents: 115
diff changeset
109 symbol.getClass().toString() +
115
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
110 " is not implemented!");
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
111 return parent;
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
112 }
75
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
113 }
115
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
114 catch(Exception e) {
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
115 logger.error(
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
116 "Could not read the symbol " +
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
117 symbol.getClass().toString());
75
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
118 return parent;
115
fb93f20478cc Improved exception handling for symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 75
diff changeset
119
75
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
120 }
70
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
121 }
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
122 if (sreader != null) {
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
123 sreader.setParent(parent);
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
124 sreader.setUtil(util);
75
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
125 sreader.read();
70
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
126 }
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
127 return parent;
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
128 }
71
260748e3d08f Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 70
diff changeset
129
260748e3d08f Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 70
diff changeset
130 public void setSymbol(ISymbol sym) {
260748e3d08f Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 70
diff changeset
131 this.symbol = sym;
75
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
132 this.markerSymbol = null;
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
133 }
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
134
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
135 public void setSymbol(IMarkerSymbol sym) {
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
136 this.markerSymbol = sym;
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
137 this.symbol = null;
71
260748e3d08f Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 70
diff changeset
138 }
260748e3d08f Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 70
diff changeset
139
260748e3d08f Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 70
diff changeset
140 public boolean canRead(ISymbol sym) {
260748e3d08f Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 70
diff changeset
141 if(sym instanceof SimpleMarkerSymbol ||
260748e3d08f Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 70
diff changeset
142 sym instanceof ArrowMarkerSymbol ||
260748e3d08f Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 70
diff changeset
143 sym instanceof PictureMarkerSymbol ||
260748e3d08f Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 70
diff changeset
144 sym instanceof CharacterMarkerSymbol ||
260748e3d08f Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 70
diff changeset
145 sym instanceof MultiLayerMarkerSymbol) {
260748e3d08f Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 70
diff changeset
146 return true;
260748e3d08f Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 70
diff changeset
147 }
260748e3d08f Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 70
diff changeset
148 else {
260748e3d08f Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 70
diff changeset
149 return false;
260748e3d08f Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 70
diff changeset
150 }
260748e3d08f Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 70
diff changeset
151 }
260748e3d08f Added wrapper for line symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 70
diff changeset
152
75
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
153 public boolean canRead(IMarkerSymbol sym) {
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
154 if(sym instanceof SimpleMarkerSymbol ||
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
155 sym instanceof ArrowMarkerSymbol ||
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
156 sym instanceof PictureMarkerSymbol ||
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
157 sym instanceof CharacterMarkerSymbol ||
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
158 sym instanceof MultiLayerMarkerSymbol) {
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
159 return true;
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
160 }
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
161 else {
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
162 return false;
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
163 }
9ea64427ac7e Added marker fill symbol reader.
Raimund Renkert <rrenkert@intevation.de>
parents: 74
diff changeset
164 }
70
6d181c02efce Added wrapper for marker symbol reader and extracted methods from symbol
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
165 }
180
f4eb506499f5 Done some code styling and removed TODOs.
Raimund Renkert <rrenkert@intevation.de>
parents: 115
diff changeset
166 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)