Revision 32538 branches/v2_0_0_prep/libraries/org.gvsig.arcims/src/org/gvsig/remoteclient/arcims/utils/ArcImsFeature.java
ArcImsFeature.java | ||
---|---|---|
1 | 1 |
package org.gvsig.remoteclient.arcims.utils; |
2 | 2 |
|
3 |
import java.util.HashMap; |
|
4 |
|
|
3 | 5 |
import org.gvsig.fmap.geom.Geometry; |
4 | 6 |
|
5 |
public class ArcImsFeature { |
|
7 |
public class ArcImsFeature extends HashMap<String, Object> { |
|
8 |
|
|
9 |
private static final long serialVersionUID = 1L; |
|
10 |
|
|
11 |
/** |
|
12 |
* |
|
13 |
*/ |
|
14 |
public ArcImsFeature() { |
|
15 |
this.put("geom", null); |
|
16 |
} |
|
6 | 17 |
|
7 |
private Geometry geom; |
|
18 |
/** |
|
19 |
* |
|
20 |
* @param geom |
|
21 |
*/ |
|
22 |
public void putGeometry(Geometry geom){ |
|
23 |
this.remove("geom"); |
|
24 |
this.put("geom",geom); |
|
25 |
} |
|
8 | 26 |
|
9 |
private Object[] attributes; |
|
27 |
/** |
|
28 |
* |
|
29 |
* @param geom |
|
30 |
*/ |
|
31 |
public Geometry getGeometry(){ |
|
32 |
|
|
33 |
return (Geometry)this.get("geom"); |
|
34 |
} |
|
10 | 35 |
|
11 |
public ArcImsFeature(Geometry geom, Object[] attributes){ |
|
12 |
this.geom = geom; |
|
13 |
this.attributes = attributes; |
|
36 |
/** |
|
37 |
* |
|
38 |
* @return |
|
39 |
*/ |
|
40 |
public boolean isValid(){ |
|
41 |
Object obj = this.get("geom"); |
|
42 |
if(obj == null){ |
|
43 |
return false; |
|
44 |
} |
|
45 |
else{ |
|
46 |
return true; |
|
47 |
} |
|
14 | 48 |
} |
15 | 49 |
|
16 |
public ArcImsFeature(Object[] attributes){ |
|
17 |
this.geom = null; |
|
18 |
this.attributes = attributes; |
|
19 |
} |
|
50 |
// /** |
|
51 |
// * |
|
52 |
// * @return |
|
53 |
// */ |
|
54 |
// public int getGeometryType(){ |
|
55 |
// Geometry geom = this.get("geom"); |
|
56 |
// if(geom != null){ |
|
57 |
// |
|
58 |
// }else{ |
|
59 |
// return |
|
60 |
// } |
|
61 |
// |
|
62 |
// } |
|
20 | 63 |
|
21 |
public Object[] getAtributtes() { |
|
22 |
return attributes; |
|
23 |
} |
|
24 |
|
|
25 |
public void setAtributtes(Object[] attributes) { |
|
26 |
this.attributes = attributes; |
|
27 |
} |
|
28 |
|
|
29 |
public Geometry getGeom() { |
|
30 |
return geom; |
|
31 |
} |
|
32 |
|
|
33 |
public void setGeom(Geometry geom) { |
|
34 |
this.geom = geom; |
|
35 |
} |
|
36 |
|
|
37 | 64 |
} |
Also available in: Unified diff