root / branches / dal_time_support / libraries / libFMap_dal / src / org / gvsig / fmap / dal / feature / spi / AbstractFeatureStoreProvider.java @ 35983
History | View | Annotate | Download (14.6 KB)
1 | 29391 | jmvivo | /* gvSIG. Geographic Information System of the Valencian Government
|
---|---|---|---|
2 | *
|
||
3 | * Copyright (C) 2007-2008 Infrastructures and Transports Department
|
||
4 | * of the Valencian Government (CIT)
|
||
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 2
|
||
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 | */
|
||
22 | |||
23 | /*
|
||
24 | * AUTHORS (In addition to CIT):
|
||
25 | * 2008 {{Company}} {{Task}}
|
||
26 | */
|
||
27 | |||
28 | 24496 | jmvivo | package org.gvsig.fmap.dal.feature.spi; |
29 | 23772 | jjdelcerro | |
30 | 34620 | jpiera | import java.util.Collection; |
31 | 23772 | jjdelcerro | import java.util.Iterator; |
32 | |||
33 | 24496 | jmvivo | import org.gvsig.fmap.dal.DALLocator; |
34 | 29292 | jmvivo | import org.gvsig.fmap.dal.DataServerExplorer; |
35 | 29289 | jmvivo | import org.gvsig.fmap.dal.DataStoreParameters; |
36 | import org.gvsig.fmap.dal.exception.CloseException; |
||
37 | import org.gvsig.fmap.dal.exception.DataException; |
||
38 | import org.gvsig.fmap.dal.exception.InitializeException; |
||
39 | import org.gvsig.fmap.dal.exception.OpenException; |
||
40 | 29292 | jmvivo | import org.gvsig.fmap.dal.exception.ReadException; |
41 | import org.gvsig.fmap.dal.exception.ValidateDataParametersException; |
||
42 | 25587 | vcaballero | import org.gvsig.fmap.dal.feature.FeatureLocks; |
43 | 32902 | cordinyana | import org.gvsig.fmap.dal.feature.FeatureReference; |
44 | 24496 | jmvivo | import org.gvsig.fmap.dal.feature.FeatureSelection; |
45 | 29326 | jmvivo | import org.gvsig.fmap.dal.feature.FeatureStore; |
46 | 24496 | jmvivo | import org.gvsig.fmap.dal.feature.FeatureType; |
47 | 31022 | cordinyana | import org.gvsig.fmap.dal.resource.ResourceAction; |
48 | 29289 | jmvivo | import org.gvsig.fmap.dal.resource.ResourceManager; |
49 | 24496 | jmvivo | import org.gvsig.fmap.dal.resource.spi.ResourceManagerProviderServices; |
50 | import org.gvsig.fmap.dal.resource.spi.ResourceProvider; |
||
51 | 29326 | jmvivo | import org.gvsig.fmap.dal.spi.DataStoreProviderServices; |
52 | 23772 | jjdelcerro | import org.gvsig.fmap.geom.primitive.Envelope; |
53 | 34620 | jpiera | import org.gvsig.timesupport.Interval; |
54 | 31284 | cordinyana | import org.gvsig.tools.dispose.impl.AbstractDisposable; |
55 | 25785 | jmvivo | import org.gvsig.tools.dynobject.DelegatedDynObject; |
56 | import org.gvsig.tools.dynobject.DynClass; |
||
57 | import org.gvsig.tools.dynobject.DynObject; |
||
58 | import org.gvsig.tools.dynobject.exception.DynFieldNotFoundException; |
||
59 | import org.gvsig.tools.dynobject.exception.DynMethodException; |
||
60 | 31284 | cordinyana | import org.gvsig.tools.exception.BaseException; |
61 | 23772 | jjdelcerro | |
62 | 29391 | jmvivo | /**
|
63 | * Abstract implementation of {@link FeatureStoreProvider}
|
||
64 | *
|
||
65 | */
|
||
66 | 31284 | cordinyana | public abstract class AbstractFeatureStoreProvider extends AbstractDisposable |
67 | implements FeatureStoreProvider {
|
||
68 | 23772 | jjdelcerro | |
69 | 29326 | jmvivo | private FeatureStoreProviderServices store;
|
70 | private DelegatedDynObject metadata;
|
||
71 | private DataStoreParameters parameters;
|
||
72 | 23772 | jjdelcerro | |
73 | 29326 | jmvivo | /**
|
74 | * Default Constructor.
|
||
75 | *
|
||
76 | * @param params
|
||
77 | * @param storeServices
|
||
78 | * @param metadata
|
||
79 | */
|
||
80 | protected AbstractFeatureStoreProvider(DataStoreParameters params,
|
||
81 | DataStoreProviderServices storeServices, DynObject metadata) { |
||
82 | this.store = (FeatureStoreProviderServices) storeServices;
|
||
83 | this.metadata = (DelegatedDynObject) metadata;
|
||
84 | this.parameters = params;
|
||
85 | } |
||
86 | |||
87 | /**
|
||
88 | * Constructor when cannot create metada in constrution time. <br>
|
||
89 | * <br>
|
||
90 | * <strong>Note: </strong> Don't use it if not is necesary. Set metada
|
||
91 | * <strong>as soon as posible</strong> by
|
||
92 | * {@link AbstractFeatureStoreProvider#setMetadata(DynObject)}
|
||
93 | 31022 | cordinyana | *
|
94 | 29326 | jmvivo | * @param params
|
95 | * @param storeServices
|
||
96 | */
|
||
97 | protected AbstractFeatureStoreProvider(DataStoreParameters params,
|
||
98 | DataStoreProviderServices storeServices) { |
||
99 | this.store = (FeatureStoreProviderServices) storeServices;
|
||
100 | 29289 | jmvivo | this.metadata = null; |
101 | 29326 | jmvivo | this.parameters = params;
|
102 | 23772 | jjdelcerro | } |
103 | |||
104 | 31022 | cordinyana | public final FeatureProvider getFeatureProviderByReference( |
105 | final FeatureReferenceProviderServices reference)
|
||
106 | throws DataException {
|
||
107 | this.open();
|
||
108 | 32902 | cordinyana | FeatureProvider featureProvider = (FeatureProvider) getResource() |
109 | .execute(new ResourceAction() {
|
||
110 | public Object run() throws Exception { |
||
111 | return internalGetFeatureProviderByReference(reference);
|
||
112 | } |
||
113 | }); |
||
114 | |||
115 | if (featureProvider == null) { |
||
116 | throw new FeatureProviderNotFoundException(reference); |
||
117 | } |
||
118 | |||
119 | return featureProvider;
|
||
120 | 31022 | cordinyana | } |
121 | |||
122 | public final FeatureProvider getFeatureProviderByReference( |
||
123 | final FeatureReferenceProviderServices reference,
|
||
124 | 32902 | cordinyana | final FeatureType featureType) throws DataException { |
125 | 31022 | cordinyana | this.open();
|
126 | 32902 | cordinyana | FeatureProvider featureProvider = (FeatureProvider) getResource() |
127 | .execute(new ResourceAction() {
|
||
128 | 31022 | cordinyana | public Object run() throws Exception { |
129 | return internalGetFeatureProviderByReference(reference,
|
||
130 | featureType); |
||
131 | } |
||
132 | }); |
||
133 | 32902 | cordinyana | |
134 | if (featureProvider == null) { |
||
135 | throw new FeatureProviderNotFoundException(reference); |
||
136 | } |
||
137 | |||
138 | return featureProvider;
|
||
139 | 31022 | cordinyana | } |
140 | |||
141 | 29326 | jmvivo | /**
|
142 | 31022 | cordinyana | * Returns a {@link FeatureProvider} by reference, using the default
|
143 | * {@link FeatureType}. This method may be rewritten by the child classes as
|
||
144 | * an implementation of the
|
||
145 | * {@link #getFeatureProviderByReference(FeatureReferenceProviderServices)}
|
||
146 | * method.
|
||
147 | *
|
||
148 | * @param reference
|
||
149 | * the reference to the {@link FeatureProvider}
|
||
150 | * @return the {@link FeatureProvider} being referenced
|
||
151 | * @throws DataException
|
||
152 | * if there is an error loading the {@link FeatureProvider}
|
||
153 | */
|
||
154 | protected FeatureProvider internalGetFeatureProviderByReference(
|
||
155 | FeatureReferenceProviderServices reference) throws DataException {
|
||
156 | return internalGetFeatureProviderByReference(reference,
|
||
157 | getStoreServices().getDefaultFeatureType()); |
||
158 | } |
||
159 | |||
160 | /**
|
||
161 | 29326 | jmvivo | * Set metada container if this not set at construction time and only in one
|
162 | * time. In other case an Exception will be throw
|
||
163 | *
|
||
164 | * @param metadata
|
||
165 | */
|
||
166 | protected void setMetadata(DynObject metadata) { |
||
167 | if (this.metadata != null) { |
||
168 | // FIXME Exception
|
||
169 | throw new IllegalStateException(); |
||
170 | } |
||
171 | this.metadata = (DelegatedDynObject) metadata;
|
||
172 | 23772 | jjdelcerro | } |
173 | |||
174 | 29289 | jmvivo | /**
|
175 | * @return the parameters
|
||
176 | */
|
||
177 | public DataStoreParameters getParameters() {
|
||
178 | return parameters;
|
||
179 | } |
||
180 | |||
181 | /**
|
||
182 | * Create or get a resource of <code>type</code> for <code>params</code> in
|
||
183 | * {@link ResourceManager}
|
||
184 | *
|
||
185 | * @param type
|
||
186 | * @param params
|
||
187 | * @return
|
||
188 | * @throws InitializeException
|
||
189 | */
|
||
190 | 23894 | jjdelcerro | protected ResourceProvider createResource(String type, Object[] params) |
191 | throws InitializeException {
|
||
192 | ResourceManagerProviderServices manager = (ResourceManagerProviderServices) DALLocator |
||
193 | .getResourceManager(); |
||
194 | 31022 | cordinyana | ResourceProvider resource = manager.createAddResource(type, params); |
195 | 23894 | jjdelcerro | return resource;
|
196 | } |
||
197 | |||
198 | 29289 | jmvivo | /*
|
199 | * (non-Javadoc)
|
||
200 | *
|
||
201 | * @see
|
||
202 | * org.gvsig.fmap.dal.feature.spi.FeatureStoreProvider#getStoreServices()
|
||
203 | */
|
||
204 | 23874 | jjdelcerro | public FeatureStoreProviderServices getStoreServices() {
|
205 | return this.store; |
||
206 | } |
||
207 | |||
208 | 29326 | jmvivo | public FeatureStore getFeatureStore() {
|
209 | return this.store.getFeatureStore(); |
||
210 | } |
||
211 | |||
212 | 29289 | jmvivo | /**
|
213 | * unsupported by default, override this otherwise
|
||
214 | *
|
||
215 | * @see org.gvsig.fmap.dal.feature.spi.FeatureStoreProvider#allowWrite()
|
||
216 | */
|
||
217 | public boolean allowWrite() { |
||
218 | return false; |
||
219 | 23772 | jjdelcerro | } |
220 | |||
221 | 29289 | jmvivo | /**
|
222 | * unsupported by default, override this otherwise
|
||
223 | 29292 | jmvivo | *
|
224 | 29289 | jmvivo | * @see org.gvsig.fmap.dal.feature.spi.FeatureStoreProvider#performChanges(Iterator,
|
225 | * Iterator, Iterator, Iterator)
|
||
226 | */
|
||
227 | |||
228 | public void performChanges(Iterator deleteds, Iterator inserteds, |
||
229 | Iterator updateds, Iterator featureTypesChanged) |
||
230 | throws DataException {
|
||
231 | // FIXME exception
|
||
232 | throw new UnsupportedOperationException(); |
||
233 | |||
234 | 23772 | jjdelcerro | } |
235 | |||
236 | 29289 | jmvivo | /**
|
237 | * unsupported by default, override this otherwise
|
||
238 | *
|
||
239 | * @see org.gvsig.fmap.dal.feature.spi.FeatureStoreProvider#isLocksSupported()
|
||
240 | */
|
||
241 | 23842 | jjdelcerro | public boolean isLocksSupported() { |
242 | return false; |
||
243 | } |
||
244 | |||
245 | 29289 | jmvivo | /**
|
246 | * Default Factory of {@link FeatureProvider}. Create a new default
|
||
247 | * {@link FeatureProvider} instance.<br>
|
||
248 | *
|
||
249 | 29292 | jmvivo | * Override this if you need an special implemtation of
|
250 | * {@link FeatureProvider}.
|
||
251 | 29289 | jmvivo | *
|
252 | * @return
|
||
253 | * @throws DataException
|
||
254 | *
|
||
255 | 29292 | jmvivo | * @see {@link org.gvsig.fmap.dal.feature.spi.FeatureStoreProvider#createFeatureProvider(FeatureType)}
|
256 | 29289 | jmvivo | */
|
257 | |||
258 | 29292 | jmvivo | public FeatureProvider createFeatureProvider(FeatureType type)
|
259 | 23995 | jmvivo | throws DataException {
|
260 | 29292 | jmvivo | return this.store.createDefaultFeatureProvider(type); |
261 | 23772 | jjdelcerro | } |
262 | |||
263 | 29289 | jmvivo | /**
|
264 | * unsupported by default (return <code>null</code>), override this
|
||
265 | * otherwise
|
||
266 | *
|
||
267 | * @see org.gvsig.fmap.dal.feature.spi.FeatureStoreProvider#createFeatureLocks()
|
||
268 | */
|
||
269 | 23772 | jjdelcerro | public FeatureLocks createFeatureLocks() throws DataException { |
270 | 23995 | jmvivo | return null; |
271 | 23772 | jjdelcerro | } |
272 | |||
273 | 29289 | jmvivo | /**
|
274 | * Default Factory of {@link FeatureSelection}. Create a new default
|
||
275 | * {@link FeatureSelection} instance.<br>
|
||
276 | *
|
||
277 | * Override this if you need an special implemtation of
|
||
278 | * {@link FeatureSelection}.
|
||
279 | *
|
||
280 | * @return
|
||
281 | * @throws DataException
|
||
282 | *
|
||
283 | * @see org.gvsig.fmap.dal.feature.spi.FeatureStoreProvider#createFeatureSelection()
|
||
284 | */
|
||
285 | 23772 | jjdelcerro | public FeatureSelection createFeatureSelection() throws DataException { |
286 | return this.store.createDefaultFeatureSelection(); |
||
287 | } |
||
288 | |||
289 | 29289 | jmvivo | /**
|
290 | * do nothing by default, override this otherwise
|
||
291 | *
|
||
292 | * @see org.gvsig.fmap.dal.feature.spi.FeatureStoreProvider#refresh()
|
||
293 | */
|
||
294 | 23772 | jjdelcerro | public void refresh() throws OpenException { |
295 | // Do nothing by default
|
||
296 | } |
||
297 | |||
298 | 29289 | jmvivo | /**
|
299 | * do nothing by default, override this otherwise
|
||
300 | *
|
||
301 | * @see org.gvsig.fmap.dal.feature.spi.FeatureStoreProvider#close()
|
||
302 | */
|
||
303 | 23772 | jjdelcerro | public void close() throws CloseException { |
304 | // Do nothing by default
|
||
305 | } |
||
306 | |||
307 | 31284 | cordinyana | protected void doDispose() throws BaseException { |
308 | 29289 | jmvivo | this.metadata = null; |
309 | 25785 | jmvivo | this.store = null; |
310 | 23772 | jjdelcerro | } |
311 | |||
312 | 29289 | jmvivo | /**
|
313 | * unsupported geometry by default (return <code>null</code>), override this
|
||
314 | * otherwise
|
||
315 | *
|
||
316 | * @see org.gvsig.fmap.dal.feature.spi.FeatureStoreProvider#getEnvelope()
|
||
317 | */
|
||
318 | 25785 | jmvivo | public Envelope getEnvelope() throws DataException { |
319 | 23772 | jjdelcerro | return null; |
320 | } |
||
321 | |||
322 | 29289 | jmvivo | /**
|
323 | * unsupported geometry write by default (return <code>false</code>),
|
||
324 | * override this otherwise
|
||
325 | *
|
||
326 | * @see org.gvsig.fmap.dal.feature.spi.FeatureStoreProvider#canWriteGeometry(int,
|
||
327 | * int)
|
||
328 | */
|
||
329 | public boolean canWriteGeometry(int geometryType, int geometrySubType) |
||
330 | throws DataException {
|
||
331 | return false; |
||
332 | } |
||
333 | 25785 | jmvivo | |
334 | 29289 | jmvivo | // --- Metadata methods ---
|
335 | 25785 | jmvivo | |
336 | public void delegate(DynObject dynObject) { |
||
337 | 29289 | jmvivo | if (this.metadata == null) { |
338 | 25785 | jmvivo | return;
|
339 | } |
||
340 | 29289 | jmvivo | this.metadata.delegate(dynObject);
|
341 | 23772 | jjdelcerro | } |
342 | |||
343 | 25785 | jmvivo | public DynClass getDynClass() {
|
344 | 29289 | jmvivo | if (this.metadata == null) { |
345 | 25785 | jmvivo | return null; |
346 | } |
||
347 | 29289 | jmvivo | return this.metadata.getDynClass(); |
348 | 23772 | jjdelcerro | } |
349 | |||
350 | 25785 | jmvivo | public Object getDynValue(String name) throws DynFieldNotFoundException { |
351 | 29289 | jmvivo | if (this.metadata == null) { |
352 | 25785 | jmvivo | return null; |
353 | } |
||
354 | 25924 | jmvivo | // TODO this.open??
|
355 | 29289 | jmvivo | return this.metadata.getDynValue(name); |
356 | 25785 | jmvivo | } |
357 | 23772 | jjdelcerro | |
358 | 25785 | jmvivo | public boolean hasDynValue(String name) { |
359 | 29289 | jmvivo | if (this.metadata == null) { |
360 | 25785 | jmvivo | return false; |
361 | } |
||
362 | 25924 | jmvivo | // TODO this.open??
|
363 | 29289 | jmvivo | return this.metadata.hasDynValue(name); |
364 | 25785 | jmvivo | } |
365 | 23772 | jjdelcerro | |
366 | 25785 | jmvivo | public void implement(DynClass dynClass) { |
367 | 29289 | jmvivo | if (this.metadata == null) { |
368 | 25785 | jmvivo | return;
|
369 | } |
||
370 | 29289 | jmvivo | this.metadata.implement(dynClass);
|
371 | 25785 | jmvivo | |
372 | } |
||
373 | |||
374 | public Object invokeDynMethod(int code, DynObject context) |
||
375 | throws DynMethodException {
|
||
376 | 29289 | jmvivo | if (this.metadata == null) { |
377 | 25785 | jmvivo | return null; |
378 | } |
||
379 | 25924 | jmvivo | // TODO this.open??
|
380 | 29289 | jmvivo | return this.metadata.invokeDynMethod(this, code, context); |
381 | 25785 | jmvivo | } |
382 | |||
383 | public Object invokeDynMethod(String name, DynObject context) |
||
384 | throws DynMethodException {
|
||
385 | 29289 | jmvivo | if (this.metadata == null) { |
386 | 25785 | jmvivo | return null; |
387 | } |
||
388 | 25924 | jmvivo | // TODO this.open??
|
389 | 29289 | jmvivo | return this.metadata.invokeDynMethod(this, name, context); |
390 | 25785 | jmvivo | } |
391 | |||
392 | public void setDynValue(String name, Object value) |
||
393 | throws DynFieldNotFoundException {
|
||
394 | 29289 | jmvivo | if (this.metadata == null) { |
395 | 25785 | jmvivo | return;
|
396 | } |
||
397 | 25924 | jmvivo | // TODO this.open??
|
398 | 29289 | jmvivo | this.metadata.setDynValue(name, value);
|
399 | 25785 | jmvivo | } |
400 | |||
401 | 29289 | jmvivo | // --- end Metadata methods ---
|
402 | 27439 | jmvivo | |
403 | 29289 | jmvivo | /**
|
404 | * unsupported by default, override this otherwise
|
||
405 | *
|
||
406 | * @see org.gvsig.fmap.dal.feature.spi.FeatureStoreProvider#allowAutomaticValues()
|
||
407 | */
|
||
408 | 27439 | jmvivo | public boolean allowAutomaticValues() { |
409 | return false; |
||
410 | |||
411 | } |
||
412 | |||
413 | 29289 | jmvivo | /**
|
414 | * unsupported by default, override this otherwise
|
||
415 | *
|
||
416 | * @see org.gvsig.fmap.dal.feature.spi.FeatureStoreProvider#append(org.gvsig.
|
||
417 | * fmap.dal.feature.spi.FeatureProvider)
|
||
418 | */
|
||
419 | 29292 | jmvivo | public void append(FeatureProvider featureProvider) throws DataException { |
420 | 29289 | jmvivo | // FIXME exception
|
421 | throw new UnsupportedOperationException(); |
||
422 | } |
||
423 | |||
424 | /**
|
||
425 | * unsupported by default, override this otherwise
|
||
426 | *
|
||
427 | * @see org.gvsig.fmap.dal.feature.spi.FeatureStoreProvider#beginAppend()
|
||
428 | */
|
||
429 | public void beginAppend() throws DataException { |
||
430 | // FIXME exception
|
||
431 | throw new UnsupportedOperationException(); |
||
432 | } |
||
433 | |||
434 | /**
|
||
435 | * unsupported by default, override this otherwise
|
||
436 | *
|
||
437 | * @see org.gvsig.fmap.dal.feature.spi.FeatureStoreProvider#endAppend()
|
||
438 | */
|
||
439 | public void endAppend() throws DataException { |
||
440 | // FIXME exception
|
||
441 | throw new UnsupportedOperationException(); |
||
442 | } |
||
443 | |||
444 | /**
|
||
445 | * unsupported by default, override this otherwise
|
||
446 | *
|
||
447 | * @see org.gvsig.fmap.dal.feature.spi.FeatureStoreProvider#supportsAppendMode()
|
||
448 | */
|
||
449 | public boolean supportsAppendMode() { |
||
450 | return false; |
||
451 | } |
||
452 | |||
453 | 29292 | jmvivo | /**
|
454 | * unsupported by default (return null), override this otherwise
|
||
455 | *
|
||
456 | * @see org.gvsig.fmap.dal.spi.DataStoreProvider#getChilds()
|
||
457 | */
|
||
458 | public Iterator getChilds() { |
||
459 | return null; |
||
460 | } |
||
461 | |||
462 | /**
|
||
463 | * unsupported by default (return null), override this otherwise
|
||
464 | *
|
||
465 | * @see org.gvsig.fmap.dal.spi.DataStoreProvider#getExplorer()
|
||
466 | */
|
||
467 | public DataServerExplorer getExplorer() throws ReadException, |
||
468 | ValidateDataParametersException { |
||
469 | return null; |
||
470 | } |
||
471 | |||
472 | 31699 | cordinyana | public void clear() { |
473 | if (metadata != null) { |
||
474 | metadata.clear(); |
||
475 | } |
||
476 | } |
||
477 | |||
478 | 31022 | cordinyana | /**
|
479 | * Returns a {@link FeatureProvider} by reference, using the provided
|
||
480 | * {@link FeatureType}. This is the child classes implementation of the
|
||
481 | * {@link #getFeatureProviderByReference(FeatureReferenceProviderServices)}
|
||
482 | * method.
|
||
483 | *
|
||
484 | * @param reference
|
||
485 | * the reference to the {@link FeatureProvider}
|
||
486 | * @param featureType
|
||
487 | * the type of feature to load
|
||
488 | * @return the {@link FeatureProvider} being referenced
|
||
489 | * @throws DataException
|
||
490 | * if there is an error loading the {@link FeatureProvider}
|
||
491 | */
|
||
492 | protected abstract FeatureProvider internalGetFeatureProviderByReference( |
||
493 | FeatureReferenceProviderServices reference, FeatureType featureType) |
||
494 | throws DataException;
|
||
495 | 29292 | jmvivo | |
496 | 32902 | cordinyana | public static class FeatureProviderNotFoundException extends DataException { |
497 | |||
498 | private static final long serialVersionUID = 5161749797695723151L; |
||
499 | |||
500 | public FeatureProviderNotFoundException(FeatureReference reference) {
|
||
501 | super("Cannot retreive FeatureProvider for reference %(reference)", |
||
502 | "_FeatureProviderNotFoundException", serialVersionUID);
|
||
503 | setValue("reference", reference.toString());
|
||
504 | } |
||
505 | } |
||
506 | 34026 | jpiera | |
507 | public boolean isKnownEnvelope(){ |
||
508 | return true; |
||
509 | } |
||
510 | |||
511 | public boolean hasRetrievedFeaturesLimit(){ |
||
512 | return false; |
||
513 | } |
||
514 | |||
515 | public int getRetrievedFeaturesLimit(){ |
||
516 | return -1; |
||
517 | } |
||
518 | |||
519 | 34620 | jpiera | public Interval getInterval() {
|
520 | return null; |
||
521 | 35779 | jpiera | } |
522 | |||
523 | public Collection getTimes() { |
||
524 | // TODO Auto-generated method stub
|
||
525 | 34620 | jpiera | return null; |
526 | } |
||
527 | |||
528 | 35779 | jpiera | public Collection getTimes(Interval interval) { |
529 | // TODO Auto-generated method stub
|
||
530 | 34620 | jpiera | return null; |
531 | 35779 | jpiera | } |
532 | 31022 | cordinyana | } |