Revision 44738 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/Feature.java

View differences:

Feature.java
38 38
import org.gvsig.tools.evaluator.EvaluatorData;
39 39
import org.gvsig.tools.util.GetItemByKey;
40 40

  
41

  
42 41
/**
43
 * <p>Represents the basic data unit of a tabular structure, equivalent
44
 * to a record in a data base table. In SIG domain, a Feature is a compound
45
 * data structure that may contain a geographic component. The conventional term
46
 * Feature comes from the term cartographic feature and both represent the same
47
 * concept.
42
 * <p>
43
 * Represents the basic data unit of a tabular structure, equivalent to a record
44
 * in a data base table. In SIG domain, a Feature is a compound data structure
45
 * that may contain a geographic component. The conventional term Feature comes
46
 * from the term cartographic feature and both represent the same concept.
48 47
 * </p>
49 48
 * <p>
50
 * A Feature may contain more than one geometry attribute. In the case there is not any geometry data,
51
 * the <code>getDefaultGeometry()</code> will return <code>null</code>.
49
 * A Feature may contain more than one geometry attribute. In the case there is
50
 * not any geometry data, the <code>getDefaultGeometry()</code> will return
51
 * <code>null</code>.
52 52
 * </p>
53 53
 * <p>
54 54
 * Features are not editable as such. To edit a Feature you have to obtain an
55
 * editable instance <code>EditableFeature</code> using the method <code>getEditable()</code>.
56
 * Modify that editable instance and then apply the changes to the Feature. This
57
 * mechanism is to avoid ambiguity and loosing track on the Feature internal state.
55
 * editable instance <code>EditableFeature</code> using the method
56
 * <code>getEditable()</code>. Modify that editable instance and then apply the
57
 * changes to the Feature. This mechanism is to avoid ambiguity and loosing
58
 * track on the Feature internal state.
58 59
 * </p>
59 60
 * <br>
60
 * <p>The Feature:
61
 *   <ul>
62
 *     <li>Has an unique identifier <code>FeatureReference</code>
63
 *     to recognize our Feature from each other from the same data store</li>
64
 *     <li>Has a <code>FeatureType</code> that describes the Feature characteristics (attributes,
65
 *     data types, default geometry, validation rules).</li>
66
 *     <li>Can obtain a copy of itself.</li>
67
 *     <li>Can obtain its default geometry attribute and also a list with all the geometry attributes.</li>
68
 *     <li>Can obtain its default Spatial Reference System and also a list with all the SRSs used in the geometry attributes.</li>
69
 *     <li>Can obtain the envelope (extent) of the default geometry attribute.
70
 *     <li>Can obtain the editable instance of the Feature.</li>
71
 *     <li>Has a set of utility methods to read attributes when their type is known, by both index and name.</li>
72
 *   </ul>
61
 * <p>
62
 * The Feature:
63
 * <ul>
64
 * <li>Has an unique identifier <code>FeatureReference</code> to recognize our
65
 * Feature from each other from the same data store</li>
66
 * <li>Has a <code>FeatureType</code> that describes the Feature characteristics
67
 * (attributes, data types, default geometry, validation rules).</li>
68
 * <li>Can obtain a copy of itself.</li>
69
 * <li>Can obtain its default geometry attribute and also a list with all the
70
 * geometry attributes.</li>
71
 * <li>Can obtain its default Spatial Reference System and also a list with all
72
 * the SRSs used in the geometry attributes.</li>
73
 * <li>Can obtain the envelope (extent) of the default geometry attribute.
74
 * <li>Can obtain the editable instance of the Feature.</li>
75
 * <li>Has a set of utility methods to read attributes when their type is known,
76
 * by both index and name.</li>
77
 * </ul>
73 78
 * </p>
74 79
 *
75 80
 */
