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

History | View | Annotate | Download (6.89 KB)

1
package org.gvsig.fmap.dal.feature;
2

    
3
import java.util.Date;
4

    
5
import org.gvsig.fmap.geom.Geometry;
6
import org.gvsig.timesupport.Instant;
7
import org.gvsig.timesupport.Interval;
8

    
9
/**
10
 * This interface represents a Feature in editable state. To edit a Feature
11
 * you have to obtain its instance of EditableFeature and then perform editing
12
 * operations on it. Once you have completed the editing you can save the changes
13
 * to the original Feature. This is the only way to edit a Feature.
14
 */
15
public interface EditableFeature extends Feature {
16

    
17
        /**
18
         * Sets the value of an attribute given its name
19
         * @param name
20
         *                         attribute's name
21
         * @param value
22
         *                  value to set
23
         */
24
        public void set(String name, Object value);
25

    
26
        /**
27
         * Sets the value of an attribute given its index
28
         * @param index
29
         *                         attribute's index
30
         * @param value
31
         *                  value to set
32
         */
33
        public void set(int index, Object value);
34

    
35
        /**
36
         * Sets the value of an attribute of type integer, given its name
37
         * @param name
38
         *                         attribute's name
39
         * @param value
40
         *                  value to set
41
         */
42
        public void setInt(String name, int value);
43

    
44
        /**
45
         * Sets the value of an attribute of type integer, given its index
46
         * @param index
47
         *                         attribute's index
48
         * @param value
49
         *                  value to set
50
         */
51
        public void setInt(int index, int value);
52

    
53
        /**
54
         * Sets the value of an attribute of type boolean, given its name
55
         * @param name
56
         *                         attribute's name
57
         * @param value
58
         *                  value to set
59
         */
60
        public void setBoolean(String name, boolean value);
61

    
62
        /**
63
         * Sets the value of an attribute of type boolean, given its index
64
         * @param index
65
         *                         attribute's index
66
         * @param value
67
         *                  value to set
68
         */
69
        public void setBoolean(int index, boolean value);
70

    
71
        /**
72
         * Sets the value of an attribute of type long, given its name
73
         * @param name
74
         *                         attribute's name
75
         * @param value
76
         *                  value to set
77
         */
78
        public void setLong(String name, long value);
79

    
80
        /**
81
         * Sets the value of an attribute of type long, given its index
82
         * @param index
83
         *                         attribute's index
84
         * @param value
85
         *                  value to set
86
         */
87
        public void setLong(int index, long value);
88

    
89
        /**
90
         * Sets the value of an attribute of type float, given its name
91
         * @param name
92
         *                         attribute's name
93
         * @param value
94
         *                  value to set
95
         */
96
        public void setFloat(String name, float value);
97

    
98
        /**
99
         * Sets the value of an attribute of type float, given its index
100
         * @param index
101
         *                         attribute's index
102
         * @param value
103
         *                  value to set
104
         */
105
        public void setFloat(int index, float value);
106

    
107
        /**
108
         * Sets the value of an attribute of type double, given its name
109
         * @param name
110
         *                         attribute's name
111
         * @param value
112
         *                  value to set
113
         */
114
        public void setDouble(String name, double value);
115

    
116
        /**
117
         * Sets the value of an attribute of type double, given its index
118
         * @param index
119
         *                         attribute's index
120
         * @param value
121
         *                  value to set
122
         */
123
        public void setDouble(int index, double value);
124

    
125
        /**
126
         * Sets the value of an attribute of type date, given its name
127
         * @param name
128
         *                         attribute's name
129
         * @param value
130
         *                  value to set
131
         */
132
        public void setDate(String name, Date value);
133

    
134
        /**
135
         * Sets the value of an attribute of type date, given its index
136
         * @param index
137
         *                         attribute's index
138
         * @param value
139
         *                  value to set
140
         */
141
        public void setDate(int index, Date value);
142

    
143
        /**
144
         * Sets the value of an attribute of type string, given its name
145
         * @param name
146
         *                         attribute's name
147
         * @param value
148
         *                  value to set
149
         */
150
        public void setString(String name, String value);
151

    
152
        /**
153
         * Sets the value of an attribute of type string, given its index
154
         * @param index
155
         *                         attribute's index
156
         * @param value
157
         *                  value to set
158
         */
159
        public void setString(int index, String value);
160

    
161
        /**
162
         * Sets the value of an attribute of type byte, given its name
163
         * @param name
164
         *                         attribute's name
165
         * @param value
166
         *                  value to set
167
         */
168
        public void setByte(String name, byte value);
169

    
170
        /**
171
         * Sets the value of an attribute of type byte, given its index
172
         * @param index
173
         *                         attribute's index
174
         * @param value
175
         *                  value to set
176
         */
177
        public void setByte(int index, byte value);
178

    
179
        /**
180
         * Sets the value of an attribute of type geometry, given its name
181
         * @param name
182
         *                         attribute's name
183
         * @param value
184
         *                  value to set
185
         */
186
        public void setGeometry(String name, Geometry value);
187

    
188
        /**
189
         * Sets the value of an attribute of type geometry, given its index
190
         * @param index
191
         *                         attribute's index
192
         * @param value
193
         *                  value to set
194
         */
195
        public void setGeometry(int index, Geometry value);
196

    
197
        /**
198
         * Sets the value of an attribute of type array, given its name
199
         * @param name
200
         *                         attribute's name
201
         * @param value
202
         *                  value to set
203
         */
204
        public void setArray(String name, Object[] value);
205

    
206
        /**
207
         * Sets the value of an attribute of type array, given its index
208
         * @param index
209
         *                         attribute's index
210
         * @param value
211
         *                  value to set
212
         */
213
        public void setArray(int index, Object[] value);
214

    
215
        /**
216
         * Sets the value of an attribute of type feature, given its name
217
         * @param name
218
         *                         attribute's name
219
         * @param value
220
         *                  value to set
221
         */
222
        public void setFeature(String name, Feature value);
223

    
224
        /**
225
         * Sets the value of an attribute of type feature, given its index
226
         * @param index
227
         *                         attribute's index
228
         * @param value
229
         *                  value to set
230
         */
231
        public void setFeature(int index, Feature value);
232

    
233
        /**
234
         * Returns the Feature from which this EditableFeature was created
235
         *
236
         * @return Feature from which this EditableFeature was created
237
         */
238
        public Feature getSource();
239

    
240
        /**
241
         * Returns a non editable copy of the Feature.
242
         *
243
         * @return non editable copy of the Feature.
244
         */
245
        public Feature getNotEditableCopy();
246

    
247
        /**
248
         * Sets de value of the default geometry attribute.
249
         *
250
         * @param value geometry to set.
251
         */
252
        public void setDefaultGeometry(Geometry value);
253
        
254
        /**
255
         * Copies the values of all attributes from the source feature to this feature
256
         * 
257
         * @param source
258
         *                         source feature from which the values will be copied.
259
         */
260
        public void copyFrom(Feature source);        
261
        
262
        /**
263
     * Sets the value of an attribute of type instant, given its name
264
     * @param name
265
     *          attribute's name
266
     * @param value
267
     *          value to set
268
     */
269
        public void setInstant(String name, Instant value);
270

    
271
        /**
272
     * Sets the value of an attribute of type instant, given its index
273
     * @param index
274
     *          attribute's index
275
     * @param value
276
     *          value to set
277
     */
278
        public void setInstant(int index, Instant value);  
279

    
280
        /**
281
     * Sets the value of an attribute of type interval, given its name
282
     * @param name
283
     *          attribute's name
284
     * @param value
285
     *          value to set
286
     */
287
        public void setInterval(String name, Interval value);
288

    
289
        /**
290
     * Sets the value of an attribute of type interval, given its index
291
     * @param index
292
     *          attribute's index
293
     * @param value
294
     *          value to set
295
     */
296
        public void setInterval(int index, Interval value); 
297
}