svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.api / src / main / java / org / gvsig / fmap / dal / feature / EditableFeature.java @ 44655
History | View | Annotate | Download (7.91 KB)
1 |
/**
|
---|---|
2 |
* gvSIG. Desktop Geographic Information System.
|
3 |
*
|
4 |
* Copyright (C) 2007-2013 gvSIG Association.
|
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 3
|
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 |
* For any additional information, do not hesitate to contact us
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
23 |
*/
|
24 |
package org.gvsig.fmap.dal.feature; |
25 |
|
26 |
import java.util.Date; |
27 |
import javax.json.JsonObject; |
28 |
|
29 |
import org.gvsig.fmap.geom.Geometry; |
30 |
import org.gvsig.timesupport.Instant; |
31 |
import org.gvsig.timesupport.Interval; |
32 |
|
33 |
/**
|
34 |
* This interface represents a Feature in editable state. To edit a Feature
|
35 |
* you have to obtain its instance of EditableFeature and then perform editing
|
36 |
* operations on it. Once you have completed the editing you can save the changes
|
37 |
* to the original Feature. This is the only way to edit a Feature.
|
38 |
*/
|
39 |
public interface EditableFeature extends Feature { |
40 |
|
41 |
/**
|
42 |
* Sets the value of an attribute given its name
|
43 |
* @param name
|
44 |
* attribute's name
|
45 |
* @param value
|
46 |
* value to set
|
47 |
*/
|
48 |
public void set(String name, Object value); |
49 |
|
50 |
/**
|
51 |
* Sets the value of an attribute given its index
|
52 |
* @param index
|
53 |
* attribute's index
|
54 |
* @param value
|
55 |
* value to set
|
56 |
*/
|
57 |
public void set(int index, Object value); |
58 |
|
59 |
/**
|
60 |
* Sets the value of an attribute of type integer, given its name
|
61 |
* @param name
|
62 |
* attribute's name
|
63 |
* @param value
|
64 |
* value to set
|
65 |
*/
|
66 |
public void setInt(String name, int value); |
67 |
|
68 |
/**
|
69 |
* Sets the value of an attribute of type integer, given its index
|
70 |
* @param index
|
71 |
* attribute's index
|
72 |
* @param value
|
73 |
* value to set
|
74 |
*/
|
75 |
public void setInt(int index, int value); |
76 |
|
77 |
/**
|
78 |
* Sets the value of an attribute of type boolean, given its name
|
79 |
* @param name
|
80 |
* attribute's name
|
81 |
* @param value
|
82 |
* value to set
|
83 |
*/
|
84 |
public void setBoolean(String name, boolean value); |
85 |
|
86 |
/**
|
87 |
* Sets the value of an attribute of type boolean, given its index
|
88 |
* @param index
|
89 |
* attribute's index
|
90 |
* @param value
|
91 |
* value to set
|
92 |
*/
|
93 |
public void setBoolean(int index, boolean value); |
94 |
|
95 |
/**
|
96 |
* Sets the value of an attribute of type long, given its name
|
97 |
* @param name
|
98 |
* attribute's name
|
99 |
* @param value
|
100 |
* value to set
|
101 |
*/
|
102 |
public void setLong(String name, long value); |
103 |
|
104 |
/**
|
105 |
* Sets the value of an attribute of type long, given its index
|
106 |
* @param index
|
107 |
* attribute's index
|
108 |
* @param value
|
109 |
* value to set
|
110 |
*/
|
111 |
public void setLong(int index, long value); |
112 |
|
113 |
/**
|
114 |
* Sets the value of an attribute of type float, given its name
|
115 |
* @param name
|
116 |
* attribute's name
|
117 |
* @param value
|
118 |
* value to set
|
119 |
*/
|
120 |
public void setFloat(String name, float value); |
121 |
|
122 |
/**
|
123 |
* Sets the value of an attribute of type float, given its index
|
124 |
* @param index
|
125 |
* attribute's index
|
126 |
* @param value
|
127 |
* value to set
|
128 |
*/
|
129 |
public void setFloat(int index, float value); |
130 |
|
131 |
/**
|
132 |
* Sets the value of an attribute of type double, given its name
|
133 |
* @param name
|
134 |
* attribute's name
|
135 |
* @param value
|
136 |
* value to set
|
137 |
*/
|
138 |
public void setDouble(String name, double value); |
139 |
|
140 |
/**
|
141 |
* Sets the value of an attribute of type double, given its index
|
142 |
* @param index
|
143 |
* attribute's index
|
144 |
* @param value
|
145 |
* value to set
|
146 |
*/
|
147 |
public void setDouble(int index, double value); |
148 |
|
149 |
/**
|
150 |
* Sets the value of an attribute of type date, given its name
|
151 |
* @param name
|
152 |
* attribute's name
|
153 |
* @param value
|
154 |
* value to set
|
155 |
*/
|
156 |
public void setDate(String name, Date value); |
157 |
|
158 |
/**
|
159 |
* Sets the value of an attribute of type date, given its index
|
160 |
* @param index
|
161 |
* attribute's index
|
162 |
* @param value
|
163 |
* value to set
|
164 |
*/
|
165 |
public void setDate(int index, Date value); |
166 |
|
167 |
/**
|
168 |
* Sets the value of an attribute of type string, given its name
|
169 |
* @param name
|
170 |
* attribute's name
|
171 |
* @param value
|
172 |
* value to set
|
173 |
*/
|
174 |
public void setString(String name, String value); |
175 |
|
176 |
/**
|
177 |
* Sets the value of an attribute of type string, given its index
|
178 |
* @param index
|
179 |
* attribute's index
|
180 |
* @param value
|
181 |
* value to set
|
182 |
*/
|
183 |
public void setString(int index, String value); |
184 |
|
185 |
/**
|
186 |
* Sets the value of an attribute of type byte, given its name
|
187 |
* @param name
|
188 |
* attribute's name
|
189 |
* @param value
|
190 |
* value to set
|
191 |
*/
|
192 |
public void setByte(String name, byte value); |
193 |
|
194 |
/**
|
195 |
* Sets the value of an attribute of type byte, given its index
|
196 |
* @param index
|
197 |
* attribute's index
|
198 |
* @param value
|
199 |
* value to set
|
200 |
*/
|
201 |
public void setByte(int index, byte value); |
202 |
|
203 |
/**
|
204 |
* Sets the value of an attribute of type geometry, given its name
|
205 |
* @param name
|
206 |
* attribute's name
|
207 |
* @param value
|
208 |
* value to set
|
209 |
*/
|
210 |
public void setGeometry(String name, Geometry value); |
211 |
|
212 |
/**
|
213 |
* Sets the value of an attribute of type geometry, given its index
|
214 |
* @param index
|
215 |
* attribute's index
|
216 |
* @param value
|
217 |
* value to set
|
218 |
*/
|
219 |
public void setGeometry(int index, Geometry value); |
220 |
|
221 |
/**
|
222 |
* Sets the value of an attribute of type array, given its name
|
223 |
* @param name
|
224 |
* attribute's name
|
225 |
* @param value
|
226 |
* value to set
|
227 |
*/
|
228 |
public void setArray(String name, Object[] value); |
229 |
|
230 |
/**
|
231 |
* Sets the value of an attribute of type array, given its index
|
232 |
* @param index
|
233 |
* attribute's index
|
234 |
* @param value
|
235 |
* value to set
|
236 |
*/
|
237 |
public void setArray(int index, Object[] value); |
238 |
|
239 |
/**
|
240 |
* Sets the value of an attribute of type feature, given its name
|
241 |
* @param name
|
242 |
* attribute's name
|
243 |
* @param value
|
244 |
* value to set
|
245 |
*/
|
246 |
public void setFeature(String name, Feature value); |
247 |
|
248 |
/**
|
249 |
* Sets the value of an attribute of type feature, given its index
|
250 |
* @param index
|
251 |
* attribute's index
|
252 |
* @param value
|
253 |
* value to set
|
254 |
*/
|
255 |
public void setFeature(int index, Feature value); |
256 |
|
257 |
/**
|
258 |
* Returns the Feature from which this EditableFeature was created
|
259 |
*
|
260 |
* @return Feature from which this EditableFeature was created
|
261 |
*/
|
262 |
public Feature getSource();
|
263 |
|
264 |
/**
|
265 |
* Returns a non editable copy of the Feature.
|
266 |
*
|
267 |
* @return non editable copy of the Feature.
|
268 |
*/
|
269 |
public Feature getNotEditableCopy();
|
270 |
|
271 |
/**
|
272 |
* Sets de value of the default geometry attribute.
|
273 |
*
|
274 |
* @param value geometry to set.
|
275 |
*/
|
276 |
public void setDefaultGeometry(Geometry value); |
277 |
|
278 |
/**
|
279 |
* Copies the values of all attributes from the source feature to this feature
|
280 |
*
|
281 |
* @param source
|
282 |
* source feature from which the values will be copied.
|
283 |
*/
|
284 |
public void copyFrom(Feature source); |
285 |
|
286 |
public void copyFrom(JsonObject source); |
287 |
|
288 |
/**
|
289 |
* Sets the value of an attribute of type instant, given its name
|
290 |
* @param name
|
291 |
* attribute's name
|
292 |
* @param value
|
293 |
* value to set
|
294 |
*/
|
295 |
public void setInstant(String name, Instant value); |
296 |
|
297 |
/**
|
298 |
* Sets the value of an attribute of type instant, given its index
|
299 |
* @param index
|
300 |
* attribute's index
|
301 |
* @param value
|
302 |
* value to set
|
303 |
*/
|
304 |
public void setInstant(int index, Instant value); |
305 |
|
306 |
/**
|
307 |
* Sets the value of an attribute of type interval, given its name
|
308 |
* @param name
|
309 |
* attribute's name
|
310 |
* @param value
|
311 |
* value to set
|
312 |
*/
|
313 |
public void setInterval(String name, Interval value); |
314 |
|
315 |
/**
|
316 |
* Sets the value of an attribute of type interval, given its index
|
317 |
* @param index
|
318 |
* attribute's index
|
319 |
* @param value
|
320 |
* value to set
|
321 |
*/
|
322 |
public void setInterval(int index, Interval value); |
323 |
} |