svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libFMap_data / src / org / gvsig / fmap / data / feature / FeatureStore.java @ 24034
History | View | Annotate | Download (5.73 KB)
1 |
package org.gvsig.fmap.data.feature; |
---|---|
2 |
|
3 |
import java.util.List; |
4 |
|
5 |
import org.gvsig.fmap.data.DataStore; |
6 |
import org.gvsig.fmap.data.DataStoreParameters; |
7 |
import org.gvsig.fmap.data.exceptions.DataException; |
8 |
import org.gvsig.fmap.data.exceptions.ReadException; |
9 |
import org.gvsig.fmap.data.exceptions.WriteException; |
10 |
import org.gvsig.fmap.data.feature.exceptions.DataIndexException; |
11 |
import org.gvsig.fmap.geom.primitive.Envelope; |
12 |
import org.gvsig.tools.observer.Observer; |
13 |
|
14 |
/**
|
15 |
* <p>Is a specialization of DataStore to use alfanumeric and
|
16 |
* vectorial data.</p>
|
17 |
* <ul>
|
18 |
* <il>It has suport to the diferent <i>Feature</i> definitions
|
19 |
* (or types) represented by <i>FeatureType</i>, but always
|
20 |
* use one by default. (The GML format, for example, can use
|
21 |
* diferent <i>Feature</i> types.</il>
|
22 |
* <il>Allows access to a subcollection data filtered and/or
|
23 |
* sort it (as well load in a background mode).
|
24 |
* </il>
|
25 |
* <il>Allowed filters will be <i>alfanumerics</i> and/or
|
26 |
* <i>Spatial</i> and/or <i>Feature type</i>.</il>
|
27 |
* <il>Adds support to <i>Feature</i> edition level.</il>
|
28 |
* <il>Adds support to modify structure (<i>FeatureType</i>).</il>
|
29 |
* <il>Give information about contained geometry types.</il>
|
30 |
*
|
31 |
* </ul>
|
32 |
*
|
33 |
* @author
|
34 |
*
|
35 |
*/
|
36 |
public interface FeatureStore extends DataStore { |
37 |
|
38 |
/**
|
39 |
* Returns all available features taking into account the properties and
|
40 |
* restrictions of the FeatureQuery.
|
41 |
*
|
42 |
* @return a collection of features
|
43 |
* @throws ReadException
|
44 |
* if there is any error while reading the features
|
45 |
*/
|
46 |
FeatureSet getFeatureSet() throws DataException;
|
47 |
|
48 |
/**
|
49 |
* Returns a subset of features taking into account the properties and
|
50 |
* restrictions of the FeatureQuery.
|
51 |
*
|
52 |
* @param featureQuery
|
53 |
* defines the characteristics of the features to return
|
54 |
* @return a collection of features
|
55 |
* @throws ReadException
|
56 |
* if there is any error while reading the features
|
57 |
*/
|
58 |
FeatureSet getFeatureSet(FeatureQuery featureQuery) |
59 |
throws DataException;
|
60 |
|
61 |
/**
|
62 |
* Loads a subset of features taking into account the properties and
|
63 |
* restrictions of the FeatureQuery. Feature loading is performed by calling
|
64 |
* the Observer, once each loaded Feature.
|
65 |
*
|
66 |
* @param featureQuery
|
67 |
* defines the characteristics of the features to return
|
68 |
* @param observer
|
69 |
* to be notified of each loaded Feature
|
70 |
* @throws DataException
|
71 |
* if there is any error while loading the features
|
72 |
*/
|
73 |
void getFeatureSet(FeatureQuery featureQuery, Observer observer) |
74 |
throws DataException;
|
75 |
|
76 |
/**
|
77 |
* Loads all available feature, taking into account the properties and
|
78 |
* restrictions of the FeatureQuery. The loading of Features is performed by
|
79 |
* calling the Observer, once each loaded Feature.
|
80 |
*
|
81 |
* @param observer
|
82 |
* to be notified of each loaded Feature
|
83 |
* @throws DataException
|
84 |
* if there is any error while loading the features
|
85 |
*/
|
86 |
void getFeatureSet(Observer observer) throws DataException; |
87 |
|
88 |
public Feature getFeatureByReference(FeatureReference reference) throws DataException; |
89 |
|
90 |
public Feature getFeatureByReference(FeatureReference reference, FeatureType featureType)
|
91 |
throws DataException;
|
92 |
|
93 |
public FeatureType getDefaultFeatureType() throws DataException; |
94 |
|
95 |
public List getFeatureTypes() throws DataException; |
96 |
|
97 |
public EditableFeature createFeature() throws DataException; |
98 |
|
99 |
public EditableFeature createFeature(FeatureType type, Feature defaultValues)
|
100 |
throws DataException;
|
101 |
|
102 |
public EditableFeature createFeature(FeatureType type, boolean defaultValues) |
103 |
throws DataException;
|
104 |
|
105 |
public EditableFeature createFeature(boolean defaultValues) |
106 |
throws DataException;
|
107 |
|
108 |
public void update(EditableFeature feature) throws DataException; |
109 |
|
110 |
public void delete(Feature feature) throws DataException; |
111 |
|
112 |
public void insert(EditableFeature feature) throws DataException; |
113 |
|
114 |
|
115 |
public void update(EditableFeatureType featureType) throws DataException; |
116 |
|
117 |
public FeatureSet getLocks() throws DataException; |
118 |
|
119 |
public boolean isLocksSupported(); |
120 |
|
121 |
public DataStoreParameters getParameters();
|
122 |
|
123 |
/**
|
124 |
*@deprecated Mirar de cambiarlo a metadatos
|
125 |
*/
|
126 |
public boolean canWriteGeometry(int gvSIGgeometryType); |
127 |
|
128 |
/**
|
129 |
* Creates a DataIndex with name indexName, given the attributeName and its featureType.
|
130 |
* @param featureType
|
131 |
* @param attributeName
|
132 |
* @param indexName
|
133 |
* @return
|
134 |
* @throws DataIndexException
|
135 |
*/
|
136 |
public FeatureIndex createIndex(FeatureType featureType,
|
137 |
String attributeName, String indexName) throws DataException; |
138 |
|
139 |
/**
|
140 |
* Returns a DataIndexes structure containing all available indexes
|
141 |
* @return
|
142 |
*/
|
143 |
public FeatureIndexes getIndexes();
|
144 |
|
145 |
/**
|
146 |
* @throws ReadException
|
147 |
*/
|
148 |
public void edit() throws DataException; |
149 |
|
150 |
public void cancelEditing() throws DataException; |
151 |
|
152 |
/**
|
153 |
*
|
154 |
* @throws WriteException
|
155 |
* @throws ReadException
|
156 |
*/
|
157 |
public void finishEditing() throws DataException; |
158 |
|
159 |
public boolean isEditing(); |
160 |
|
161 |
public void undo() throws DataException; |
162 |
|
163 |
public void redo() throws DataException; |
164 |
|
165 |
/**
|
166 |
*
|
167 |
* @return CommandsRecord
|
168 |
*/
|
169 |
public CommandsRecord getCommandsRecord() throws DataException; |
170 |
|
171 |
public boolean allowWrite(); |
172 |
|
173 |
public void setSelection(FeatureSet selection) throws DataException; |
174 |
|
175 |
public FeatureSelection createFeatureSelection() throws DataException; |
176 |
|
177 |
public FeatureSelection getFeatureSelection() throws DataException; |
178 |
|
179 |
public Envelope getEnvelope();
|
180 |
|
181 |
public String getSRSDefaultGeometry() throws DataException; |
182 |
|
183 |
public void validateFeatures(int mode) throws DataException; |
184 |
|
185 |
public void export(FeatureExplorer explorer, FeatureStoreParameters params) |
186 |
throws DataException;
|
187 |
|
188 |
} |
189 |
|