root / branches / v2_0_0_prep / extensions / extGPE-gvSIG / src / org / gvsig / fmap / dal / store / gpe / model / GPEFeature.java @ 27499
History | View | Annotate | Download (2.92 KB)
1 |
package org.gvsig.fmap.dal.store.gpe.model; |
---|---|
2 |
|
3 |
import java.util.LinkedHashMap; |
4 |
|
5 |
import org.gvsig.fmap.geom.Geometry; |
6 |
import org.omg.CORBA.portable.ValueFactory; |
7 |
|
8 |
import sun.awt.SunHints.Value; |
9 |
|
10 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
11 |
*
|
12 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
13 |
*
|
14 |
* This program is free software; you can redistribute it and/or
|
15 |
* modify it under the terms of the GNU General Public License
|
16 |
* as published by the Free Software Foundation; either version 2
|
17 |
* of the License, or (at your option) any later version.
|
18 |
*
|
19 |
* This program is distributed in the hope that it will be useful,
|
20 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
21 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
22 |
* GNU General Public License for more details.
|
23 |
*
|
24 |
* You should have received a copy of the GNU General Public License
|
25 |
* along with this program; if not, write to the Free Software
|
26 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
27 |
*
|
28 |
* For more information, contact:
|
29 |
*
|
30 |
* Generalitat Valenciana
|
31 |
* Conselleria d'Infraestructures i Transport
|
32 |
* Av. Blasco Ib??ez, 50
|
33 |
* 46010 VALENCIA
|
34 |
* SPAIN
|
35 |
*
|
36 |
* +34 963862235
|
37 |
* gvsig@gva.es
|
38 |
* www.gvsig.gva.es
|
39 |
*
|
40 |
* or
|
41 |
*
|
42 |
* IVER T.I. S.A
|
43 |
* Salamanca 50
|
44 |
* 46005 Valencia
|
45 |
* Spain
|
46 |
*
|
47 |
* +34 963163400
|
48 |
* dac@iver.es
|
49 |
*/
|
50 |
/* CVS MESSAGES:
|
51 |
*
|
52 |
* $Id$
|
53 |
* $Log$
|
54 |
*
|
55 |
*/
|
56 |
/**
|
57 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es)
|
58 |
*/
|
59 |
public class GPEFeature { |
60 |
private static int idFeature = 0; |
61 |
private Geometry geometry = null; |
62 |
private LinkedHashMap elements = null; |
63 |
private String id = null; |
64 |
private String name = null; |
65 |
private String typeName = null; |
66 |
|
67 |
public GPEFeature(String id, String name, String typeName) { |
68 |
this();
|
69 |
this.id = id;
|
70 |
this.name = name;
|
71 |
this.typeName = typeName;
|
72 |
} |
73 |
|
74 |
public GPEFeature(){
|
75 |
elements = new LinkedHashMap(); |
76 |
} |
77 |
|
78 |
/**
|
79 |
* @return the id
|
80 |
*/
|
81 |
public String getId() { |
82 |
return id;
|
83 |
} |
84 |
|
85 |
/**
|
86 |
* @param id the id to set
|
87 |
*/
|
88 |
public void setId(String id) { |
89 |
this.id = id;
|
90 |
} |
91 |
|
92 |
/**
|
93 |
* @return the geometry
|
94 |
*/
|
95 |
public Geometry getGeometry() {
|
96 |
return geometry;
|
97 |
} |
98 |
|
99 |
/**
|
100 |
* @param geometry the geometry to set
|
101 |
*/
|
102 |
public void setGeometry(Geometry geometry) { |
103 |
this.geometry = geometry;
|
104 |
} |
105 |
|
106 |
/**
|
107 |
* @return the elements
|
108 |
*/
|
109 |
public LinkedHashMap getelements() { |
110 |
return elements;
|
111 |
} |
112 |
|
113 |
/**
|
114 |
* @param elements the elements to set
|
115 |
*/
|
116 |
public void setElements(LinkedHashMap elements) { |
117 |
this.elements = elements;
|
118 |
} |
119 |
|
120 |
/**
|
121 |
* It adds a new element
|
122 |
* @param element
|
123 |
* The element to add
|
124 |
*/
|
125 |
public void addElement(GPEElement element){ |
126 |
elements.put(element.getName(), element); |
127 |
} |
128 |
|
129 |
/**
|
130 |
* @return the name
|
131 |
*/
|
132 |
public String getName() { |
133 |
return name;
|
134 |
} |
135 |
|
136 |
/**
|
137 |
* @return the typeName
|
138 |
*/
|
139 |
public String getTypeName() { |
140 |
return typeName;
|
141 |
} |
142 |
|
143 |
/**
|
144 |
* Initialize the feature id
|
145 |
*/
|
146 |
public static void initIdFeature(){ |
147 |
idFeature = 0;
|
148 |
} |
149 |
} |