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 / FeatureStore.java @ 43056

History | View | Annotate | Download (27.3 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.Iterator;
27
import java.util.List;
28

    
29
import org.cresques.cts.IProjection;
30

    
31
import org.gvsig.fmap.dal.DataServerExplorer;
32
import org.gvsig.fmap.dal.DataStore;
33
import org.gvsig.fmap.dal.DataStoreParameters;
34
import org.gvsig.fmap.dal.ExpressionBuilder;
35
import org.gvsig.fmap.dal.exception.CreateException;
36
import org.gvsig.fmap.dal.exception.DataException;
37
import org.gvsig.fmap.dal.exception.ReadException;
38
import org.gvsig.fmap.dal.feature.exception.FeatureIndexException;
39
import org.gvsig.fmap.dal.feature.exception.NeedEditingModeException;
40
import org.gvsig.fmap.geom.Geometry;
41
import org.gvsig.fmap.geom.primitive.Envelope;
42
import org.gvsig.tools.dispose.DisposableIterator;
43
import org.gvsig.tools.dynobject.DynObject;
44
import org.gvsig.tools.lang.Cloneable;
45
import org.gvsig.tools.observer.Observer;
46
import org.gvsig.tools.undo.UndoRedoStack;
47

    
48
/**
49
 * <p>
50
 * A FeatureStore is a type of store whose data consists on sets of
51
 * {@link Feature}(s). {@link Feature}(s) from the same FeatureStore can be of
52
 * different {@link FeatureType}(s) (as in GML format for instance).
53
 * </p>
54
 *
55
 * <p>
56
 * FeatureStore allows:
57
 * </p>
58
 * <ul>
59
 * <li>Obtaining the default {@link FeatureType}. A FeatureStore always has one
60
 * and only one default FeatureType.
61
 * <li>Obtaining the list of {@link FeatureType}(s) defined in the FeatureStore.
62
 * <li>Obtaining, filtering and sorting subsets of data ({@link FeatureSet})
63
 * through {@link FeatureQuery}, as well as background loading.
64
 * <li>Obtaining the total {@link Envelope} (AKA bounding box or extent) of the
65
 * store.
66
 * <li>Support for editing {@link FeatureType}(s).
67
 * <li>Obtaining information about contained {@link Geometry} types.
68
 * <li>Exporting to another store.
69
 * <li>Indexing.
70
 * <li>Selection.
71
 * <li>Locks management.
72
 * </ul>
73
 *
74
 */
75
public interface FeatureStore extends DataStore, UndoRedoStack, Cloneable {
76

    
77
    public static final String METADATA_DEFINITION_NAME = "FeatureStore";
78

    
79
    /** Indicates that this store is in query mode */
80
    final static int MODE_QUERY = 0;
81

    
82
    /** Indicates that this store is in full edit mode */
83
    final static int MODE_FULLEDIT = 1;
84

    
85
    /** Indicates that this store is in append mode */
86
    final static int MODE_APPEND = 2;
87

    
88
    /*
89
     * =============================================================
90
     *
91
     * information related services
92
     */
93

    
94
    /**
95
     * Indicates whether this store allows writing.
96
     *
97
     * @return
98
     *         true if this store can be written, false if not.
99
     */
100
    public boolean allowWrite();
101

    
102
    /**
103
     * Returns this store's default {@link FeatureType}.
104
     *
105
     * @return
106
     *         this store's default {@link FeatureType}.
107
     *
108
     * @throws DataException
109
     */
110
    public FeatureType getDefaultFeatureType() throws DataException;
111

    
112
    /**
113
     * Returns this store's featureType {@link FeatureType} matches with
114
     * featureTypeId.
115
     *
116
     * @param featureTypeId
117
     *
118
     * @return this store's default {@link FeatureType}.
119
     *
120
     * @throws DataException
121
     */
122
    public FeatureType getFeatureType(String featureTypeId)
123
        throws DataException;
124

    
125
    /**
126
     * Returns this store's {@link FeatureType}(s).
127
     *
128
     * @return a list with this store's {@link FeatureType}(s).
129
     *
130
     * @throws DataException
131
     */
132
    public List getFeatureTypes() throws DataException;
133

    
134
    /**
135
     * Returns this store's parameters.
136
     *
137
     * @return
138
     *         {@link DataStoreParameters} containing this store's parameters
139
     */
140
    public DataStoreParameters getParameters();
141

    
142
    /**
143
     *@throws DataException
144
     * @deprecated Mirar de cambiarlo a metadatos
145
     */
146
    public boolean canWriteGeometry(int gvSIGgeometryType) throws DataException;
147

    
148
    /**
149
     * Returns this store's total envelope (extent).
150
     *
151
     * @return this store's total envelope (extent) or <code>null</code> if
152
     *         store not have geometry information
153
     */
154
    public Envelope getEnvelope() throws DataException;
155

    
156
    /**
157
     *
158
     * @deprecated use getDefaultFeatureType().getDefaultSRS()
159
     * @return
160
     * @throws DataException
161
     */
162
    public IProjection getSRSDefaultGeometry() throws DataException;
163

    
164
    /**
165
     * Exports this store to another store.
166
     *
167
     * @param explorer
168
     *            {@link DataServerExplorer} target
169
     * @param params
170
     *            New parameters of this store that will be used on the target
171
     *            explorer
172
     *
173
     * @throws DataException
174
     *
175
     * @Deprecated this method is unstable
176
     */
177
    public void export(DataServerExplorer explorer, String provider,
178
        NewFeatureStoreParameters params) throws DataException;
179

    
180
    /*
181
     * =============================================================
182
     *
183
     * Query related services
184
     */
185

    
186
    /**
187
     * Returns all available features in the store.
188
     * <p>
189
     * <em>
190
     * <strong>NOTE:</strong> if you use this method to get a
191
     * {@link FeatureSet}, you  must get sure it is disposed
192
     * (@see {@link DisposableIterator#dispose()}) in any case, even if an
193
     * error occurs while getting the data. It is recommended to use the
194
     * <code>accept</code> methods instead, which handle everything for you.
195
     * Take into account the accept methods may use a fast iterator to
196
     * get the features.
197
     * </em>
198
     * </p>
199
     *
200
     * @see #accept(org.gvsig.tools.visitor.Visitor)
201
     *
202
     * @return a collection of features
203
     * @throws ReadException
204
     *             if there is any error while reading the features
205
     */
206
    FeatureSet getFeatureSet() throws DataException;
207

    
208
    /**
209
     * Returns a subset of features taking into account the properties and
210
     * restrictions of the FeatureQuery.
211
     * <p>
212
     * <em>
213
     * <strong>NOTE:</strong> if you use this method to get a
214
     * {@link FeatureSet}, you  must get sure it is disposed
215
     * (@see {@link DisposableIterator#dispose()}) in any case, even if an
216
     * error occurs while getting the data. It is recommended to use the
217
     * <code>accept</code> methods instead, which handle everything for you.
218
     * Take into account the accept methods may use a fast iterator to
219
     * get the features.
220
     * </em>
221
     * </p>
222
     *
223
     * @see #accept(org.gvsig.tools.visitor.Visitor,
224
     *      org.gvsig.fmap.dal.DataQuery)
225
     *
226
     * @param featureQuery
227
     *            defines the characteristics of the features to return
228
     * @return a collection of features
229
     * @throws ReadException
230
     *             if there is any error while reading the features
231
     */
232
    FeatureSet getFeatureSet(FeatureQuery featureQuery) throws DataException;
233

    
234
    /**
235
     * Loads a subset of features taking into account the properties and
236
     * restrictions of the FeatureQuery. Feature loading is performed by calling
237
     * the Observer, once each loaded Feature.
238
     *
239
     * @param featureQuery
240
     *            defines the characteristics of the features to return
241
     * @param observer
242
     *            to be notified of each loaded Feature
243
     * @throws DataException
244
     *             if there is any error while loading the features
245
     */
246
    void getFeatureSet(FeatureQuery featureQuery, Observer observer)
247
        throws DataException;
248

    
249
    /**
250
     * Loads all available feature in the store. The loading of Features is
251
     * performed by calling the Observer, once each loaded Feature.
252
     *
253
     * @param observer
254
     *            to be notified of each loaded Feature
255
     * @throws DataException
256
     *             if there is any error while loading the features
257
     */
258
    void getFeatureSet(Observer observer) throws DataException;
259

    
260
    /**
261
     * Return a paginated list of Features filtered by the query.
262
     * 
263
     * The returned List of Features is paginated, and the page size
264
     * used is "pageSize".
265
     * 
266
     * @param query to filter the returned feature list
267
     * @param pageSize the page size of the list
268
     * @return the list of features
269
     */
270
    public List<Feature> getFeatures(FeatureQuery query, int pageSize);
271
    
272
    public List<Feature> getFeatures();
273
    
274
    /**
275
     * Returns the feature given its reference.
276
     *
277
     * @param reference
278
     *            a unique FeatureReference
279
     * @return
280
     *         The Feature
281
     *
282
     * @throws DataException
283
     *
284
     */
285
    public Feature getFeatureByReference(FeatureReference reference)
286
        throws DataException;
287

    
288
    /**
289
     * Returns the feature given its reference and feature type.
290
     *
291
     * @param reference
292
     *            a unique FeatureReference
293
     *
294
     * @param featureType
295
     *            FeatureType to which the requested Feature belongs
296
     *
297
     * @return
298
     *         The Feature
299
     *
300
     * @throws DataException
301
     *
302
     */
303
    public Feature getFeatureByReference(FeatureReference reference,
304
        FeatureType featureType) throws DataException;
305

    
306
    /*
307
     * =============================================================
308
     *
309
     * Editing related services
310
     */
311

    
312
    /**
313
     * Enters editing state.
314
     */
315
    public void edit() throws DataException;
316

    
317
    /**
318
     * Enters editing state specifying the editing mode.
319
     *
320
     * @param mode
321
     *
322
     * @throws DataException
323
     */
324
    public void edit(int mode) throws DataException;
325

    
326
    /**
327
     * Cancels all editing since the last edit().
328
     *
329
     * @throws DataException
330
     */
331
    public void cancelEditing() throws DataException;
332

    
333
    /**
334
     * Exits editing state.
335
     *
336
     * @throws DataException
337
     */
338
    public void finishEditing() throws DataException;
339

    
340
    /**
341
     * Save changes in the provider without leaving the edit mode.
342
     * Do not call observers to communicate a change of ediding mode.
343
     * The operation's history is eliminated to prevent inconsistencies
344
     * in the data.
345
     *
346
     * @throws DataException
347
     */
348
    public void commitChanges() throws DataException ;
349

    
350
    /**
351
     *
352
     * Returns true if you can call CommitChanges method.
353
     * If not in editing or changes have been made in the structure
354
     * return false.
355
     *
356
     * @return true if can call commitChanges
357
     * @throws DataException
358
     */
359
    public boolean canCommitChanges() throws DataException;
360

    
361

    
362
    /**
363
     * Indicates whether this store is in editing state.
364
     *
365
     * @return
366
     *         true if this store is in editing state, false if not.
367
     */
368
    public boolean isEditing();
369

    
370
    /**
371
     * Indicates whether this store is in appending state. In this state the new
372
     * features are automatically inserted at the end of the {@link FeatureSet}.
373
     *
374
     * @return true if this store is in appending state.
375
     */
376
    public boolean isAppending();
377

    
378
    /**
379
     * Updates a {@link FeatureType} in the store with the changes in the
380
     * {@link EditableFeatureType}.<br>
381
     *
382
     * Any {@link FeatureSet} from this store that are used will be invalidated.
383
     *
384
     * @param featureType
385
     *            an {@link EditableFeatureType} with the changes.
386
     *
387
     * @throws DataException
388
     */
389
    public void update(EditableFeatureType featureType) throws DataException;
390

    
391
    /**
392
     * Updates a {@link Feature} in the store with the changes in the
393
     * {@link EditableFeature}.<br>
394
     *
395
     * Any {@link FeatureSet} from this store that was still in use will be
396
     * invalidated. You can override this using
397
     * {@link FeatureSet#update(EditableFeature)}.
398
     *
399
     * @param feature
400
     *            the feature to be updated
401
     *
402
     * @throws DataException
403
     */
404
    public void update(EditableFeature feature) throws DataException;
405

    
406
    /**
407
     * Deletes a {@link Feature} from the store.<br>
408
     *
409
     * Any {@link FeatureSet} from this store that was still in use will be
410
     * invalidated. You can override this using {@link Iterator#remove()} from
411
     * {@link FeatureSet}.
412
     *
413
     * @param feature
414
     *            The feature to be deleted.
415
     *
416
     * @throws DataException
417
     */
418
    public void delete(Feature feature) throws DataException;
419

    
420
    /**
421
     * Inserts a {@link Feature} in the store.<br>
422
     *
423
     * Any {@link FeatureSet} from this store that was still in use will be
424
     * invalidated. You can override this using
425
     * {@link FeatureSet#insert(EditableFeature)}.
426
     *
427
     * @param feature
428
     *            The feature to be inserted
429
     *
430
     * @throws DataException
431
     */
432
    public void insert(EditableFeature feature) throws DataException;
433

    
434
    /**
435
     * Creates a new feature using the default feature type and returns it as an
436
     * {@link EditableFeature}
437
     *
438
     * @return a new feature in editable state
439
     *
440
     * @throws DataException
441
     */
442
    public EditableFeature createNewFeature() throws DataException;
443

    
444
    /**
445
     * Creates a new feature of the given {@link FeatureType} and uses the given
446
     * {@link Feature} as default values to initialize it.
447
     *
448
     * @param type
449
     *            the new feature's feature type
450
     *
451
     * @param defaultValues
452
     *            a feature whose values are used as default values for the new
453
     *            feature.
454
     *
455
     * @return the new feature.
456
     *
457
     * @throws DataException
458
     */
459
    public EditableFeature createNewFeature(FeatureType type,
460
        Feature defaultValues) throws DataException;
461

    
462
    /**
463
     * Creates a new feature of the given {@link FeatureType}. The flag
464
     * defaultValues is used to indicate whether the new feature should be
465
     * initialized with default values or not.
466
     *
467
     * @param type
468
     *            the new feature's feature type
469
     *
470
     * @param defaultValues
471
     *            if true the new feature is initialized with each attribute's
472
     *            default value.
473
     *
474
     * @return
475
     *         the new feature
476
     *
477
     * @throws DataException
478
     */
479
    public EditableFeature createNewFeature(FeatureType type,
480
        boolean defaultValues) throws DataException;
481

    
482
    /**
483
     * Creates a new feature of default {@link FeatureType}. The flag
484
     * defaultValues is used to indicate whether the new feature should be
485
     * initialized with default values or not.
486
     *
487
     * @param defaultValues
488
     *            if true the new feature is initialized with each attribute's
489
     *            default value.
490
     *
491
     * @return
492
     *         the new feature
493
     *
494
     * @throws DataException
495
     */
496
    public EditableFeature createNewFeature(boolean defaultValues)
497
        throws DataException;
498

    
499
    /**
500
     * Creates a new feature of default {@link FeatureType}. 
501
     * The new feature should be initialized with the values of the feature 
502
     * passed as parameter.
503
     * Values are inicialiced by name from the feature specified. Error in
504
     * value assignement are ignoreds.
505
     * 
506
     * @param defaultValues the values to initialize the new feature.
507
     * @return the new feature
508
     * @throws DataException 
509
     */
510
    public EditableFeature createNewFeature(Feature defaultValues)
511
        throws DataException;
512

    
513
    /**
514
     * Applies the validation rules associated to the given mode to the active
515
     * {@link FeatureSet}.
516
     *
517
     * @param mode
518
     *            can be one of {MODE_QUERY, MODE_FULLEDIT, MODE_APPEND}
519
     *
520
     * @throws DataException
521
     */
522
    public void validateFeatures(int mode) throws DataException;
523

    
524
    /**
525
     * Indicates whether this store supports append mode.
526
     *
527
     * @return
528
     *         true if this store supports append mode.
529
     */
530
    public boolean isAppendModeSupported();
531

    
532
    /**
533
     * Initiates an editing group. This is typically used to group series of
534
     * store editing operations.
535
     *
536
     * @param description
537
     *            Description of the editing group.
538
     *
539
     * @throws NeedEditingModeException
540
     */
541
    public void beginEditingGroup(String description)
542
        throws NeedEditingModeException;
543

    
544
    /**
545
     * Finishes an editing group.
546
     *
547
     * @throws NeedEditingModeException
548
     */
549
    public void endEditingGroup() throws NeedEditingModeException;
550

    
551
    /*
552
     * =============================================================
553
     *
554
     * Index related services
555
     */
556

    
557
    /**
558
     * Creates an index which will be applied to the features of the given type,
559
     * by using the data of the given attribute.
560
     *
561
     * @param featureType
562
     *            The FeatureType to which the indexed attribute belongs.
563
     *
564
     * @param attributeName
565
     *            The name of the attributed to be indexed
566
     *
567
     * @param indexName
568
     *            The index name
569
     *
570
     * @return the resulting {@link FeatureIndex}
571
     *
572
     *
573
     * @throws FeatureIndexException
574
     *             if there is an error creating the index
575
     */
576
    public FeatureIndex createIndex(FeatureType featureType,
577
        String attributeName, String indexName) throws DataException;
578

    
579
    /**
580
     * Creates an index which will be applied to the features of the given type,
581
     * by using the data of the given attribute.
582
     *
583
     * @param indexTypeName
584
     *            the type of the index to be created. That name is
585
     *            related to one of the registered index providers
586
     * @param featureType
587
     *            The FeatureType to which the indexed attribute belongs.
588
     *
589
     * @param attributeName
590
     *            The name of the attributed to be indexed
591
     *
592
     * @param indexName
593
     *            The index name
594
     *
595
     * @return the resulting {@link FeatureIndex}
596
     *
597
     *
598
     * @throws FeatureIndexException
599
     *             if there is an error creating the index
600
     */
601
    public FeatureIndex createIndex(String indexTypeName,
602
        FeatureType featureType, String attributeName, String indexName)
603
        throws DataException;
604

    
605
    /**
606
     * Creates an index which will be applied to the features of the given type,
607
     * by using the data of the given attribute. This method will return without
608
     * waiting for the index to be filled, as that will be performed in
609
     * background. An optional {@link Observer} parameter is provided to be
610
     * notified ( {@link FeatureStoreNotification#INDEX_FILLING_SUCCESS} )
611
     * when the index has finished filling with data and is available to be
612
     * used.
613
     *
614
     * @param featureType
615
     *            The FeatureType to which the indexed attribute belongs.
616
     *
617
     * @param attributeName
618
     *            The name of the attributed to be indexed
619
     *
620
     * @param indexName
621
     *            The index name
622
     *
623
     * @param observer
624
     *            to notify to when the created index has finished filling
625
     *            with data and is available to be used. The observer will
626
     *            receive then a
627
     *            {@link FeatureStoreNotification#INDEX_FILLING_SUCCESS}
628
     *            notification, with the index object if it has finished
629
     *            successfully, or a
630
     *            {@link FeatureStoreNotification#INDEX_FILLING_ERROR}
631
     *            notification with the exception object if there has been
632
     *            any error in the process. Optional.
633
     *
634
     * @return the resulting {@link FeatureIndex}
635
     *
636
     * @see FeatureStoreNotification#INDEX_FILLING_STARTED
637
     * @see FeatureStoreNotification#INDEX_FILLING_SUCCESS
638
     * @see FeatureStoreNotification#INDEX_FILLING_CANCELLED
639
     * @see FeatureStoreNotification#INDEX_FILLING_ERROR
640
     *
641
     * @throws FeatureIndexException
642
     *             if there is an error creating the index
643
     */
644
    public FeatureIndex createIndex(FeatureType featureType,
645
        String attributeName, String indexName, Observer observer)
646
        throws DataException;
647

    
648
    /**
649
     * Creates an index which will be applied to the features of the given type,
650
     * by using the data of the given attribute. This method will return without
651
     * waiting for the index to be filled, as that will be performed in
652
     * background. An optional {@link Observer} parameter is provided to be
653
     * notified ( {@link FeatureStoreNotification#INDEX_FILLING_SUCCESS} )
654
     * when the index has finished filling with data and is available to be
655
     * used.
656
     *
657
     * @param indexTypeName
658
     *            the type of the index to be created. That name is
659
     *            related to one of the registered index providers
660
     * @param featureType
661
     *            The FeatureType to which the indexed attribute belongs.
662
     *
663
     * @param attributeName
664
     *            The name of the attributed to be indexed
665
     *
666
     * @param indexName
667
     *            The index name
668
     *
669
     * @param observer
670
     *            to notify to when the created index has finished filling
671
     *            with data and is available to be used. The observer will
672
     *            receive then a
673
     *            {@link FeatureStoreNotification#INDEX_FILLING_SUCCESS}
674
     *            notification, with the index object if it has finished
675
     *            successfully, or a
676
     *            {@link FeatureStoreNotification#INDEX_FILLING_ERROR}
677
     *            notification with the exception object if there has been
678
     *            any error in the process. Optional.
679
     *
680
     * @return the resulting {@link FeatureIndex}
681
     *
682
     * @see FeatureStoreNotification#INDEX_FILLING_STARTED
683
     * @see FeatureStoreNotification#INDEX_FILLING_SUCCESS
684
     * @see FeatureStoreNotification#INDEX_FILLING_CANCELLED
685
     * @see FeatureStoreNotification#INDEX_FILLING_ERROR
686
     *
687
     * @throws FeatureIndexException
688
     *             if there is an error creating the index
689
     */
690
    public FeatureIndex createIndex(String indexTypeName,
691
        FeatureType featureType, String attributeName, String indexName,
692
        Observer observer) throws DataException;
693

    
694
    /**
695
     * Returns a FeatureIndexes structure containing all available indexes in
696
     * the store.
697
     *
698
     * @return
699
     */
700
    public FeatureIndexes getIndexes();
701

    
702
    /*
703
     * =============================================================
704
     *
705
     * Selection related services
706
     */
707

    
708
    /**
709
     * Sets the selection to the passed {@link FeatureSet}
710
     *
711
     * @param selection
712
     *            A {@link FeatureSet} with the requested selection
713
     */
714
    public void setSelection(FeatureSet selection) throws DataException;
715

    
716
    /**
717
     * Creates a {@link FeatureSelection}
718
     *
719
     * @return
720
     *         a {@link FeatureSelection}
721
     *
722
     * @throws DataException
723
     */
724
    public FeatureSelection createFeatureSelection() throws DataException;
725

    
726
    /**
727
     * Returns the current {@link FeatureSelection}.
728
     * Create a empty selection if not exits.
729
     *
730
     * @return
731
     *         current {@link FeatureSelection}.
732
     *
733
     * @throws DataException
734
     */
735
    public FeatureSelection getFeatureSelection() throws DataException;
736

    
737
    /*
738
     * =============================================================
739
     *
740
     * Lock related services
741
     */
742

    
743
    /**
744
     * Indicates whether this store supports locks.
745
     *
746
     * @return
747
     *         true if this store supports locks, false if not.
748
     */
749
    public boolean isLocksSupported();
750

    
751
    /**
752
     * Returns the set of locked features
753
     *
754
     * @return
755
     *         set of locked features
756
     *
757
     * @throws DataException
758
     */
759
    public FeatureLocks getLocks() throws DataException;
760

    
761
    /*
762
     * =============================================================
763
     * Transforms related services
764
     * =============================================================
765
     */
766

    
767
    /**
768
     * Returns this store transforms
769
     *
770
     * @return
771
     *         this store transforms
772
     */
773
    public FeatureStoreTransforms getTransforms();
774

    
775
    /**
776
     * Returns a new {@link FeatureQuery} associated to this store.
777
     *
778
     * @return
779
     *         a new {@link FeatureQuery} associated to this store.
780
     */
781
    public FeatureQuery createFeatureQuery();
782

    
783
    /**
784
     * Returns featue count of this store.
785
     *
786
     * @return
787
     * @throws DataException
788
     */
789
    public long getFeatureCount() throws DataException;
790

    
791
//    /**
792
//     * Creates a vectorial cache that is used to save and retrieve data.
793
//     *
794
//     * @param name
795
//     *            the cache name.
796
//     * @param parameters
797
//     *            parameters to create the stores used to save data.
798
//     * @throws DataException
799
//     */
800
//    public void createCache(String name, DynObject parameters)
801
//        throws DataException;
802
//
803
//    /**
804
//     * @return the vectorial cache
805
//     */
806
//    public FeatureCache getCache();
807

    
808
    /**
809
     * Return if the provider knows the real envelope of a layer. If not,
810
     * the {@link FeatureStoreProvider#getEnvelope()} method doesn't return
811
     * the full envelope.
812
     *
813
     * @return
814
     *         <true> if it knows the real envelope.
815
     */
816
    public boolean isKnownEnvelope();
817

    
818
    /**
819
     * Return if the maximum number of features provided by the
820
     * provider are limited.
821
     *
822
     * @return
823
     *         <true> if there is a limit of features.
824
     */
825
    public boolean hasRetrievedFeaturesLimit();
826

    
827
    /**
828
     * If the {@link FeatureStoreProvider#hasRetrievedFeaturesLimit()} returns
829
     * true,
830
     * it returns the limit of features retrieved from the provider.
831
     *
832
     * @return
833
     *         The limit of the retrieved features.
834
     */
835
    public int getRetrievedFeaturesLimit();
836

    
837
    /**
838
     * Return the associated feature to the dynobject.
839
     * If the dynobject isn't associated to a feature of this store, return null.
840
     *
841
     * @param dynobject
842
     * @return
843
     */
844
    public Feature getFeature(DynObject dynobject);
845
    
846
    public Iterator iterator();
847
    
848
    public ExpressionBuilder createExpressionBuilder();
849
    
850
    public void createCache(String name, DynObject parameters)
851
        throws DataException;
852

    
853
    public FeatureCache getCache();     
854
}