comparison src/java/de/intevation/mxd/reader/FeatureLayerReader.java @ 26:3e24fffdf2bb

Moved reader components to reader folder.
author Raimund Renkert <rrenkert@intevation.de>
date Fri, 08 Apr 2011 12:26:17 +0200
parents src/java/de/intevation/mxd/FeatureLayerReader.java@cbd67b1100d8
children 77cfa8092611
comparison
equal deleted inserted replaced
25:cbd67b1100d8 26:3e24fffdf2bb
1 //package de.intevation.mxd.reader;
2
3 import java.io.IOException;
4
5 import org.apache.log4j.Logger;
6
7 import com.esri.arcgis.carto.ILayer;
8 import com.esri.arcgis.carto.FeatureLayer;
9 import com.esri.arcgis.geometry.ISpatialReference;
10 import com.esri.arcgis.geometry.ProjectedCoordinateSystem;
11 import com.esri.arcgis.geometry.IProjection;
12 import com.esri.arcgis.geometry.Projection;
13 import com.esri.arcgis.display.ISymbol;
14 import com.esri.arcgis.display.SimpleMarkerSymbol;
15 /**
16 * Reads Layer information..
17 *
18 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a>
19 */
20 public class FeatureLayerReader implements ILayerReader{
21
22 private static final Logger logger = Logger.getLogger(FeatureLayerReader.class);
23
24 private ILayer layer;
25
26 //Constructor
27 public FeatureLayerReader(ILayer layer){
28 this.layer = layer;
29 }
30
31 //Methods
32 /**
33 * Reads the Layer content.
34 */
35 public boolean read() throws IOException{
36 logger.debug("read()");
37 if(layer instanceof FeatureLayer){
38 FeatureLayer fl = (FeatureLayer)layer;
39 System.out.println("--------------------");
40 System.out.println("Layer information:");
41 System.out.println("Layername\t\t = " + fl.getName());
42 System.out.println("Min-/Maxscale\t = " + fl.getMinimumScale() +
43 "/" + fl.getMaximumScale());
44 ISymbol symbol = fl.getSelectionSymbol();
45 if(symbol instanceof SimpleMarkerSymbol)
46 System.out.println("Symboltype\t\t = " +
47 ((SimpleMarkerSymbol)symbol).getNameString());
48
49 System.out.println("Status\t\t = " + fl.isVisible());
50 System.out.println("Definition Query\t = " + fl.getDefinitionExpression());
51 System.out.println("");
52 return true;
53 }
54 else{
55 System.out.println("Layer type unknown! " + layer.getClass().toString());
56 }
57
58 return false;
59 }
60
61 public void getLayer() throws IOException{
62 logger.debug("getLayer() -> not implemented jet.");
63 return;
64 }
65 }
66 // 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)