svn-gvsig-desktop / branches / v2_0_0_prep / libraries / org.gvsig.arcims / src / org / gvsig / remoteclient / arcims / utils / ArcImsFeature.java @ 32669
History | View | Annotate | Download (2.14 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government (CIT)
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 2
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
*/
|
22 |
|
23 |
/*
|
24 |
* AUTHORS (In addition to CIT):
|
25 |
* 2010 Prodevelop S.L. main development
|
26 |
* http://www.prodevelop.es
|
27 |
*/
|
28 |
|
29 |
package org.gvsig.remoteclient.arcims.utils; |
30 |
|
31 |
import java.util.HashMap; |
32 |
|
33 |
import org.gvsig.fmap.geom.Geometry; |
34 |
import org.gvsig.fmap.geom.primitive.Envelope; |
35 |
|
36 |
/**
|
37 |
* ArcIms feature
|
38 |
* @author vsanjaime version 2.0
|
39 |
*
|
40 |
*/
|
41 |
|
42 |
public class ArcImsFeature extends HashMap<String, Object> { |
43 |
|
44 |
private static final long serialVersionUID = 1L; |
45 |
private String fieldPK = ""; |
46 |
private Envelope envelope;
|
47 |
|
48 |
/**
|
49 |
*
|
50 |
*/
|
51 |
public ArcImsFeature() {
|
52 |
this.put("geom", null); |
53 |
} |
54 |
|
55 |
/**
|
56 |
*
|
57 |
* @param geom
|
58 |
*/
|
59 |
public void putGeometry(Geometry geom, Envelope envelope){ |
60 |
this.remove("geom"); |
61 |
this.put("geom",geom); |
62 |
this.envelope = envelope;
|
63 |
} |
64 |
|
65 |
/**
|
66 |
*
|
67 |
* @param geom
|
68 |
*/
|
69 |
public Geometry getGeometry(){
|
70 |
|
71 |
return (Geometry)this.get("geom"); |
72 |
} |
73 |
|
74 |
/**
|
75 |
*
|
76 |
* @return
|
77 |
*/
|
78 |
public boolean isValid(){ |
79 |
Object obj = this.get("geom"); |
80 |
if(obj == null){ |
81 |
return false; |
82 |
} |
83 |
else{
|
84 |
return true; |
85 |
} |
86 |
} |
87 |
|
88 |
/**
|
89 |
*
|
90 |
* @param name
|
91 |
*/
|
92 |
public void setFieldPK(String name){ |
93 |
this.fieldPK = name;
|
94 |
} |
95 |
|
96 |
/**
|
97 |
*
|
98 |
* @return
|
99 |
*/
|
100 |
public String getFieldPK(){ |
101 |
return this.fieldPK; |
102 |
} |
103 |
|
104 |
/**
|
105 |
*
|
106 |
* @return
|
107 |
*/
|
108 |
public Envelope getEnvelope() {
|
109 |
return envelope;
|
110 |
} |
111 |
|
112 |
|
113 |
|
114 |
} |