Statistics
| Revision:

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 @ 40559

History | View | Annotate | Download (7.83 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

    
28
import org.gvsig.fmap.geom.Geometry;
29
import org.gvsig.timesupport.Instant;
30
import org.gvsig.timesupport.Interval;
31

    
32
/**
33
 * This interface represents a Feature in editable state. To edit a Feature
34
 * you have to obtain its instance of EditableFeature and then perform editing
35
 * operations on it. Once you have completed the editing you can save the changes
36
 * to the original Feature. This is the only way to edit a Feature.
37
 */
38
public interface EditableFeature extends Feature {
39

    
40
        /**
41
         * Sets the value of an attribute given its name
42
         * @param name
43
         *                         attribute's name
44
         * @param value
45
         *                  value to set
46
         */
47
        public void set(String name, Object value);
48

    
49
        /**
50
         * Sets the value of an attribute given its index
51
         * @param index
52
         *                         attribute's index
53
         * @param value
54
         *                  value to set
55
         */
56
        public void set(int index, Object value);
57

    
58
        /**
59
         * Sets the value of an attribute of type integer, given its name
60
         * @param name
61
         *                         attribute's name
62
         * @param value
63
         *                  value to set
64
         */
65
        public void setInt(String name, int value);
66

    
67
        /**
68
         * Sets the value of an attribute of type integer, given its index
69
         * @param index
70
         *                         attribute's index
71
         * @param value
72
         *                  value to set
73
         */
74
        public void setInt(int index, int value);
75

    
76
        /**
77
         * Sets the value of an attribute of type boolean, given its name
78
         * @param name
79
         *                         attribute's name
80
         * @param value
81
         *                  value to set
82
         */
83
        public void setBoolean(String name, boolean value);
84

    
85
        /**
86
         * Sets the value of an attribute of type boolean, given its index
87
         * @param index
88
         *                         attribute's index
89
         * @param value
90
         *                  value to set
91
         */
92
        public void setBoolean(int index, boolean value);
93

    
94
        /**
95
         * Sets the value of an attribute of type long, given its name
96
         * @param name
97
         *                         attribute's name
98
         * @param value
99
         *                  value to set
100
         */
101
        public void setLong(String name, long value);
102

    
103
        /**
104
         * Sets the value of an attribute of type long, given its index
105
         * @param index
106
         *                         attribute's index
107
         * @param value
108
         *                  value to set
109
         */
110
        public void setLong(int index, long value);
111

    
112
        /**
113
         * Sets the value of an attribute of type float, given its name
114
         * @param name
115
         *                         attribute's name
116
         * @param value
117
         *                  value to set
118
         */
119
        public void setFloat(String name, float value);
120

    
121
        /**
122
         * Sets the value of an attribute of type float, given its index
123
         * @param index
124
         *                         attribute's index
125
         * @param value
126
         *                  value to set
127
         */
128
        public void setFloat(int index, float value);
129

    
130
        /**
131
         * Sets the value of an attribute of type double, given its name
132
         * @param name
133
         *                         attribute's name
134
         * @param value
135
         *                  value to set
136
         */
137
        public void setDouble(String name, double value);
138

    
139
        /**
140
         * Sets the value of an attribute of type double, given its index
141
         * @param index
142
         *                         attribute's index
143
         * @param value
144
         *                  value to set
145
         */
146
        public void setDouble(int index, double value);
147

    
148
        /**
149
         * Sets the value of an attribute of type date, given its name
150
         * @param name
151
         *                         attribute's name
152
         * @param value
153
         *                  value to set
154
         */
155
        public void setDate(String name, Date value);
156

    
157
        /**
158
         * Sets the value of an attribute of type date, given its index
159
         * @param index
160
         *                         attribute's index
161
         * @param value
162
         *                  value to set
163
         */
164
        public void setDate(int index, Date value);
165

    
166
        /**
167
         * Sets the value of an attribute of type string, given its name
168
         * @param name
169
         *                         attribute's name
170
         * @param value
171
         *                  value to set
172
         */
173
        public void setString(String name, String value);
174

    
175
        /**
176
         * Sets the value of an attribute of type string, given its index
177
         * @param index
178
         *                         attribute's index
179
         * @param value
180
         *                  value to set
181
         */
182
        public void setString(int index, String value);
183

    
184
        /**
185
         * Sets the value of an attribute of type byte, given its name
186
         * @param name
187
         *                         attribute's name
188
         * @param value
189
         *                  value to set
190
         */
191
        public void setByte(String name, byte value);
192

    
193
        /**
194
         * Sets the value of an attribute of type byte, given its index
195
         * @param index
196
         *                         attribute's index
197
         * @param value
198
         *                  value to set
199
         */
200
        public void setByte(int index, byte value);
201

    
202
        /**
203
         * Sets the value of an attribute of type geometry, given its name
204
         * @param name
205
         *                         attribute's name
206
         * @param value
207
         *                  value to set
208
         */
209
        public void setGeometry(String name, Geometry value);
210

    
211
        /**
212
         * Sets the value of an attribute of type geometry, given its index
213
         * @param index
214
         *                         attribute's index
215
         * @param value
216
         *                  value to set
217
         */
218
        public void setGeometry(int index, Geometry value);
219

    
220
        /**
221
         * Sets the value of an attribute of type array, given its name
222
         * @param name
223
         *                         attribute's name
224
         * @param value
225
         *                  value to set
226
         */
227
        public void setArray(String name, Object[] value);
228

    
229
        /**
230
         * Sets the value of an attribute of type array, given its index
231
         * @param index
232
         *                         attribute's index
233
         * @param value
234
         *                  value to set
235
         */
236
        public void setArray(int index, Object[] value);
237

    
238
        /**
239
         * Sets the value of an attribute of type feature, given its name
240
         * @param name
241
         *                         attribute's name
242
         * @param value
243
         *                  value to set
244
         */
245
        public void setFeature(String name, Feature value);
246

    
247
        /**
248
         * Sets the value of an attribute of type feature, given its index
249
         * @param index
250
         *                         attribute's index
251
         * @param value
252
         *                  value to set
253
         */
254
        public void setFeature(int index, Feature value);
255

    
256
        /**
257
         * Returns the Feature from which this EditableFeature was created
258
         *
259
         * @return Feature from which this EditableFeature was created
260
         */
261
        public Feature getSource();
262

    
263
        /**
264
         * Returns a non editable copy of the Feature.
265
         *
266
         * @return non editable copy of the Feature.
267
         */
268
        public Feature getNotEditableCopy();
269

    
270
        /**
271
         * Sets de value of the default geometry attribute.
272
         *
273
         * @param value geometry to set.
274
         */
275
        public void setDefaultGeometry(Geometry value);
276
        
277
        /**
278
         * Copies the values of all attributes from the source feature to this feature
279
         * 
280
         * @param source
281
         *                         source feature from which the values will be copied.
282
         */
283
        public void copyFrom(Feature source);        
284
        
285
        /**
286
     * Sets the value of an attribute of type instant, given its name
287
     * @param name
288
     *          attribute's name
289
     * @param value
290
     *          value to set
291
     */
292
        public void setInstant(String name, Instant value);
293

    
294
        /**
295
     * Sets the value of an attribute of type instant, given its index
296
     * @param index
297
     *          attribute's index
298
     * @param value
299
     *          value to set
300
     */
301
        public void setInstant(int index, Instant value);  
302

    
303
        /**
304
     * Sets the value of an attribute of type interval, given its name
305
     * @param name
306
     *          attribute's name
307
     * @param value
308
     *          value to set
309
     */
310
        public void setInterval(String name, Interval value);
311

    
312
        /**
313
     * Sets the value of an attribute of type interval, given its index
314
     * @param index
315
     *          attribute's index
316
     * @param value
317
     *          value to set
318
     */
319
        public void setInterval(int index, Interval value); 
320
}