comparison src/java/de/intevation/mxd/FeatureLayerReader.java @ 25:cbd67b1100d8

Initial commit of the first prototype.
author Raimund Renkert <rrenkert@intevation.de>
date Fri, 08 Apr 2011 11:47:59 +0200
parents
children
comparison
equal deleted inserted replaced
24:c0060abb7457 25:cbd67b1100d8
1 //package de.intevation.mxd.layer;
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)