svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libFMap_dal / src / org / gvsig / fmap / dal / feature / EditableFeature.java @ 25407
History | View | Annotate | Download (5.87 KB)
1 |
package org.gvsig.fmap.dal.feature; |
---|---|
2 |
|
3 |
import java.util.Date; |
4 |
|
5 |
import org.gvsig.fmap.geom.Geometry; |
6 |
|
7 |
/**
|
8 |
* This interface represents a Feature in editable state. To edit a Feature
|
9 |
* you have to obtain its instance of EditableFeature and then perform editing
|
10 |
* operations on it. Once you have completed the edition you can save the changes
|
11 |
* to the original Feature. This is the only way to edit a Feature.
|
12 |
*/
|
13 |
public interface EditableFeature extends Feature { |
14 |
|
15 |
/**
|
16 |
* Sets the value of an attribute given its name
|
17 |
* @param name
|
18 |
* attribute's name
|
19 |
* @param value
|
20 |
* value to set
|
21 |
*/
|
22 |
public void set(String name, Object value); |
23 |
|
24 |
/**
|
25 |
* Sets the value of an attribute given its index
|
26 |
* @param index
|
27 |
* attribute's index
|
28 |
* @param value
|
29 |
* value to set
|
30 |
*/
|
31 |
public void set(int index, Object value); |
32 |
|
33 |
/**
|
34 |
* Sets the value of an attribute of type integer, given its name
|
35 |
* @param name
|
36 |
* attribute's name
|
37 |
* @param value
|
38 |
* value to set
|
39 |
*/
|
40 |
public void setInt(String name, int value); |
41 |
|
42 |
/**
|
43 |
* Sets the value of an attribute of type integer, given its index
|
44 |
* @param index
|
45 |
* attribute's index
|
46 |
* @param value
|
47 |
* value to set
|
48 |
*/
|
49 |
public void setInt(int index, int value); |
50 |
|
51 |
/**
|
52 |
* Sets the value of an attribute of type boolean, given its name
|
53 |
* @param name
|
54 |
* attribute's name
|
55 |
* @param value
|
56 |
* value to set
|
57 |
*/
|
58 |
public void setBoolean(String name, boolean value); |
59 |
|
60 |
/**
|
61 |
* Sets the value of an attribute of type boolean, given its index
|
62 |
* @param index
|
63 |
* attribute's index
|
64 |
* @param value
|
65 |
* value to set
|
66 |
*/
|
67 |
public void setBoolean(int index, boolean value); |
68 |
|
69 |
/**
|
70 |
* Sets the value of an attribute of type long, given its name
|
71 |
* @param name
|
72 |
* attribute's name
|
73 |
* @param value
|
74 |
* value to set
|
75 |
*/
|
76 |
public void setLong(String name, long value); |
77 |
|
78 |
/**
|
79 |
* Sets the value of an attribute of type long, given its index
|
80 |
* @param index
|
81 |
* attribute's index
|
82 |
* @param value
|
83 |
* value to set
|
84 |
*/
|
85 |
public void setLong(int index, long value); |
86 |
|
87 |
/**
|
88 |
* Sets the value of an attribute of type float, given its name
|
89 |
* @param name
|
90 |
* attribute's name
|
91 |
* @param value
|
92 |
* value to set
|
93 |
*/
|
94 |
public void setFloat(String name, float value); |
95 |
|
96 |
/**
|
97 |
* Sets the value of an attribute of type float, given its index
|
98 |
* @param index
|
99 |
* attribute's index
|
100 |
* @param value
|
101 |
* value to set
|
102 |
*/
|
103 |
public void setFloat(int index, float value); |
104 |
|
105 |
/**
|
106 |
* Sets the value of an attribute of type double, given its name
|
107 |
* @param name
|
108 |
* attribute's name
|
109 |
* @param value
|
110 |
* value to set
|
111 |
*/
|
112 |
public void setDouble(String name, double value); |
113 |
|
114 |
/**
|
115 |
* Sets the value of an attribute of type double, given its index
|
116 |
* @param index
|
117 |
* attribute's index
|
118 |
* @param value
|
119 |
* value to set
|
120 |
*/
|
121 |
public void setDouble(int index, double value); |
122 |
|
123 |
/**
|
124 |
* Sets the value of an attribute of type date, given its name
|
125 |
* @param name
|
126 |
* attribute's name
|
127 |
* @param value
|
128 |
* value to set
|
129 |
*/
|
130 |
public void setDate(String name, Date value); |
131 |
|
132 |
/**
|
133 |
* Sets the value of an attribute of type date, given its index
|
134 |
* @param index
|
135 |
* attribute's index
|
136 |
* @param value
|
137 |
* value to set
|
138 |
*/
|
139 |
public void setDate(int index, Date value); |
140 |
|
141 |
/**
|
142 |
* Sets the value of an attribute of type string, given its name
|
143 |
* @param name
|
144 |
* attribute's name
|
145 |
* @param value
|
146 |
* value to set
|
147 |
*/
|
148 |
public void setString(String name, String value); |
149 |
|
150 |
/**
|
151 |
* Sets the value of an attribute of type string, given its index
|
152 |
* @param index
|
153 |
* attribute's index
|
154 |
* @param value
|
155 |
* value to set
|
156 |
*/
|
157 |
public void setString(int index, String value); |
158 |
|
159 |
/**
|
160 |
* Sets the value of an attribute of type byte, given its name
|
161 |
* @param name
|
162 |
* attribute's name
|
163 |
* @param value
|
164 |
* value to set
|
165 |
*/
|
166 |
public void setByte(String name, byte value); |
167 |
|
168 |
/**
|
169 |
* Sets the value of an attribute of type byte, given its index
|
170 |
* @param index
|
171 |
* attribute's index
|
172 |
* @param value
|
173 |
* value to set
|
174 |
*/
|
175 |
public void setByte(int index, byte value); |
176 |
|
177 |
/**
|
178 |
* Sets the value of an attribute of type geometry, given its name
|
179 |
* @param name
|
180 |
* attribute's name
|
181 |
* @param value
|
182 |
* value to set
|
183 |
*/
|
184 |
public void setGeometry(String name, Geometry value); |
185 |
|
186 |
/**
|
187 |
* Sets the value of an attribute of type geometry, given its index
|
188 |
* @param index
|
189 |
* attribute's index
|
190 |
* @param value
|
191 |
* value to set
|
192 |
*/
|
193 |
public void setGeometry(int index, Geometry value); |
194 |
|
195 |
/**
|
196 |
* Sets the value of an attribute of type array, given its name
|
197 |
* @param name
|
198 |
* attribute's name
|
199 |
* @param value
|
200 |
* value to set
|
201 |
*/
|
202 |
public void setArray(String name, Object[] value); |
203 |
|
204 |
/**
|
205 |
* Sets the value of an attribute of type array, given its index
|
206 |
* @param index
|
207 |
* attribute's index
|
208 |
* @param value
|
209 |
* value to set
|
210 |
*/
|
211 |
public void setArray(int index, Object[] value); |
212 |
|
213 |
/**
|
214 |
* Sets the value of an attribute of type feature, given its name
|
215 |
* @param name
|
216 |
* attribute's name
|
217 |
* @param value
|
218 |
* value to set
|
219 |
*/
|
220 |
public void setFeature(String name, Feature value); |
221 |
|
222 |
/**
|
223 |
* Sets the value of an attribute of type feature, given its index
|
224 |
* @param index
|
225 |
* attribute's index
|
226 |
* @param value
|
227 |
* value to set
|
228 |
*/
|
229 |
public void setFeature(int index, Feature value); |
230 |
|
231 |
/**
|
232 |
* Returns the Feature from which this EditableFeature was created
|
233 |
*
|
234 |
* @return Feature from which this EditableFeature was created
|
235 |
*/
|
236 |
public Feature getSource();
|
237 |
|
238 |
/**
|
239 |
* Returns a non editable copy of the Feature.
|
240 |
*
|
241 |
* @return non editable copy of the Feature.
|
242 |
*/
|
243 |
public Feature getNotEditableCopy();
|
244 |
|
245 |
/**
|
246 |
* Sets de value of the default geometry attribute.
|
247 |
*
|
248 |
* @param value geometry to set.
|
249 |
*/
|
250 |
public void setDefaultGeometry(Geometry value); |
251 |
|
252 |
/**
|
253 |
* Copies the values of all attributes from the source feature to this feature
|
254 |
*
|
255 |
* @param source
|
256 |
* source feature from which the values will be copied.
|
257 |
*/
|
258 |
public void copyFrom(Feature source); |
259 |
|
260 |
} |