Revision 35115 branches/dal_time_support/libraries/libFMap_dal/src/org/gvsig/fmap/dal/feature/FeatureStore.java
FeatureStore.java | ||
---|---|---|
26 | 26 |
* {@link Feature}(s). {@link Feature}(s) from the same FeatureStore can be of |
27 | 27 |
* different {@link FeatureType}(s) (as in GML format for instance). |
28 | 28 |
* </p> |
29 |
* |
|
29 |
*
|
|
30 | 30 |
* <p> |
31 | 31 |
* FeatureStore allows: |
32 | 32 |
* </p> |
... | ... | |
45 | 45 |
* <li>Selection. |
46 | 46 |
* <li>Locks management. |
47 | 47 |
* </ul> |
48 |
* |
|
48 |
*
|
|
49 | 49 |
*/ |
50 | 50 |
public interface FeatureStore extends DataStore, UndoRedoStack { |
51 | 51 |
|
52 |
public static final String METADATA_DEFINITION_NAME = "FeatureStore";
|
|
52 |
public static final String METADATA_DEFINITION_NAME = "FeatureStore";
|
|
53 | 53 |
|
54 |
/** Indicates that this store is in query mode */
|
|
55 |
final static int MODE_QUERY = 0;
|
|
54 |
/** Indicates that this store is in query mode */
|
|
55 |
final static int MODE_QUERY = 0;
|
|
56 | 56 |
|
57 |
/** Indicates that this store is in full edit mode */
|
|
58 |
final static int MODE_FULLEDIT = 1;
|
|
57 |
/** Indicates that this store is in full edit mode */
|
|
58 |
final static int MODE_FULLEDIT = 1;
|
|
59 | 59 |
|
60 |
/** Indicates that this store is in append mode */
|
|
61 |
final static int MODE_APPEND = 2;
|
|
60 |
/** Indicates that this store is in append mode */
|
|
61 |
final static int MODE_APPEND = 2;
|
|
62 | 62 |
|
63 |
/*
|
|
64 |
* =============================================================
|
|
65 |
*
|
|
66 |
* information related services
|
|
67 |
*/
|
|
63 |
/*
|
|
64 |
* =============================================================
|
|
65 |
*
|
|
66 |
* information related services
|
|
67 |
*/
|
|
68 | 68 |
|
69 |
/**
|
|
70 |
* Indicates whether this store allows writing.
|
|
71 |
*
|
|
72 |
* @return
|
|
73 |
* true if this store can be written, false if not.
|
|
74 |
*/
|
|
75 |
public boolean allowWrite();
|
|
69 |
/**
|
|
70 |
* Indicates whether this store allows writing.
|
|
71 |
*
|
|
72 |
* @return
|
|
73 |
* true if this store can be written, false if not.
|
|
74 |
*/
|
|
75 |
public boolean allowWrite();
|
|
76 | 76 |
|
77 |
/**
|
|
78 |
* Returns this store's default {@link FeatureType}.
|
|
79 |
*
|
|
80 |
* @return
|
|
81 |
* this store's default {@link FeatureType}.
|
|
82 |
*
|
|
83 |
* @throws DataException
|
|
84 |
*/
|
|
85 |
public FeatureType getDefaultFeatureType() throws DataException;
|
|
77 |
/**
|
|
78 |
* Returns this store's default {@link FeatureType}.
|
|
79 |
*
|
|
80 |
* @return
|
|
81 |
* this store's default {@link FeatureType}.
|
|
82 |
*
|
|
83 |
* @throws DataException
|
|
84 |
*/
|
|
85 |
public FeatureType getDefaultFeatureType() throws DataException;
|
|
86 | 86 |
|
87 |
/**
|
|
88 |
* Returns this store's featureType {@link FeatureType} matches with
|
|
89 |
* featureTypeId.
|
|
90 |
*
|
|
91 |
* @param featureTypeId
|
|
92 |
*
|
|
93 |
* @return this store's default {@link FeatureType}.
|
|
94 |
*
|
|
95 |
* @throws DataException
|
|
96 |
*/
|
|
97 |
public FeatureType getFeatureType(String featureTypeId)
|
|
98 |
throws DataException;
|
|
87 |
/**
|
|
88 |
* Returns this store's featureType {@link FeatureType} matches with
|
|
89 |
* featureTypeId.
|
|
90 |
*
|
|
91 |
* @param featureTypeId
|
|
92 |
*
|
|
93 |
* @return this store's default {@link FeatureType}.
|
|
94 |
*
|
|
95 |
* @throws DataException
|
|
96 |
*/
|
|
97 |
public FeatureType getFeatureType(String featureTypeId)
|
|
98 |
throws DataException;
|
|
99 | 99 |
|
100 |
/**
|
|
101 |
* Returns this store's {@link FeatureType}(s).
|
|
102 |
*
|
|
103 |
* @return a list with this store's {@link FeatureType}(s).
|
|
104 |
*
|
|
105 |
* @throws DataException
|
|
106 |
*/
|
|
107 |
public List getFeatureTypes() throws DataException;
|
|
100 |
/**
|
|
101 |
* Returns this store's {@link FeatureType}(s).
|
|
102 |
*
|
|
103 |
* @return a list with this store's {@link FeatureType}(s).
|
|
104 |
*
|
|
105 |
* @throws DataException
|
|
106 |
*/
|
|
107 |
public List getFeatureTypes() throws DataException;
|
|
108 | 108 |
|
109 |
/**
|
|
110 |
* Returns this store's parameters.
|
|
111 |
*
|
|
112 |
* @return
|
|
113 |
* {@link DataStoreParameters} containing this store's parameters
|
|
114 |
*/
|
|
115 |
public DataStoreParameters getParameters();
|
|
109 |
/**
|
|
110 |
* Returns this store's parameters.
|
|
111 |
*
|
|
112 |
* @return
|
|
113 |
* {@link DataStoreParameters} containing this store's parameters
|
|
114 |
*/
|
|
115 |
public DataStoreParameters getParameters();
|
|
116 | 116 |
|
117 |
/**
|
|
118 |
*@throws DataException
|
|
119 |
* @deprecated Mirar de cambiarlo a metadatos
|
|
120 |
*/
|
|
121 |
public boolean canWriteGeometry(int gvSIGgeometryType) throws DataException;
|
|
117 |
/**
|
|
118 |
*@throws DataException
|
|
119 |
* @deprecated Mirar de cambiarlo a metadatos
|
|
120 |
*/
|
|
121 |
public boolean canWriteGeometry(int gvSIGgeometryType) throws DataException;
|
|
122 | 122 |
|
123 |
/**
|
|
124 |
* Returns this store's total envelope (extent).
|
|
125 |
*
|
|
126 |
* @return this store's total envelope (extent) or <code>null</code> if
|
|
127 |
* store not have geometry information
|
|
128 |
*/
|
|
129 |
public Envelope getEnvelope() throws DataException;
|
|
123 |
/**
|
|
124 |
* Returns this store's total envelope (extent).
|
|
125 |
*
|
|
126 |
* @return this store's total envelope (extent) or <code>null</code> if
|
|
127 |
* store not have geometry information
|
|
128 |
*/
|
|
129 |
public Envelope getEnvelope() throws DataException;
|
|
130 | 130 |
|
131 |
/**
|
|
132 |
*
|
|
133 |
* @deprecated use getDefaultFeatureType().getDefaultSRS()
|
|
134 |
* @return
|
|
135 |
* @throws DataException
|
|
136 |
*/
|
|
137 |
public IProjection getSRSDefaultGeometry() throws DataException;
|
|
131 |
/**
|
|
132 |
*
|
|
133 |
* @deprecated use getDefaultFeatureType().getDefaultSRS()
|
|
134 |
* @return
|
|
135 |
* @throws DataException
|
|
136 |
*/
|
|
137 |
public IProjection getSRSDefaultGeometry() throws DataException;
|
|
138 | 138 |
|
139 |
/**
|
|
140 |
* Exports this store to another store.
|
|
141 |
*
|
|
142 |
* @param explorer
|
|
143 |
* {@link DataServerExplorer} target
|
|
144 |
* @param params
|
|
145 |
* New parameters of this store that will be used on the target
|
|
146 |
* explorer
|
|
147 |
*
|
|
148 |
* @throws DataException
|
|
149 |
*
|
|
150 |
* @Deprecated this method is unstable
|
|
151 |
*/
|
|
152 |
public void export(DataServerExplorer explorer, String provider, NewFeatureStoreParameters params)
|
|
153 |
throws DataException;
|
|
139 |
/**
|
|
140 |
* Exports this store to another store.
|
|
141 |
*
|
|
142 |
* @param explorer
|
|
143 |
* {@link DataServerExplorer} target
|
|
144 |
* @param params
|
|
145 |
* New parameters of this store that will be used on the target
|
|
146 |
* explorer
|
|
147 |
*
|
|
148 |
* @throws DataException
|
|
149 |
*
|
|
150 |
* @Deprecated this method is unstable
|
|
151 |
*/
|
|
152 |
public void export(DataServerExplorer explorer, String provider,
|
|
153 |
NewFeatureStoreParameters params) throws DataException;
|
|
154 | 154 |
|
155 |
/*
|
|
156 |
* =============================================================
|
|
157 |
*
|
|
158 |
* Query related services
|
|
159 |
*/
|
|
155 |
/*
|
|
156 |
* =============================================================
|
|
157 |
*
|
|
158 |
* Query related services
|
|
159 |
*/
|
|
160 | 160 |
|
161 |
/**
|
|
162 |
* Returns all available features in the store.
|
|
163 |
* <p>
|
|
164 |
* <em>
|
|
165 |
* <strong>NOTE:</strong> if you use this method to get a
|
|
166 |
* {@link FeatureSet}, you must get sure it is disposed
|
|
161 |
/**
|
|
162 |
* Returns all available features in the store.
|
|
163 |
* <p>
|
|
164 |
* <em>
|
|
165 |
* <strong>NOTE:</strong> if you use this method to get a
|
|
166 |
* {@link FeatureSet}, you must get sure it is disposed
|
|
167 | 167 |
* (@see {@link DisposableIterator#dispose()}) in any case, even if an |
168 | 168 |
* error occurs while getting the data. It is recommended to use the |
169 | 169 |
* <code>accept</code> methods instead, which handle everything for you. |
170 | 170 |
* Take into account the accept methods may use a fast iterator to |
171 | 171 |
* get the features. |
172 | 172 |
* </em> |
173 |
* </p>
|
|
174 |
*
|
|
175 |
* @see #accept(org.gvsig.tools.visitor.Visitor)
|
|
176 |
*
|
|
177 |
* @return a collection of features
|
|
178 |
* @throws ReadException
|
|
179 |
* if there is any error while reading the features
|
|
180 |
*/
|
|
181 |
FeatureSet getFeatureSet() throws DataException;
|
|
173 |
* </p>
|
|
174 |
*
|
|
175 |
* @see #accept(org.gvsig.tools.visitor.Visitor)
|
|
176 |
*
|
|
177 |
* @return a collection of features
|
|
178 |
* @throws ReadException
|
|
179 |
* if there is any error while reading the features
|
|
180 |
*/
|
|
181 |
FeatureSet getFeatureSet() throws DataException;
|
|
182 | 182 |
|
183 |
/**
|
|
184 |
* Returns a subset of features taking into account the properties and
|
|
185 |
* restrictions of the FeatureQuery.
|
|
186 |
* <p>
|
|
187 |
* <em>
|
|
188 |
* <strong>NOTE:</strong> if you use this method to get a
|
|
189 |
* {@link FeatureSet}, you must get sure it is disposed
|
|
183 |
/**
|
|
184 |
* Returns a subset of features taking into account the properties and
|
|
185 |
* restrictions of the FeatureQuery.
|
|
186 |
* <p>
|
|
187 |
* <em>
|
|
188 |
* <strong>NOTE:</strong> if you use this method to get a
|
|
189 |
* {@link FeatureSet}, you must get sure it is disposed
|
|
190 | 190 |
* (@see {@link DisposableIterator#dispose()}) in any case, even if an |
191 | 191 |
* error occurs while getting the data. It is recommended to use the |
192 | 192 |
* <code>accept</code> methods instead, which handle everything for you. |
193 | 193 |
* Take into account the accept methods may use a fast iterator to |
194 | 194 |
* get the features. |
195 | 195 |
* </em> |
196 |
* </p> |
|
197 |
* |
|
198 |
* @see #accept(org.gvsig.tools.visitor.Visitor, |
|
199 |
* org.gvsig.fmap.dal.DataQuery) |
|
200 |
* |
|
201 |
* @param featureQuery |
|
202 |
* defines the characteristics of the features to return |
|
203 |
* @return a collection of features |
|
204 |
* @throws ReadException |
|
205 |
* if there is any error while reading the features |
|
206 |
*/ |
|
207 |
FeatureSet getFeatureSet(FeatureQuery featureQuery) |
|
208 |
throws DataException; |
|
196 |
* </p> |
|
197 |
* |
|
198 |
* @see #accept(org.gvsig.tools.visitor.Visitor, |
|
199 |
* org.gvsig.fmap.dal.DataQuery) |
|
200 |
* |
|
201 |
* @param featureQuery |
|
202 |
* defines the characteristics of the features to return |
|
203 |
* @return a collection of features |
|
204 |
* @throws ReadException |
|
205 |
* if there is any error while reading the features |
|
206 |
*/ |
|
207 |
FeatureSet getFeatureSet(FeatureQuery featureQuery) throws DataException; |
|
209 | 208 |
|
210 |
/**
|
|
211 |
* Loads a subset of features taking into account the properties and
|
|
212 |
* restrictions of the FeatureQuery. Feature loading is performed by calling
|
|
213 |
* the Observer, once each loaded Feature.
|
|
214 |
*
|
|
215 |
* @param featureQuery
|
|
216 |
* defines the characteristics of the features to return
|
|
217 |
* @param observer
|
|
218 |
* to be notified of each loaded Feature
|
|
219 |
* @throws DataException
|
|
220 |
* if there is any error while loading the features
|
|
221 |
*/
|
|
222 |
void getFeatureSet(FeatureQuery featureQuery, Observer observer)
|
|
223 |
throws DataException;
|
|
209 |
/**
|
|
210 |
* Loads a subset of features taking into account the properties and
|
|
211 |
* restrictions of the FeatureQuery. Feature loading is performed by calling
|
|
212 |
* the Observer, once each loaded Feature.
|
|
213 |
*
|
|
214 |
* @param featureQuery
|
|
215 |
* defines the characteristics of the features to return
|
|
216 |
* @param observer
|
|
217 |
* to be notified of each loaded Feature
|
|
218 |
* @throws DataException
|
|
219 |
* if there is any error while loading the features
|
|
220 |
*/
|
|
221 |
void getFeatureSet(FeatureQuery featureQuery, Observer observer)
|
|
222 |
throws DataException;
|
|
224 | 223 |
|
225 |
/**
|
|
226 |
* Loads all available feature in the store. The loading of Features is
|
|
227 |
* performed by calling the Observer, once each loaded Feature.
|
|
228 |
*
|
|
229 |
* @param observer
|
|
230 |
* to be notified of each loaded Feature
|
|
231 |
* @throws DataException
|
|
232 |
* if there is any error while loading the features
|
|
233 |
*/
|
|
234 |
void getFeatureSet(Observer observer) throws DataException;
|
|
224 |
/**
|
|
225 |
* Loads all available feature in the store. The loading of Features is
|
|
226 |
* performed by calling the Observer, once each loaded Feature.
|
|
227 |
*
|
|
228 |
* @param observer
|
|
229 |
* to be notified of each loaded Feature
|
|
230 |
* @throws DataException
|
|
231 |
* if there is any error while loading the features
|
|
232 |
*/
|
|
233 |
void getFeatureSet(Observer observer) throws DataException;
|
|
235 | 234 |
|
236 |
/** |
|
237 |
* Returns the feature given its reference. |
|
238 |
* |
|
239 |
* @param reference |
|
240 |
* a unique FeatureReference |
|
241 |
* @return |
|
242 |
* The Feature |
|
243 |
* |
|
244 |
* @throws DataException |
|
245 |
* |
|
246 |
*/ |
|
247 |
public Feature getFeatureByReference(FeatureReference reference) throws DataException; |
|
235 |
/** |
|
236 |
* Returns the feature given its reference. |
|
237 |
* |
|
238 |
* @param reference |
|
239 |
* a unique FeatureReference |
|
240 |
* @return |
|
241 |
* The Feature |
|
242 |
* |
|
243 |
* @throws DataException |
|
244 |
* |
|
245 |
*/ |
|
246 |
public Feature getFeatureByReference(FeatureReference reference) |
|
247 |
throws DataException; |
|
248 | 248 |
|
249 |
/**
|
|
250 |
* Returns the feature given its reference and feature type.
|
|
251 |
*
|
|
252 |
* @param reference
|
|
253 |
* a unique FeatureReference
|
|
254 |
*
|
|
255 |
* @param featureType
|
|
256 |
* FeatureType to which the requested Feature belongs
|
|
257 |
*
|
|
258 |
* @return
|
|
259 |
* The Feature
|
|
260 |
*
|
|
261 |
* @throws DataException
|
|
262 |
*
|
|
263 |
*/
|
|
264 |
public Feature getFeatureByReference(FeatureReference reference, FeatureType featureType)
|
|
265 |
throws DataException;
|
|
249 |
/**
|
|
250 |
* Returns the feature given its reference and feature type.
|
|
251 |
*
|
|
252 |
* @param reference
|
|
253 |
* a unique FeatureReference
|
|
254 |
*
|
|
255 |
* @param featureType
|
|
256 |
* FeatureType to which the requested Feature belongs
|
|
257 |
*
|
|
258 |
* @return
|
|
259 |
* The Feature
|
|
260 |
*
|
|
261 |
* @throws DataException
|
|
262 |
*
|
|
263 |
*/
|
|
264 |
public Feature getFeatureByReference(FeatureReference reference,
|
|
265 |
FeatureType featureType) throws DataException;
|
|
266 | 266 |
|
267 |
/*
|
|
268 |
* =============================================================
|
|
269 |
*
|
|
270 |
* Editing related services
|
|
271 |
*/
|
|
267 |
/*
|
|
268 |
* =============================================================
|
|
269 |
*
|
|
270 |
* Editing related services
|
|
271 |
*/
|
|
272 | 272 |
|
273 |
/**
|
|
274 |
* Enters editing state.
|
|
275 |
*/
|
|
276 |
public void edit() throws DataException;
|
|
273 |
/**
|
|
274 |
* Enters editing state.
|
|
275 |
*/
|
|
276 |
public void edit() throws DataException;
|
|
277 | 277 |
|
278 |
/**
|
|
279 |
* Enters editing state specifying the editing mode.
|
|
280 |
*
|
|
281 |
* @param mode
|
|
282 |
*
|
|
283 |
* @throws DataException
|
|
284 |
*/
|
|
285 |
public void edit(int mode) throws DataException;
|
|
278 |
/**
|
|
279 |
* Enters editing state specifying the editing mode.
|
|
280 |
*
|
|
281 |
* @param mode
|
|
282 |
*
|
|
283 |
* @throws DataException
|
|
284 |
*/
|
|
285 |
public void edit(int mode) throws DataException;
|
|
286 | 286 |
|
287 |
/**
|
|
288 |
* Cancels all editing since the last edit().
|
|
289 |
*
|
|
290 |
* @throws DataException
|
|
291 |
*/
|
|
292 |
public void cancelEditing() throws DataException;
|
|
287 |
/**
|
|
288 |
* Cancels all editing since the last edit().
|
|
289 |
*
|
|
290 |
* @throws DataException
|
|
291 |
*/
|
|
292 |
public void cancelEditing() throws DataException;
|
|
293 | 293 |
|
294 |
/**
|
|
295 |
* Exits editing state.
|
|
296 |
*
|
|
297 |
* @throws DataException
|
|
298 |
*/
|
|
299 |
public void finishEditing() throws DataException;
|
|
294 |
/**
|
|
295 |
* Exits editing state.
|
|
296 |
*
|
|
297 |
* @throws DataException
|
|
298 |
*/
|
|
299 |
public void finishEditing() throws DataException;
|
|
300 | 300 |
|
301 |
/**
|
|
302 |
* Indicates whether this store is in editing state.
|
|
303 |
*
|
|
304 |
* @return
|
|
305 |
* true if this store is in editing state, false if not.
|
|
306 |
*/
|
|
307 |
public boolean isEditing();
|
|
301 |
/**
|
|
302 |
* Indicates whether this store is in editing state.
|
|
303 |
*
|
|
304 |
* @return
|
|
305 |
* true if this store is in editing state, false if not.
|
|
306 |
*/
|
|
307 |
public boolean isEditing();
|
|
308 | 308 |
|
309 |
/**
|
|
310 |
* Indicates whether this store is in appending state. In this state the new
|
|
311 |
* features are automatically inserted at the end of the {@link FeatureSet}.
|
|
312 |
*
|
|
313 |
* @return true if this store is in appending state.
|
|
314 |
*/
|
|
315 |
public boolean isAppending();
|
|
309 |
/**
|
|
310 |
* Indicates whether this store is in appending state. In this state the new
|
|
311 |
* features are automatically inserted at the end of the {@link FeatureSet}.
|
|
312 |
*
|
|
313 |
* @return true if this store is in appending state.
|
|
314 |
*/
|
|
315 |
public boolean isAppending();
|
|
316 | 316 |
|
317 |
/**
|
|
318 |
* Updates a {@link FeatureType} in the store with the changes in the
|
|
319 |
* {@link EditableFeatureType}.<br>
|
|
320 |
*
|
|
321 |
* Any {@link FeatureSet} from this store that are used will be invalidated.
|
|
322 |
*
|
|
323 |
* @param featureType
|
|
324 |
* an {@link EditableFeatureType} with the changes.
|
|
325 |
*
|
|
326 |
* @throws DataException
|
|
327 |
*/
|
|
328 |
public void update(EditableFeatureType featureType) throws DataException;
|
|
317 |
/**
|
|
318 |
* Updates a {@link FeatureType} in the store with the changes in the
|
|
319 |
* {@link EditableFeatureType}.<br>
|
|
320 |
*
|
|
321 |
* Any {@link FeatureSet} from this store that are used will be invalidated.
|
|
322 |
*
|
|
323 |
* @param featureType
|
|
324 |
* an {@link EditableFeatureType} with the changes.
|
|
325 |
*
|
|
326 |
* @throws DataException
|
|
327 |
*/
|
|
328 |
public void update(EditableFeatureType featureType) throws DataException;
|
|
329 | 329 |
|
330 |
/**
|
|
331 |
* Updates a {@link Feature} in the store with the changes in the
|
|
332 |
* {@link EditableFeature}.<br>
|
|
333 |
*
|
|
334 |
* Any {@link FeatureSet} from this store that was still in use will be
|
|
335 |
* invalidated. You can override this using
|
|
336 |
* {@link FeatureSet#update(EditableFeature)}.
|
|
337 |
*
|
|
338 |
* @param feature
|
|
339 |
* the feature to be updated
|
|
340 |
*
|
|
341 |
* @throws DataException
|
|
342 |
*/
|
|
343 |
public void update(EditableFeature feature) throws DataException;
|
|
330 |
/**
|
|
331 |
* Updates a {@link Feature} in the store with the changes in the
|
|
332 |
* {@link EditableFeature}.<br>
|
|
333 |
*
|
|
334 |
* Any {@link FeatureSet} from this store that was still in use will be
|
|
335 |
* invalidated. You can override this using
|
|
336 |
* {@link FeatureSet#update(EditableFeature)}.
|
|
337 |
*
|
|
338 |
* @param feature
|
|
339 |
* the feature to be updated
|
|
340 |
*
|
|
341 |
* @throws DataException
|
|
342 |
*/
|
|
343 |
public void update(EditableFeature feature) throws DataException;
|
|
344 | 344 |
|
345 |
/**
|
|
346 |
* Deletes a {@link Feature} from the store.<br>
|
|
347 |
*
|
|
348 |
* Any {@link FeatureSet} from this store that was still in use will be
|
|
349 |
* invalidated. You can override this using {@link Iterator#remove()} from
|
|
350 |
* {@link FeatureSet}.
|
|
351 |
*
|
|
352 |
* @param feature
|
|
353 |
* The feature to be deleted.
|
|
354 |
*
|
|
355 |
* @throws DataException
|
|
356 |
*/
|
|
357 |
public void delete(Feature feature) throws DataException;
|
|
345 |
/**
|
|
346 |
* Deletes a {@link Feature} from the store.<br>
|
|
347 |
*
|
|
348 |
* Any {@link FeatureSet} from this store that was still in use will be
|
|
349 |
* invalidated. You can override this using {@link Iterator#remove()} from
|
|
350 |
* {@link FeatureSet}.
|
|
351 |
*
|
|
352 |
* @param feature
|
|
353 |
* The feature to be deleted.
|
|
354 |
*
|
|
355 |
* @throws DataException
|
|
356 |
*/
|
|
357 |
public void delete(Feature feature) throws DataException;
|
|
358 | 358 |
|
359 |
/**
|
|
360 |
* Inserts a {@link Feature} in the store.<br>
|
|
361 |
*
|
|
362 |
* Any {@link FeatureSet} from this store that was still in use will be
|
|
363 |
* invalidated. You can override this using
|
|
364 |
* {@link FeatureSet#insert(EditableFeature)}.
|
|
365 |
*
|
|
366 |
* @param feature
|
|
367 |
* The feature to be inserted
|
|
368 |
*
|
|
369 |
* @throws DataException
|
|
370 |
*/
|
|
371 |
public void insert(EditableFeature feature) throws DataException;
|
|
359 |
/**
|
|
360 |
* Inserts a {@link Feature} in the store.<br>
|
|
361 |
*
|
|
362 |
* Any {@link FeatureSet} from this store that was still in use will be
|
|
363 |
* invalidated. You can override this using
|
|
364 |
* {@link FeatureSet#insert(EditableFeature)}.
|
|
365 |
*
|
|
366 |
* @param feature
|
|
367 |
* The feature to be inserted
|
|
368 |
*
|
|
369 |
* @throws DataException
|
|
370 |
*/
|
|
371 |
public void insert(EditableFeature feature) throws DataException;
|
|
372 | 372 |
|
373 |
/**
|
|
374 |
* Creates a new feature using the default feature type and returns it as an
|
|
375 |
* {@link EditableFeature}
|
|
376 |
*
|
|
377 |
* @return a new feature in editable state
|
|
378 |
*
|
|
379 |
* @throws DataException
|
|
380 |
*/
|
|
381 |
public EditableFeature createNewFeature() throws DataException;
|
|
373 |
/**
|
|
374 |
* Creates a new feature using the default feature type and returns it as an
|
|
375 |
* {@link EditableFeature}
|
|
376 |
*
|
|
377 |
* @return a new feature in editable state
|
|
378 |
*
|
|
379 |
* @throws DataException
|
|
380 |
*/
|
|
381 |
public EditableFeature createNewFeature() throws DataException;
|
|
382 | 382 |
|
383 |
/**
|
|
384 |
* Creates a new feature of the given {@link FeatureType} and uses the given
|
|
385 |
* {@link Feature} as default values to initialize it.
|
|
386 |
*
|
|
387 |
* @param type
|
|
388 |
* the new feature's feature type
|
|
389 |
*
|
|
390 |
* @param defaultValues
|
|
391 |
* a feature whose values are used as default values for the new
|
|
392 |
* feature.
|
|
393 |
*
|
|
394 |
* @return the new feature.
|
|
395 |
*
|
|
396 |
* @throws DataException
|
|
397 |
*/
|
|
398 |
public EditableFeature createNewFeature(FeatureType type,
|
|
399 |
Feature defaultValues) throws DataException;
|
|
383 |
/**
|
|
384 |
* Creates a new feature of the given {@link FeatureType} and uses the given
|
|
385 |
* {@link Feature} as default values to initialize it.
|
|
386 |
*
|
|
387 |
* @param type
|
|
388 |
* the new feature's feature type
|
|
389 |
*
|
|
390 |
* @param defaultValues
|
|
391 |
* a feature whose values are used as default values for the new
|
|
392 |
* feature.
|
|
393 |
*
|
|
394 |
* @return the new feature.
|
|
395 |
*
|
|
396 |
* @throws DataException
|
|
397 |
*/
|
|
398 |
public EditableFeature createNewFeature(FeatureType type,
|
|
399 |
Feature defaultValues) throws DataException;
|
|
400 | 400 |
|
401 |
/** |
|
402 |
* Creates a new feature of the given {@link FeatureType}. The flag |
|
403 |
* defaultValues is used to indicate whether the new feature should be |
|
404 |
* initialized with default values or not. |
|
405 |
* |
|
406 |
* @param type |
|
407 |
* the new feature's feature type |
|
408 |
* |
|
409 |
* @param defaultValues |
|
410 |
* if true the new feature is initialized with each attribute's default value. |
|
411 |
* |
|
412 |
* @return |
|
413 |
* the new feature |
|
414 |
* |
|
415 |
* @throws DataException |
|
416 |
*/ |
|
417 |
public EditableFeature createNewFeature(FeatureType type, |
|
418 |
boolean defaultValues) throws DataException; |
|
401 |
/** |
|
402 |
* Creates a new feature of the given {@link FeatureType}. The flag |
|
403 |
* defaultValues is used to indicate whether the new feature should be |
|
404 |
* initialized with default values or not. |
|
405 |
* |
|
406 |
* @param type |
|
407 |
* the new feature's feature type |
|
408 |
* |
|
409 |
* @param defaultValues |
|
410 |
* if true the new feature is initialized with each attribute's |
|
411 |
* default value. |
|
412 |
* |
|
413 |
* @return |
|
414 |
* the new feature |
|
415 |
* |
|
416 |
* @throws DataException |
|
417 |
*/ |
|
418 |
public EditableFeature createNewFeature(FeatureType type, |
|
419 |
boolean defaultValues) throws DataException; |
|
419 | 420 |
|
420 |
/** |
|
421 |
* Creates a new feature of default {@link FeatureType}. The flag |
|
422 |
* defaultValues is used to indicate whether the new feature should be |
|
423 |
* initialized with default values or not. |
|
424 |
* |
|
425 |
* @param defaultValues |
|
426 |
* if true the new feature is initialized with each attribute's default value. |
|
427 |
* |
|
428 |
* @return |
|
429 |
* the new feature |
|
430 |
* |
|
431 |
* @throws DataException |
|
432 |
*/ |
|
433 |
public EditableFeature createNewFeature(boolean defaultValues) |
|
434 |
throws DataException; |
|
421 |
/** |
|
422 |
* Creates a new feature of default {@link FeatureType}. The flag |
|
423 |
* defaultValues is used to indicate whether the new feature should be |
|
424 |
* initialized with default values or not. |
|
425 |
* |
|
426 |
* @param defaultValues |
|
427 |
* if true the new feature is initialized with each attribute's |
|
428 |
* default value. |
|
429 |
* |
|
430 |
* @return |
|
431 |
* the new feature |
|
432 |
* |
|
433 |
* @throws DataException |
|
434 |
*/ |
|
435 |
public EditableFeature createNewFeature(boolean defaultValues) |
|
436 |
throws DataException; |
|
435 | 437 |
|
436 |
/** |
|
437 |
* Applies the validation rules associated to the given mode to the active {@link FeatureSet}. |
|
438 |
* |
|
439 |
* @param mode |
|
440 |
* can be one of {MODE_QUERY, MODE_FULLEDIT, MODE_APPEND} |
|
441 |
* |
|
442 |
* @throws DataException |
|
443 |
*/ |
|
444 |
public void validateFeatures(int mode) throws DataException; |
|
438 |
/** |
|
439 |
* Applies the validation rules associated to the given mode to the active |
|
440 |
* {@link FeatureSet}. |
|
441 |
* |
|
442 |
* @param mode |
|
443 |
* can be one of {MODE_QUERY, MODE_FULLEDIT, MODE_APPEND} |
|
444 |
* |
|
445 |
* @throws DataException |
|
446 |
*/ |
|
447 |
public void validateFeatures(int mode) throws DataException; |
|
445 | 448 |
|
446 |
/**
|
|
447 |
* Indicates whether this store supports append mode.
|
|
448 |
*
|
|
449 |
* @return
|
|
450 |
* true if this store supports append mode.
|
|
451 |
*/
|
|
452 |
public boolean isAppendModeSupported();
|
|
449 |
/**
|
|
450 |
* Indicates whether this store supports append mode.
|
|
451 |
*
|
|
452 |
* @return
|
|
453 |
* true if this store supports append mode.
|
|
454 |
*/
|
|
455 |
public boolean isAppendModeSupported();
|
|
453 | 456 |
|
454 |
/**
|
|
455 |
* Initiates an editing group. This is typically used to group series of
|
|
456 |
* store editing operations.
|
|
457 |
*
|
|
458 |
* @param description
|
|
459 |
* Description of the editing group.
|
|
460 |
*
|
|
461 |
* @throws NeedEditingModeException
|
|
462 |
*/
|
|
463 |
public void beginEditingGroup(String description)
|
|
464 |
throws NeedEditingModeException;
|
|
457 |
/**
|
|
458 |
* Initiates an editing group. This is typically used to group series of
|
|
459 |
* store editing operations.
|
|
460 |
*
|
|
461 |
* @param description
|
|
462 |
* Description of the editing group.
|
|
463 |
*
|
|
464 |
* @throws NeedEditingModeException
|
|
465 |
*/
|
|
466 |
public void beginEditingGroup(String description)
|
|
467 |
throws NeedEditingModeException;
|
|
465 | 468 |
|
466 |
/**
|
|
467 |
* Finishes an editing group.
|
|
468 |
*
|
|
469 |
* @throws NeedEditingModeException
|
|
470 |
*/
|
|
471 |
public void endEditingGroup() throws NeedEditingModeException;
|
|
469 |
/**
|
|
470 |
* Finishes an editing group.
|
|
471 |
*
|
|
472 |
* @throws NeedEditingModeException
|
|
473 |
*/
|
|
474 |
public void endEditingGroup() throws NeedEditingModeException;
|
|
472 | 475 |
|
473 |
/*
|
|
474 |
* =============================================================
|
|
475 |
*
|
|
476 |
* Index related services
|
|
477 |
*/
|
|
476 |
/*
|
|
477 |
* =============================================================
|
|
478 |
*
|
|
479 |
* Index related services
|
|
480 |
*/
|
|
478 | 481 |
|
479 |
/**
|
|
480 |
* Creates a FeatureIndex with name indexName, given the attributeName and
|
|
481 |
* its featureType.
|
|
482 |
*
|
|
483 |
* @param featureType
|
|
484 |
* The FeatureType to which the indexed attribute belongs.
|
|
485 |
*
|
|
486 |
* @param attributeName
|
|
487 |
* The name of the attributed to be indexed
|
|
488 |
*
|
|
489 |
* @param indexName
|
|
490 |
* The index name
|
|
491 |
*
|
|
492 |
* @return the resulting FeatureIndex
|
|
493 |
*
|
|
494 |
*
|
|
495 |
* @throws FeatureIndexException
|
|
496 |
*/
|
|
497 |
public FeatureIndex createIndex(FeatureType featureType,
|
|
498 |
String attributeName, String indexName) throws DataException;
|
|
482 |
/**
|
|
483 |
* Creates a FeatureIndex with name indexName, given the attributeName and
|
|
484 |
* its featureType.
|
|
485 |
*
|
|
486 |
* @param featureType
|
|
487 |
* The FeatureType to which the indexed attribute belongs.
|
|
488 |
*
|
|
489 |
* @param attributeName
|
|
490 |
* The name of the attributed to be indexed
|
|
491 |
*
|
|
492 |
* @param indexName
|
|
493 |
* The index name
|
|
494 |
*
|
|
495 |
* @return the resulting FeatureIndex
|
|
496 |
*
|
|
497 |
*
|
|
498 |
* @throws FeatureIndexException
|
|
499 |
*/
|
|
500 |
public FeatureIndex createIndex(FeatureType featureType,
|
|
501 |
String attributeName, String indexName) throws DataException;
|
|
499 | 502 |
|
500 |
/** |
|
501 |
* Creates a FeatureIndex with name indexName, given the attributeName and |
|
502 |
* its featureType. This method is intended for background indexing. It |
|
503 |
* receives an observer that will be notified by the process. |
|
504 |
* |
|
505 |
* @param featureType |
|
506 |
* The FeatureType to which the indexed attribute belongs. |
|
507 |
* |
|
508 |
* @param attributeName |
|
509 |
* The name of the attributed to be indexed |
|
510 |
* |
|
511 |
* @param indexName |
|
512 |
* The index name |
|
513 |
* |
|
514 |
* @param observer |
|
515 |
* an observer that will be notified of the indexing process |
|
516 |
* progress. |
|
517 |
* |
|
518 |
* @return the resulting FeatureIndex |
|
519 |
* |
|
520 |
* |
|
521 |
* @throws FeatureIndexException |
|
522 |
*/ |
|
523 |
public FeatureIndex createIndex(FeatureType featureType, |
|
524 |
String attributeName, String indexName, Observer observer) throws DataException; |
|
525 |
/** |
|
526 |
* Returns a FeatureIndexes structure containing all available indexes in |
|
527 |
* the store. |
|
528 |
* |
|
529 |
* @return |
|
530 |
*/ |
|
531 |
public FeatureIndexes getIndexes(); |
|
503 |
public FeatureIndex createIndex(String indexTypeName, |
|
504 |
FeatureType featureType, String attributeName, String indexName) |
|
505 |
throws DataException; |
|
532 | 506 |
|
533 |
/* |
|
534 |
* ============================================================= |
|
535 |
* |
|
536 |
* Selection related services |
|
537 |
*/ |
|
507 |
/** |
|
508 |
* Creates a FeatureIndex with name indexName, given the attributeName and |
|
509 |
* its featureType. This method is intended for background indexing. It |
|
510 |
* receives an observer that will be notified by the process. |
|
511 |
* |
|
512 |
* @param featureType |
|
513 |
* The FeatureType to which the indexed attribute belongs. |
|
514 |
* |
|
515 |
* @param attributeName |
|
516 |
* The name of the attributed to be indexed |
|
517 |
* |
|
518 |
* @param indexName |
|
519 |
* The index name |
|
520 |
* |
|
521 |
* @param observer |
|
522 |
* an observer that will be notified of the indexing process |
|
523 |
* progress. |
|
524 |
* |
|
525 |
* @return the resulting FeatureIndex |
|
526 |
* |
|
527 |
* |
|
528 |
* @throws FeatureIndexException |
|
529 |
*/ |
|
530 |
public FeatureIndex createIndex(FeatureType featureType, |
|
531 |
String attributeName, String indexName, Observer observer) |
|
532 |
throws DataException; |
|
538 | 533 |
|
539 |
/** |
|
540 |
* Sets the selection to the passed {@link FeatureSet} |
|
541 |
* |
|
542 |
* @param selection |
|
543 |
* A {@link FeatureSet} with the requested selection |
|
544 |
*/ |
|
545 |
public void setSelection(FeatureSet selection) throws DataException; |
|
534 |
public FeatureIndex createIndex(String indexTypeName, |
|
535 |
FeatureType featureType, String attributeName, String indexName, |
|
536 |
Observer observer) throws DataException; |
|
546 | 537 |
|
547 |
/** |
|
548 |
* Creates a {@link FeatureSelection} |
|
549 |
* |
|
550 |
* @return |
|
551 |
* a {@link FeatureSelection} |
|
552 |
* |
|
553 |
* @throws DataException |
|
554 |
*/ |
|
555 |
public FeatureSelection createFeatureSelection() throws DataException; |
|
538 |
/** |
|
539 |
* Returns a FeatureIndexes structure containing all available indexes in |
|
540 |
* the store. |
|
541 |
* |
|
542 |
* @return |
|
543 |
*/ |
|
544 |
public FeatureIndexes getIndexes(); |
|
556 | 545 |
|
557 |
/** |
|
558 |
* Returns the current {@link FeatureSelection}. |
|
559 |
* |
|
560 |
* @return |
|
561 |
* current {@link FeatureSelection}. |
|
562 |
* |
|
563 |
* @throws DataException |
|
564 |
*/ |
|
565 |
public FeatureSelection getFeatureSelection() throws DataException; |
|
546 |
/* |
|
547 |
* ============================================================= |
|
548 |
* |
|
549 |
* Selection related services |
|
550 |
*/ |
|
566 | 551 |
|
567 |
/* |
|
568 |
* ============================================================= |
|
569 |
* |
|
570 |
* Lock related services |
|
571 |
*/ |
|
552 |
/** |
|
553 |
* Sets the selection to the passed {@link FeatureSet} |
|
554 |
* |
|
555 |
* @param selection |
|
556 |
* A {@link FeatureSet} with the requested selection |
|
557 |
*/ |
|
558 |
public void setSelection(FeatureSet selection) throws DataException; |
|
572 | 559 |
|
573 |
/** |
|
574 |
* Indicates whether this store supports locks. |
|
575 |
* |
|
576 |
* @return |
|
577 |
* true if this store supports locks, false if not. |
|
578 |
*/ |
|
579 |
public boolean isLocksSupported(); |
|
560 |
/** |
|
561 |
* Creates a {@link FeatureSelection} |
|
562 |
* |
|
563 |
* @return |
|
564 |
* a {@link FeatureSelection} |
|
565 |
* |
|
566 |
* @throws DataException |
|
567 |
*/ |
|
568 |
public FeatureSelection createFeatureSelection() throws DataException; |
|
580 | 569 |
|
581 |
/**
|
|
582 |
* Returns the set of locked features
|
|
583 |
*
|
|
584 |
* @return
|
|
585 |
* set of locked features
|
|
586 |
*
|
|
587 |
* @throws DataException
|
|
588 |
*/
|
|
589 |
public FeatureLocks getLocks() throws DataException;
|
|
570 |
/**
|
|
571 |
* Returns the current {@link FeatureSelection}.
|
|
572 |
*
|
|
573 |
* @return
|
|
574 |
* current {@link FeatureSelection}.
|
|
575 |
*
|
|
576 |
* @throws DataException
|
|
577 |
*/
|
|
578 |
public FeatureSelection getFeatureSelection() throws DataException;
|
|
590 | 579 |
|
591 |
/*
|
|
592 |
* =============================================================
|
|
593 |
* Transforms related services
|
|
594 |
* =============================================================
|
|
595 |
*/
|
|
580 |
/*
|
|
581 |
* =============================================================
|
|
582 |
*
|
|
583 |
* Lock related services
|
|
584 |
*/
|
|
596 | 585 |
|
597 |
/**
|
|
598 |
* Returns this store transforms
|
|
599 |
*
|
|
600 |
* @return
|
|
601 |
* this store transforms
|
|
602 |
*/
|
|
603 |
public FeatureStoreTransforms getTransforms();
|
|
586 |
/**
|
|
587 |
* Indicates whether this store supports locks.
|
|
588 |
*
|
|
589 |
* @return
|
|
590 |
* true if this store supports locks, false if not.
|
|
591 |
*/
|
|
592 |
public boolean isLocksSupported();
|
|
604 | 593 |
|
605 |
/** |
|
606 |
* Returns a new {@link FeatureQuery} associated to this store. |
|
607 |
* |
|
608 |
* @return |
|
609 |
* a new {@link FeatureQuery} associated to this store. |
|
610 |
*/ |
|
611 |
public FeatureQuery createFeatureQuery(); |
|
594 |
/** |
|
595 |
* Returns the set of locked features |
|
596 |
* |
|
597 |
* @return |
|
598 |
* set of locked features |
|
599 |
* |
|
600 |
* @throws DataException |
|
601 |
*/ |
|
602 |
public FeatureLocks getLocks() throws DataException; |
|
612 | 603 |
|
613 |
/** |
|
614 |
* Returns featue count of this store. |
|
615 |
* |
|
616 |
* @return |
|
617 |
* @throws DataException |
|
618 |
*/ |
|
619 |
public long getFeatureCount() throws DataException; |
|
620 |
|
|
621 |
/** |
|
622 |
* Creates a vectorial cache that is used to save and retrieve data. |
|
623 |
* @param name the cache name. |
|
624 |
* @param parameters parameters to create the stores used to save data. |
|
625 |
* @throws DataException |
|
626 |
*/ |
|
627 |
public void createCache(String name, DynObject parameters) throws DataException; |
|
604 |
/* |
|
605 |
* ============================================================= |
|
606 |
* Transforms related services |
|
607 |
* ============================================================= |
|
608 |
*/ |
|
628 | 609 |
|
629 |
|
|
630 |
/** |
|
631 |
* @return the vectorial cache |
|
632 |
*/ |
|
633 |
public FeatureCache getCache(); |
|
634 |
|
|
635 |
/** |
|
610 |
/** |
|
611 |
* Returns this store transforms |
|
612 |
* |
|
613 |
* @return |
|
614 |
* this store transforms |
|
615 |
*/ |
|
616 |
public FeatureStoreTransforms getTransforms(); |
|
617 |
|
|
618 |
/** |
|
619 |
* Returns a new {@link FeatureQuery} associated to this store. |
|
620 |
* |
|
621 |
* @return |
|
622 |
* a new {@link FeatureQuery} associated to this store. |
|
623 |
*/ |
|
624 |
public FeatureQuery createFeatureQuery(); |
|
625 |
|
|
626 |
/** |
|
627 |
* Returns featue count of this store. |
|
628 |
* |
|
629 |
* @return |
|
630 |
* @throws DataException |
|
631 |
*/ |
|
632 |
public long getFeatureCount() throws DataException; |
|
633 |
|
|
634 |
/** |
|
635 |
* Creates a vectorial cache that is used to save and retrieve data. |
|
636 |
* |
|
637 |
* @param name |
|
638 |
* the cache name. |
|
639 |
* @param parameters |
|
640 |
* parameters to create the stores used to save data. |
|
641 |
* @throws DataException |
|
642 |
*/ |
|
643 |
public void createCache(String name, DynObject parameters) |
|
644 |
throws DataException; |
|
645 |
|
|
646 |
/** |
|
647 |
* @return the vectorial cache |
|
648 |
*/ |
|
649 |
public FeatureCache getCache(); |
|
650 |
|
|
651 |
/** |
|
636 | 652 |
* Return if the provider knows the real envelope of a layer. If not, |
637 | 653 |
* the {@link FeatureStoreProvider#getEnvelope()} method doesn't return |
638 | 654 |
* the full envelope. |
639 | 655 |
* |
640 | 656 |
* @return |
641 |
* <true> if it knows the real envelope. |
|
657 |
* <true> if it knows the real envelope.
|
|
642 | 658 |
*/ |
643 |
public boolean isKnownEnvelope();
|
|
644 |
|
|
659 |
public boolean isKnownEnvelope(); |
|
660 |
|
|
645 | 661 |
/** |
646 | 662 |
* Return if the maximum number of features provided by the |
647 | 663 |
* provider are limited. |
648 | 664 |
* |
649 | 665 |
* @return |
650 |
* <true> if there is a limit of features. |
|
666 |
* <true> if there is a limit of features.
|
|
651 | 667 |
*/ |
652 | 668 |
public boolean hasRetrievedFeaturesLimit(); |
653 |
|
|
669 |
|
|
654 | 670 |
/** |
655 |
* If the {@link FeatureStoreProvider#hasRetrievedFeaturesLimit()} returns true, |
|
671 |
* If the {@link FeatureStoreProvider#hasRetrievedFeaturesLimit()} returns |
|
672 |
* true, |
|
656 | 673 |
* it returns the limit of features retrieved from the provider. |
674 |
* |
|
657 | 675 |
* @return |
658 |
* The limit of the retrieved features. |
|
676 |
* The limit of the retrieved features.
|
|
659 | 677 |
*/ |
660 | 678 |
public int getRetrievedFeaturesLimit(); |
661 | 679 |
} |
662 |
|
Also available in: Unified diff