76
public interface Feature extends GetItemByKey<String, Object>{
81
public interface Feature extends GetItemByKey<String, Object> {
77 82

  
78
	/**
79
	 * Returns a unique identifier for this Feature in the associated store.
80
	 *
81
	 * @return
82
	 * 		a unique FeatureReference in the associated store
83
	 */
84
	public FeatureReference getReference();
83
  /**
84
   * Returns a unique identifier for this Feature in the associated store.
85
   *
86
   * @return a unique FeatureReference in the associated store
87
   */
88
  public FeatureReference getReference();
85 89

  
86
	/**
87
	 * Returns the FeatureType that describes the structure of this Feature.
88
	 *
89
	 * @return
90
	 * 		a FeatureType describing this Feature structure.
91
	 */
92
	public FeatureType getType();
90
  /**
91
   * Returns the FeatureType that describes the structure of this Feature.
92
   *
93
   * @return a FeatureType describing this Feature structure.
94
   */
95
  public FeatureType getType();
93 96

  
94
	/**
95
	 * Creates and returns a copy of this
96
	 *
97
	 * @return
98
	 * 		a new instance of Feature which is equal to this
99
	 */
100
	public Feature getCopy();
97
  /**
98
   * Creates and returns a copy of this
99
   *
100
   * @return a new instance of Feature which is equal to this
101
   */
102
  public Feature getCopy();
101 103

  
102
	/** Mode that indicates the validation of all FeatureRules */
103
	static final int ALL = 0;
104
  /**
105
   * Mode that indicates the validation of all FeatureRules
106
   */
107
  static final int ALL = 0;
104 108

  
105
	/** Mode that indicates the validation of the update FeatureRules */
106
	static final int UPDATE = 1;
109
  /**
110
   * Mode that indicates the validation of the update FeatureRules
111
   */
112
  static final int UPDATE = 1;
107 113

  
108
	/** Mode that indicates the validation of the finish editing FeatureRules */
109
	static final int FINISH_EDITING = 2;
114
  /**
115
   * Mode that indicates the validation of the finish editing FeatureRules
116
   */
117
  static final int FINISH_EDITING = 2;
110 118

  
111
	/**
112
	 * Validates this Feature by applying the <code>FeatureRules</code>
113
	 * corresponding to the given mode.
114
	 *
115
	 * @param mode
116
	 * 			one of the constants {ALL, UPDATE, FINISH_EDITING}
117
         * @throws DataException on validation errors
118
	 */
119
	public void validate(int mode) throws DataException;
119
  /**
120
   * Validates this Feature by applying the <code>FeatureRules</code>
121
   * corresponding to the given mode.
122
   *
123
   * @param mode one of the constants {ALL, UPDATE, FINISH_EDITING}
124
   * @throws DataException on validation errors
125
   */
126
  public void validate(int mode) throws DataException;
120 127

  
121
	/**
122
	 * Returns the editable instance of this Feature.
123
	 * EditableFeature offers methods for Feature editing.
124
	 *
125
	 * @return
126
	 * 		EditableFeature of this
127
	 */
128
	public EditableFeature getEditable();
128
  /**
129
   * Returns the editable instance of this Feature. EditableFeature offers
130
   * methods for Feature editing.
131
   *
132
   * @return EditableFeature of this
133
   */
134
  public EditableFeature getEditable();
129 135

  
130
        public Object getOrDefault(String name, Object defaultValue);
131
        public String getStringOrDefault(String name, String defaultValue);
132
        public int getIntOrDefault(String name, int defaultValue);
133
        public long getLongOrDefault(String name, long defaultValue);
134
        public float getFloatOrDefault(String name, float defaultValue);
135
        public double getDoubleOrDefault(String name, double defaultValue);
136
        public BigDecimal getDecimalOrDefault(String name, BigDecimal defaultValue);
137
        public Date getDateOrDefault(String name, Date defaultValue);
138
        
139
        public Object getOrDefault(int index, Object defaultValue);
140
        public String getStringOrDefault(int index, String defaultValue);
141
        public int getIntOrDefault(int index, int defaultValue);
142
        public long getLongOrDefault(int index, long defaultValue);
143
        public float getFloatOrDefault(int index, float defaultValue);
144
        public double getDoubleOrDefault(int index, double defaultValue);
145
        public BigDecimal getDecimalOrDefault(int index, BigDecimal defaultValue);
146
        public Date getDateOrDefault(int index, Date defaultValue);
147
        
148
        /**
149
	 * Returns the value of an attribute given its name.
150
	 *
151
	 * @param name
152
	 * 			a string containing the name of the attribute
153
	 * @return
154
	 * 		value of the specified attribute
155
	 */
156
        @Override
157
	public Object   get(String name);
136
  public Object getOrDefault(String name, Object defaultValue);
158 137

  
159
	/**
160
	 * Returns the value of an attribute given its position.
161
	 *
162
	 * @param index
163
	 * 			position of the attribute
164
	 * @return
165
	 * 		value of the specified attribute
166
	 */
167
	public Object   get(int index);
138
  public String getStringOrDefault(String name, String defaultValue);
168 139

  
169
        public boolean isNull(int index);
170
        
171
        public boolean isNull(String name);
172
        
173
	/**
174
	 * Returns the int value of an attribute given its name.
175
	 *
176
	 * @param name
177
	 * 			a string containing the name of the attribute
178
	 * @return
179
	 * 		value of the specified attribute
180
	 */
181
	public int      getInt(String name);
140
  public int getIntOrDefault(String name, int defaultValue);
182 141

  
183
	/**
184
	 * Returns the int value of an attribute given its position.
185
	 *
186
	 * @param index
187
	 * 			position of the attribute
188
	 * @return
189
	 * 		value of the specified attribute
190
	 */
191
	public int      getInt(int index);
142
  public long getLongOrDefault(String name, long defaultValue);
192 143

  
193
	/**
194
	 * Returns the Boolean value of an attribute given its name.
195
	 *
196
	 * @param name
197
	 * 			name of the attribute
198
	 * @return
199
	 * 		value of the specified attribute
200
	 */
201
	public boolean  getBoolean(String name);
144
  public float getFloatOrDefault(String name, float defaultValue);
202 145

  
203
	/**
204
	 * Returns the Boolean value of an attribute given its position.
205
	 *
206
	 * @param index
207
	 * 			position of the attribute
208
	 * @return
209
	 * 		value of the specified attribute
210
	 */
211
	public boolean  getBoolean(int index);
146
  public double getDoubleOrDefault(String name, double defaultValue);
212 147

  
213
	/**
214
	 * Returns the long value of an attribute given its name.
215
	 *
216
	 * @param name
217
	 * 			name of the attribute
218
	 * @return
219
	 * 		value of the specified attribute
220
	 */
221
	public long     getLong(String name);
148
  public BigDecimal getDecimalOrDefault(String name, BigDecimal defaultValue);
222 149

  
223
	/**
224
	 * Returns the long value of an attribute given its position.
225
	 *
226
	 * @param index
227
	 * 			position of the attribute
228
	 * @return
229
	 * 		value of the specified attribute
230
	 */
231
	public long     getLong(int index);
150
  public Date getDateOrDefault(String name, Date defaultValue);
232 151

  
233
	/**
234
	 * Returns the float value of an attribute given its name.
235
	 *
236
	 * @param name
237
	 * 			name of the attribute
238
	 * @return
239
	 * 		value of the specified attribute
240
	 */
241
	public float   getFloat(String name);
152
  public Object getOrDefault(int index, Object defaultValue);
242 153

  
243
	/**
244
	 * Returns the float value of an attribute given its position.
245
	 *
246
	 * @param index
247
	 * 			position of the attribute
248
	 * @return
249
	 * 		value of the specified attribute
250
	 */
251
	public float    getFloat(int index);
154
  public String getStringOrDefault(int index, String defaultValue);
252 155

  
253
	/**
254
	 * Returns the double value of an attribute given its name.
255
	 *
256
	 * @param name
257
	 * 			name of the attribute
258
	 * @return
259
	 * 		value of the specified attribute
260
	 */
261
	public double  getDouble(String name);
156
  public int getIntOrDefault(int index, int defaultValue);
262 157

  
263
	/**
264
	 * Returns the double value of an attribute given its position.
265
	 *
266
	 * @param index
267
	 * 			position of the attribute
268
	 * @return
269
	 * 		value of the specified attribute
270
	 */
271
	public double   getDouble(int index);
158
  public long getLongOrDefault(int index, long defaultValue);
272 159

  
273
	/**
274
	 * Returns the BigDecimal value of an attribute given its name.
275
	 *
276
	 * @param name
277
	 * 			name of the attribute
278
	 * @return
279
	 * 		value of the specified attribute
280
	 */
281
	public BigDecimal getDecimal(String name);
160
  public float getFloatOrDefault(int index, float defaultValue);
282 161

  
283
	/**
284
	 * Returns the BigDecimal value of an attribute given its position.
285
	 *
286
	 * @param index
287
	 * 			position of the attribute
288
	 * @return
289
	 * 		value of the specified attribute
290
	 */
291
	public BigDecimal getDecimal(int index);
162
  public double getDoubleOrDefault(int index, double defaultValue);
292 163

  
293
	/**
294
	 * Returns the Date value of an attribute given its name.
295
	 *
296
	 * @param name
297
	 * 			name of the attribute
298
	 * @return
299
	 * 		value of the specified attribute
300
	 */
301
	public Date    getDate(String name);
164
  public BigDecimal getDecimalOrDefault(int index, BigDecimal defaultValue);
302 165

  
303
	/**
304
	 * Returns the Date value of an attribute given its position.
305
	 *
306
	 * @param index
307
	 * 			position of the attribute
308
	 * @return
309
	 * 		value of the specified attribute
310
	 */
311
	public Date     getDate(int index);
166
  public Date getDateOrDefault(int index, Date defaultValue);
312 167

  
313
	/**
314
	 * Returns the String value of an attribute given its name.
315
	 *
316
	 * @param name
317
	 * 			name of the attribute
318
	 * @return
319
	 * 		value of the specified attribute
320
	 */
321
	public String  getString(String name);
168
  /**
169
   * Returns the value of an attribute given its name.
170
   *
171
   * @param name a string containing the name of the attribute
172
   * @return value of the specified attribute
173
   */
174
  @Override
175
  public Object get(String name);
322 176

  
323
	/**
324
	 * Returns the String value of an attribute given its position.
325
	 *
326
	 * @param index
327
	 * 			position of the attribute
328
	 * @return
329
	 * 		value of the specified attribute
330
	 */
331
	public String   getString(int index);
177
  /**
178
   * Returns the value of an attribute given its position.
179
   *
180
   * @param index position of the attribute
181
   * @return value of the specified attribute
182
   */
183
  public Object get(int index);
332 184

  
333
	/**
334
	 * Returns the byte value of an attribute given its name.
335
	 *
336
	 * @param name
337
	 * 			name of the attribute
338
	 * @return
339
	 * 		value of the specified attribute
340
	 */
341
	public byte    getByte(String name);
185
  public boolean isNull(int index);
342 186

  
343
	/**
344
	 * Returns the byte value of an attribute given its position.
345
	 *
346
	 * @param index
347
	 * 			position of the attribute
348
	 * @return
349
	 * 		value of the specified attribute
350
	 */
351
	public byte     getByte(int index);
187
  public boolean isNull(String name);
352 188

  
353
	/**
354
	 * Returns the Geometry value of an attribute given its name.
355
	 *
356
	 * @param name
357
	 * 			name of the attribute
358
	 * @return
359
	 * 		value of the specified attribute
360
	 */
361
	public Geometry getGeometry(String name);
189
  /**
190
   * Returns the int value of an attribute given its name.
191
   *
192
   * @param name a string containing the name of the attribute
193
   * @return value of the specified attribute
194
   */
195
  public int getInt(String name);
362 196

  
363
	/**
364
	 * Returns the Geometry value of an attribute given its position.
365
	 *
366
	 * @param index
367
	 * 			position of the attribute
368
	 * @return
369
	 * 		value of the specified attribute
370
	 */
371
	public Geometry getGeometry(int index);
197
  /**
198
   * Returns the int value of an attribute given its position.
199
   *
200
   * @param index position of the attribute
201
   * @return value of the specified attribute
202
   */
203
  public int getInt(int index);
372 204

  
373
	public byte[] getByteArray(String name);
205
  /**
206
   * Returns the Boolean value of an attribute given its name.
207
   *
208
   * @param name name of the attribute
209
   * @return value of the specified attribute
210
   */
211
  public boolean getBoolean(String name);
374 212

  
375
	public byte[] getByteArray(int index);
213
  /**
214
   * Returns the Boolean value of an attribute given its position.
215
   *
216
   * @param index position of the attribute
217
   * @return value of the specified attribute
218
   */
219
  public boolean getBoolean(int index);
376 220

  
377
        /**
378
	 * Returns the array value of an attribute given its name.
379
	 *
380
	 * @param name
381
	 * 			name of the attribute
382
	 * @return
383
	 * 		value of the specified attribute
384
	 */
385
	public Object[] getArray(String name);
221
  /**
222
   * Returns the long value of an attribute given its name.
223
   *
224
   * @param name name of the attribute
225
   * @return value of the specified attribute
226
   */
227
  public long getLong(String name);
386 228

  
387
	/**
388
	 * Returns the array value of an attribute given its position.
389
	 *
390
	 * @param index
391
	 * 			position of the attribute
392
	 * @return
393
	 * 		value of the specified attribute
394
	 */
395
	public Object[] getArray(int index);
229
  /**
230
   * Returns the long value of an attribute given its position.
231
   *
232
   * @param index position of the attribute
233
   * @return value of the specified attribute
234
   */
235
  public long getLong(int index);
396 236

  
397
	/**
398
	 * Returns the Feature value of an attribute given its name.
399
	 *
400
	 * @param name
401
	 * 			name of the attribute
402
	 * @return
403
	 * 		value of the specified attribute
404
	 */
405
	public Feature  getFeature(String name);
237
  /**
238
   * Returns the float value of an attribute given its name.
239
   *
240
   * @param name name of the attribute
241
   * @return value of the specified attribute
242
   */
243
  public float getFloat(String name);
406 244

  
407
	/**
408
	 * Returns the Feature value of an attribute given its position.
409
	 *
410
	 * @param index
411
	 * 			position of the attribute
412
	 * @return
413
	 * 		value of the specified attribute
414
	 */
415
	public Feature  getFeature(int index);
245
  /**
246
   * Returns the float value of an attribute given its position.
247
   *
248
   * @param index position of the attribute
249
   * @return value of the specified attribute
250
   */
251
  public float getFloat(int index);
416 252

  
253
  /**
254
   * Returns the double value of an attribute given its name.
255
   *
256
   * @param name name of the attribute
257
   * @return value of the specified attribute
258
   */
259
  public double getDouble(String name);
417 260

  
418
        public Object getFromProfile(int index);
419
        
420
        public Object getFromProfile(String name);
421
        
422
	/**
423
	 * Envelope (AKA extent or bounding box) of the default
424
	 * geometry attribute.
425
	 *
426
	 * @return Envelope
427
	 * 				of the default geometry attribute
428
	 */
429
	public Envelope getDefaultEnvelope();
261
  /**
262
   * Returns the double value of an attribute given its position.
263
   *
264
   * @param index position of the attribute
265
   * @return value of the specified attribute
266
   */
267
  public double getDouble(int index);
430 268

  
431
	/**
432
	 * Returns the value of the default geometry attribute,
433
	 * which is a {@link Geometry}.
434
	 *
435
	 * @return
436
	 * 		value of the default geometry attribute
437
	 */
438
	public Geometry getDefaultGeometry();
269
  /**
270
   * Returns the BigDecimal value of an attribute given its name.
271
   *
272
   * @param name name of the attribute
273
   * @return value of the specified attribute
274
   */
275
  public BigDecimal getDecimal(String name);
439 276

  
440
	/**
441
	 * Returns a list with the values of this Feature's
442
	 * geometry attributes.
443
	 *
444
	 * @return
445
	 * 		a list with the values of this Feature's geometry attributes
446
	 */
447
	public List getGeometries();
277
  /**
278
   * Returns the BigDecimal value of an attribute given its position.
279
   *
280
   * @param index position of the attribute
281
   * @return value of the specified attribute
282
   */
283
  public BigDecimal getDecimal(int index);
448 284

  
449
	/**
450
	 * Returns the Spatial Reference System in which is
451
	 * expressed the default geometry attribute.
452
	 *
453
	 * @return
454
	 * 		A string containing the default geometry attribute SRS.
455
	 */
456
	public IProjection getDefaultSRS();
285
  /**
286
   * Returns the Date value of an attribute given its name.
287
   *
288
   * @param name name of the attribute
289
   * @return value of the specified attribute
290
   */
291
  public Date getDate(String name);
457 292

  
458
	/**
459
	 * Returns a list with the Spatial Reference Systems in which
460
	 * are expressed this Feature's geometry attributes.
461
	 *
462
	 * @return
463
	 * 		a list with the Spatial Reference Systems.
464
	 */
465
	public List getSRSs();
466
	
467
        
468
	public Time getDefaultTime();
469
	
470
    	public Time getTime(int index);
471
        
472
    	public Time getTime(String name);
473
        
474
    /**
475
     * Returns the instant value of an attribute given its position.
476
     *
477
     * @param index
478
     *          position of the attribute
479
     * @return
480
     *      value of the specified attribute
481
     */
482
	public Instant getInstant(int index);
293
  /**
294
   * Returns the Date value of an attribute given its position.
295
   *
296
   * @param index position of the attribute
297
   * @return value of the specified attribute
298
   */
299
  public Date getDate(int index);
483 300

  
484
	/**
485
     * Returns the instant value of an attribute given its name.
486
     *
487
     * @param name
488
     *          a string containing the name of the attribute
489
     * @return
490
     *      value of the specified attribute
491
     */
492
	public Instant getInstant(String name);
301
  /**
302
   * Returns the String value of an attribute given its name.
303
   *
304
   * @param name name of the attribute
305
   * @return value of the specified attribute
306
   */
307
  public String getString(String name);
493 308

  
494
    /**
495
     * Returns the interval value of an attribute given its position.
496
     *
497
     * @param index
498
     *          position of the attribute
499
     * @return
500
     *      value of the specified attribute
501
     */
502
	public Interval getInterval(int index);
309
  /**
310
   * Returns the String value of an attribute given its position.
311
   *
312
   * @param index position of the attribute
313
   * @return value of the specified attribute
314
   */
315
  public String getString(int index);
503 316

  
504
	/**
505
     * Returns the interval value of an attribute given its name.
506
     *
507
     * @param name
508
     *          a string containing the name of the attribute
509
     * @return
510
     *      value of the specified attribute
511
     */
512
	public Interval getInterval(String name);
317
  /**
318
   * Returns the byte value of an attribute given its name.
319
   *
320
   * @param name name of the attribute
321
   * @return value of the specified attribute
322
   */
323
  public byte getByte(String name);
513 324

  
514
	public DynObject getAsDynObject();
515
	
516
	/**
517
	 * This lets Feature be used eaily with {@link Evaluator}
518
	 * 
519
	 * @return
520
	 *     An instance of {@link EvaluatorData} which returns the data
521
	 *     of this feature
522
	 */
523
	public EvaluatorData getEvaluatorData();
524
        
525
        /**
526
         * Return the store associated to this feature.
527
         * 
528
         * @return the FeatureStore of the feature.
529
         */
530
        public FeatureStore getStore();
325
  /**
326
   * Returns the byte value of an attribute given its position.
327
   *
328
   * @param index position of the attribute
329
   * @return value of the specified attribute
330
   */
331
  public byte getByte(int index);
531 332

  
532
        public String getLabelOfValue(String name);
333
  /**
334
   * Returns the Geometry value of an attribute given its name.
335
   *
336
   * @param name name of the attribute
337
   * @return value of the specified attribute
338
   */
339
  public Geometry getGeometry(String name);
533 340

  
534
        public Object getExtraValue(int index);
535
        
536
        public Object getExtraValue(String name);
341
  /**
342
   * Returns the Geometry value of an attribute given its position.
343
   *
344
   * @param index position of the attribute
345
   * @return value of the specified attribute
346
   */
347
  public Geometry getGeometry(int index);
537 348

  
349
  public byte[] getByteArray(String name);
350

  
351
  public byte[] getByteArray(int index);
352

  
353
  /**
354
   * Returns the array value of an attribute given its name.
355
   *
356
   * @param name name of the attribute
357
   * @return value of the specified attribute
358
   */
359
  public Object[] getArray(String name);
360

  
361
  /**
362
   * Returns the array value of an attribute given its position.
363
   *
364
   * @param index position of the attribute
365
   * @return value of the specified attribute
366
   */
367
  public Object[] getArray(int index);
368

  
369
  /**
370
   * Returns the Feature value of an attribute given its name.
371
   *
372
   * @param name name of the attribute
373
   * @return value of the specified attribute
374
   */
375
  public Feature getFeature(String name);
376

  
377
  /**
378
   * Returns the Feature value of an attribute given its position.
379
   *
380
   * @param index position of the attribute
381
   * @return value of the specified attribute
382
   */
383
  public Feature getFeature(int index);
384

  
385
  public Object getFromProfile(int index);
386

  
387
  public Object getFromProfile(String name);
388

  
389
  /**
390
   * Envelope (AKA extent or bounding box) of the default geometry attribute.
391
   *
392
   * @return Envelope of the default geometry attribute
393
   */
394
  public Envelope getDefaultEnvelope();
395

  
396
  /**
397
   * Returns the value of the default geometry attribute, which is a
398
   * {@link Geometry}.
399
   *
400
   * @return value of the default geometry attribute
401
   */
402
  public Geometry getDefaultGeometry();
403

  
404
  /**
405
   * Returns a list with the values of this Feature's geometry attributes.
406
   *
407
   * @return a list with the values of this Feature's geometry attributes
408
   */
409
  public List getGeometries();
410

  
411
  /**
412
   * Returns the Spatial Reference System in which is expressed the default
413
   * geometry attribute.
414
   *
415
   * @return A string containing the default geometry attribute SRS.
416
   */
417
  public IProjection getDefaultSRS();
418

  
419
  /**
420
   * Returns a list with the Spatial Reference Systems in which are expressed
421
   * this Feature's geometry attributes.
422
   *
423
   * @return a list with the Spatial Reference Systems.
424
   */
425
  public List getSRSs();
426

  
427
  public Time getDefaultTime();
428

  
429
  public Time getTime(int index);
430

  
431
  public Time getTime(String name);
432

  
433
  /**
434
   * Returns the instant value of an attribute given its position.
435
   *
436
   * @param index position of the attribute
437
   * @return value of the specified attribute
438
   */
439
  public Instant getInstant(int index);
440

  
441
  /**
442
   * Returns the instant value of an attribute given its name.
443
   *
444
   * @param name a string containing the name of the attribute
445
   * @return value of the specified attribute
446
   */
447
  public Instant getInstant(String name);
448

  
449
  /**
450
   * Returns the interval value of an attribute given its position.
451
   *
452
   * @param index position of the attribute
453
   * @return value of the specified attribute
454
   */
455
  public Interval getInterval(int index);
456

  
457
  /**
458
   * Returns the interval value of an attribute given its name.
459
   *
460
   * @param name a string containing the name of the attribute
461
   * @return value of the specified attribute
462
   */
463
  public Interval getInterval(String name);
464

  
465
  public DynObject getAsDynObject();
466

  
467
  /**
468
   * This lets Feature be used eaily with {@link Evaluator}
469
   *
470
   * @return An instance of {@link EvaluatorData} which returns the data of this
471
   * feature
472
   */
473
  public EvaluatorData getEvaluatorData();
474

  
475
  /**
476
   * Return the store associated to this feature.
477
   *
478
   * @return the FeatureStore of the feature.
479
   */
480
  public FeatureStore getStore();
481

  
482
  public String getLabelOfValue(String name);
483

  
484
  public Object getExtraValue(int index);
485

  
486
  public Object getExtraValue(String name);
487

  
488
  public boolean hasExtraValue(String name);
538 489
}

Also available in: Unified diff