annotate src/java/de/intevation/mxd/reader/FeatureClassReader.java @ 30:c34c450edb06

Introduced class reader.
author Raimund Renkert <rrenkert@intevation.de>
date Fri, 08 Apr 2011 17:58:37 +0200
parents
children 40c0b4e5f91a
rev   line source
30
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
1 //package de.intevation.mxd.reader;
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.Attr;
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
11 import org.w3c.dom.Document;
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
12 import org.w3c.dom.Element;
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
13 import org.w3c.dom.Node;
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 /**
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
16 * Reads FeatureClass information.
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
17 *
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
18 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a>
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
19 */
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
20 public class FeatureClassReader implements IClassReader{
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
21
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
22 private static final Logger logger = Logger.getLogger(FeatureClassReader.class);
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
23
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
24 private IClass fclass;
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
25
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
26 private Node parent;
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
27 //Constructor
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
28 public FeatureClassReader(IClass cl) throws Exception{
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
29 if(cl instanceof FeatureClass)
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
30 this.fclass = cl;
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
31 else
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
32 throw new Exception("Not a FeatureClass object!");
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
33 }
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
34
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
35 //Methods
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
36 /**
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
37 * Reads the Layer content.
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
38 */
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
39 public boolean read() throws IOException{
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
40 logger.debug("read()");
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
41 return false;
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
42 }
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
43
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
44 public void getClassDoc() throws IOException{
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
45 logger.debug("getLayer() -> not implemented jet.");
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
46 return;
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 public void setXMLNode(Node node) {
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
50 parent = node;
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
51 }
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
52 }
c34c450edb06 Introduced class reader.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
53 // 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)