annotate src/java/de/intevation/mxd/reader/FeatureClassReader.java @ 192:0dc34dcdaedc

Lookup symbol font in fontset.
author raimund renkert <raimund.renkert@intevation.de>
date Wed, 20 Jul 2011 16:06:33 +0200
parents 0bde090506f9
children df4e0946ef02
rev   line source
33
c51376f8e24c Separated converter components into packages.
Raimund Renkert <rrenkert@intevation.de>
parents: 31
diff changeset
1 package de.intevation.mxd.reader;
30
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
2
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
3 import java.io.IOException;
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
4
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
5 import org.apache.log4j.Logger;
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
6
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
7 import com.esri.arcgis.geodatabase.IClass;
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
8 import com.esri.arcgis.geodatabase.FeatureClass;
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
9
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
10 import org.w3c.dom.Node;
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
11
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
12 /**
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
13 * Reads FeatureClass information.
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
14 *
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
15 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a>
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
16 */
43
ef7ca23c4233 Added comments, done some code styling and removed typos.
Raimund Renkert <rrenkert@intevation.de>
parents: 34
diff changeset
17 public class FeatureClassReader
ef7ca23c4233 Added comments, done some code styling and removed typos.
Raimund Renkert <rrenkert@intevation.de>
parents: 34
diff changeset
18 implements IClassReader {
30
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
19
43
ef7ca23c4233 Added comments, done some code styling and removed typos.
Raimund Renkert <rrenkert@intevation.de>
parents: 34
diff changeset
20 /**
ef7ca23c4233 Added comments, done some code styling and removed typos.
Raimund Renkert <rrenkert@intevation.de>
parents: 34
diff changeset
21 * The Logger.
ef7ca23c4233 Added comments, done some code styling and removed typos.
Raimund Renkert <rrenkert@intevation.de>
parents: 34
diff changeset
22 */
ef7ca23c4233 Added comments, done some code styling and removed typos.
Raimund Renkert <rrenkert@intevation.de>
parents: 34
diff changeset
23 private static final Logger logger =
ef7ca23c4233 Added comments, done some code styling and removed typos.
Raimund Renkert <rrenkert@intevation.de>
parents: 34
diff changeset
24 Logger.getLogger(FeatureClassReader.class);
ef7ca23c4233 Added comments, done some code styling and removed typos.
Raimund Renkert <rrenkert@intevation.de>
parents: 34
diff changeset
25
ef7ca23c4233 Added comments, done some code styling and removed typos.
Raimund Renkert <rrenkert@intevation.de>
parents: 34
diff changeset
26 /**
ef7ca23c4233 Added comments, done some code styling and removed typos.
Raimund Renkert <rrenkert@intevation.de>
parents: 34
diff changeset
27 * Private member.
ef7ca23c4233 Added comments, done some code styling and removed typos.
Raimund Renkert <rrenkert@intevation.de>
parents: 34
diff changeset
28 */
ef7ca23c4233 Added comments, done some code styling and removed typos.
Raimund Renkert <rrenkert@intevation.de>
parents: 34
diff changeset
29 private IClass fclass;
30
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
30 private Node parent;
43
ef7ca23c4233 Added comments, done some code styling and removed typos.
Raimund Renkert <rrenkert@intevation.de>
parents: 34
diff changeset
31
181
0bde090506f9 Added comments.
Raimund Renkert <rrenkert@intevation.de>
parents: 43
diff changeset
32 /**
0bde090506f9 Added comments.
Raimund Renkert <rrenkert@intevation.de>
parents: 43
diff changeset
33 * Constructor with class object.
0bde090506f9 Added comments.
Raimund Renkert <rrenkert@intevation.de>
parents: 43
diff changeset
34 *
0bde090506f9 Added comments.
Raimund Renkert <rrenkert@intevation.de>
parents: 43
diff changeset
35 * @param cl The ArcGIS class object.
0bde090506f9 Added comments.
Raimund Renkert <rrenkert@intevation.de>
parents: 43
diff changeset
36 */
43
ef7ca23c4233 Added comments, done some code styling and removed typos.
Raimund Renkert <rrenkert@intevation.de>
parents: 34
diff changeset
37 public FeatureClassReader(IClass cl)
ef7ca23c4233 Added comments, done some code styling and removed typos.
Raimund Renkert <rrenkert@intevation.de>
parents: 34
diff changeset
38 throws Exception {
ef7ca23c4233 Added comments, done some code styling and removed typos.
Raimund Renkert <rrenkert@intevation.de>
parents: 34
diff changeset
39 if(cl instanceof FeatureClass) {
30
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
40 this.fclass = cl;
43
ef7ca23c4233 Added comments, done some code styling and removed typos.
Raimund Renkert <rrenkert@intevation.de>
parents: 34
diff changeset
41 }
ef7ca23c4233 Added comments, done some code styling and removed typos.
Raimund Renkert <rrenkert@intevation.de>
parents: 34
diff changeset
42 else {
31
40c0b4e5f91a Added utility class to store map attributes.
Raimund Renkert <rrenkert@intevation.de>
parents: 30
diff changeset
43 throw new Exception("Not a FeatureClass object!" +
40c0b4e5f91a Added utility class to store map attributes.
Raimund Renkert <rrenkert@intevation.de>
parents: 30
diff changeset
44 cl.getClass().toString());
43
ef7ca23c4233 Added comments, done some code styling and removed typos.
Raimund Renkert <rrenkert@intevation.de>
parents: 34
diff changeset
45 }
30
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
46 }
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
47
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
48 /**
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
49 * Reads the Layer content.
43
ef7ca23c4233 Added comments, done some code styling and removed typos.
Raimund Renkert <rrenkert@intevation.de>
parents: 34
diff changeset
50 *
ef7ca23c4233 Added comments, done some code styling and removed typos.
Raimund Renkert <rrenkert@intevation.de>
parents: 34
diff changeset
51 * @return Currently always false.
30
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
52 */
43
ef7ca23c4233 Added comments, done some code styling and removed typos.
Raimund Renkert <rrenkert@intevation.de>
parents: 34
diff changeset
53 public boolean read()
ef7ca23c4233 Added comments, done some code styling and removed typos.
Raimund Renkert <rrenkert@intevation.de>
parents: 34
diff changeset
54 throws IOException {
ef7ca23c4233 Added comments, done some code styling and removed typos.
Raimund Renkert <rrenkert@intevation.de>
parents: 34
diff changeset
55 logger.debug("read() -> not implemented jet.");
30
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
56 return false;
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
57 }
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
58
43
ef7ca23c4233 Added comments, done some code styling and removed typos.
Raimund Renkert <rrenkert@intevation.de>
parents: 34
diff changeset
59 public void getClassDoc()
ef7ca23c4233 Added comments, done some code styling and removed typos.
Raimund Renkert <rrenkert@intevation.de>
parents: 34
diff changeset
60 throws IOException {
30
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
61 logger.debug("getLayer() -> not implemented jet.");
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
62 return;
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
63 }
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
64
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
65 public void setXMLNode(Node node) {
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
66 parent = node;
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
67 }
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
68 }
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
69 // 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)