svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.api / src / test / java / org / gvsig / fmap / dal / feature / DummyFetureStore.java @ 43558
History | View | Annotate | Download (13.4 KB)
1 |
|
---|---|
2 |
package org.gvsig.fmap.dal.feature; |
3 |
|
4 |
import java.util.Collection; |
5 |
import java.util.Iterator; |
6 |
import java.util.List; |
7 |
import java.util.Set; |
8 |
|
9 |
import org.cresques.cts.IProjection; |
10 |
|
11 |
import org.gvsig.fmap.dal.DataQuery; |
12 |
import org.gvsig.fmap.dal.DataServerExplorer; |
13 |
import org.gvsig.fmap.dal.DataSet; |
14 |
import org.gvsig.fmap.dal.DataStoreParameters; |
15 |
import org.gvsig.fmap.dal.DataStoreProviderFactory; |
16 |
import org.gvsig.fmap.dal.ExpressionBuilder; |
17 |
import org.gvsig.fmap.dal.exception.DataException; |
18 |
import org.gvsig.fmap.dal.exception.ValidateDataParametersException; |
19 |
import org.gvsig.fmap.dal.feature.exception.NeedEditingModeException; |
20 |
import org.gvsig.fmap.geom.SpatialIndex; |
21 |
import org.gvsig.fmap.geom.primitive.Envelope; |
22 |
import org.gvsig.metadata.exceptions.MetadataException; |
23 |
import org.gvsig.timesupport.Interval; |
24 |
import org.gvsig.tools.dynobject.DynClass; |
25 |
import org.gvsig.tools.dynobject.DynObject; |
26 |
import org.gvsig.tools.dynobject.exception.DynFieldNotFoundException; |
27 |
import org.gvsig.tools.dynobject.exception.DynMethodException; |
28 |
import org.gvsig.tools.exception.BaseException; |
29 |
import org.gvsig.tools.observer.Observer; |
30 |
import org.gvsig.tools.persistence.PersistentState; |
31 |
import org.gvsig.tools.persistence.exception.PersistenceException; |
32 |
import org.gvsig.tools.undo.RedoException; |
33 |
import org.gvsig.tools.undo.UndoException; |
34 |
import org.gvsig.tools.visitor.Visitor; |
35 |
|
36 |
/**
|
37 |
* This class is intended to be used in test.
|
38 |
* Use it directly or extend it and overwrite the methods you need.
|
39 |
* This class is maintained as part of the DAL API.
|
40 |
*/
|
41 |
|
42 |
|
43 |
public class DummyFetureStore implements FeatureStore { |
44 |
|
45 |
@Override
|
46 |
public Object clone() throws CloneNotSupportedException { |
47 |
return super.clone(); |
48 |
} |
49 |
|
50 |
@Override
|
51 |
public boolean allowWrite() { |
52 |
return false; |
53 |
} |
54 |
|
55 |
@Override
|
56 |
public FeatureType getDefaultFeatureType() throws DataException { |
57 |
return null; |
58 |
} |
59 |
|
60 |
@Override
|
61 |
public FeatureType getFeatureType(String featureTypeId) throws DataException { |
62 |
return null; |
63 |
} |
64 |
|
65 |
@Override
|
66 |
public List getFeatureTypes() throws DataException { |
67 |
return null; |
68 |
} |
69 |
|
70 |
@Override
|
71 |
public DataStoreParameters getParameters() {
|
72 |
return null; |
73 |
} |
74 |
|
75 |
@Override
|
76 |
public boolean canWriteGeometry(int gvSIGgeometryType) throws DataException { |
77 |
return false; |
78 |
} |
79 |
|
80 |
@Override
|
81 |
public Envelope getEnvelope() throws DataException { |
82 |
return null; |
83 |
} |
84 |
|
85 |
@Override
|
86 |
public IProjection getSRSDefaultGeometry() throws DataException { |
87 |
return null; |
88 |
} |
89 |
|
90 |
@Override
|
91 |
public void export(DataServerExplorer explorer, String provider, NewFeatureStoreParameters params) throws DataException { |
92 |
|
93 |
} |
94 |
|
95 |
@Override
|
96 |
public FeatureSet getFeatureSet() throws DataException { |
97 |
return null; |
98 |
} |
99 |
|
100 |
@Override
|
101 |
public FeatureSet getFeatureSet(FeatureQuery featureQuery) throws DataException { |
102 |
return null; |
103 |
} |
104 |
|
105 |
@Override
|
106 |
public void getFeatureSet(FeatureQuery featureQuery, Observer observer) throws DataException { |
107 |
|
108 |
} |
109 |
|
110 |
@Override
|
111 |
public void getFeatureSet(Observer observer) throws DataException { |
112 |
|
113 |
} |
114 |
|
115 |
@Override
|
116 |
public List<Feature> getFeatures(FeatureQuery query, int pageSize) { |
117 |
return null; |
118 |
} |
119 |
|
120 |
@Override
|
121 |
public Feature getFeatureByReference(FeatureReference reference) throws DataException { |
122 |
return null; |
123 |
} |
124 |
|
125 |
@Override
|
126 |
public Feature getFeatureByReference(FeatureReference reference, FeatureType featureType) throws DataException { |
127 |
return null; |
128 |
} |
129 |
|
130 |
@Override
|
131 |
public void edit() throws DataException { |
132 |
|
133 |
} |
134 |
|
135 |
@Override
|
136 |
public void edit(int mode) throws DataException { |
137 |
|
138 |
} |
139 |
|
140 |
@Override
|
141 |
public void cancelEditing() throws DataException { |
142 |
|
143 |
} |
144 |
|
145 |
@Override
|
146 |
public void finishEditing() throws DataException { |
147 |
|
148 |
} |
149 |
|
150 |
@Override
|
151 |
public void commitChanges() throws DataException { |
152 |
|
153 |
} |
154 |
|
155 |
@Override
|
156 |
public boolean canCommitChanges() throws DataException { |
157 |
return false; |
158 |
} |
159 |
|
160 |
@Override
|
161 |
public boolean isEditing() { |
162 |
return false; |
163 |
} |
164 |
|
165 |
@Override
|
166 |
public boolean isAppending() { |
167 |
return false; |
168 |
} |
169 |
|
170 |
@Override
|
171 |
public void update(EditableFeatureType featureType) throws DataException { |
172 |
|
173 |
} |
174 |
|
175 |
@Override
|
176 |
public void update(EditableFeature feature) throws DataException { |
177 |
|
178 |
} |
179 |
|
180 |
@Override
|
181 |
public void delete(Feature feature) throws DataException { |
182 |
|
183 |
} |
184 |
|
185 |
@Override
|
186 |
public void insert(EditableFeature feature) throws DataException { |
187 |
|
188 |
} |
189 |
|
190 |
@Override
|
191 |
public EditableFeature createNewFeature() throws DataException { |
192 |
return null; |
193 |
} |
194 |
|
195 |
@Override
|
196 |
public EditableFeature createNewFeature(FeatureType type, Feature defaultValues) throws DataException { |
197 |
return null; |
198 |
} |
199 |
|
200 |
@Override
|
201 |
public EditableFeature createNewFeature(FeatureType type, boolean defaultValues) throws DataException { |
202 |
return null; |
203 |
} |
204 |
|
205 |
@Override
|
206 |
public EditableFeature createNewFeature(boolean defaultValues) throws DataException { |
207 |
return null; |
208 |
} |
209 |
|
210 |
@Override
|
211 |
public EditableFeature createNewFeature(Feature defaultValues) throws DataException { |
212 |
return null; |
213 |
} |
214 |
|
215 |
@Override
|
216 |
public void validateFeatures(int mode) throws DataException { |
217 |
|
218 |
} |
219 |
|
220 |
@Override
|
221 |
public boolean isAppendModeSupported() { |
222 |
return false; |
223 |
} |
224 |
|
225 |
@Override
|
226 |
public void beginEditingGroup(String description) throws NeedEditingModeException { |
227 |
|
228 |
} |
229 |
|
230 |
@Override
|
231 |
public void endEditingGroup() throws NeedEditingModeException { |
232 |
|
233 |
} |
234 |
|
235 |
@Override
|
236 |
public FeatureIndex createIndex(FeatureType featureType, String attributeName, String indexName) throws DataException { |
237 |
return null; |
238 |
} |
239 |
|
240 |
@Override
|
241 |
public FeatureIndex createIndex(String indexTypeName, FeatureType featureType, String attributeName, String indexName) throws DataException { |
242 |
return null; |
243 |
} |
244 |
|
245 |
@Override
|
246 |
public FeatureIndex createIndex(FeatureType featureType, String attributeName, String indexName, Observer observer) throws DataException { |
247 |
return null; |
248 |
} |
249 |
|
250 |
@Override
|
251 |
public FeatureIndex createIndex(String indexTypeName, FeatureType featureType, String attributeName, String indexName, Observer observer) throws DataException { |
252 |
return null; |
253 |
} |
254 |
|
255 |
@Override
|
256 |
public FeatureIndexes getIndexes() {
|
257 |
return null; |
258 |
} |
259 |
|
260 |
@Override
|
261 |
public void setSelection(FeatureSet selection) throws DataException { |
262 |
|
263 |
} |
264 |
|
265 |
@Override
|
266 |
public FeatureSelection createFeatureSelection() throws DataException { |
267 |
return null; |
268 |
} |
269 |
|
270 |
@Override
|
271 |
public FeatureSelection getFeatureSelection() throws DataException { |
272 |
return null; |
273 |
} |
274 |
|
275 |
@Override
|
276 |
public boolean isLocksSupported() { |
277 |
return false; |
278 |
} |
279 |
|
280 |
@Override
|
281 |
public FeatureLocks getLocks() throws DataException { |
282 |
return null; |
283 |
} |
284 |
|
285 |
@Override
|
286 |
public FeatureStoreTransforms getTransforms() {
|
287 |
return null; |
288 |
} |
289 |
|
290 |
@Override
|
291 |
public FeatureQuery createFeatureQuery() {
|
292 |
return null; |
293 |
} |
294 |
|
295 |
@Override
|
296 |
public long getFeatureCount() throws DataException { |
297 |
return 0; |
298 |
} |
299 |
|
300 |
// @Override
|
301 |
// public void createCache(String name, DynObject parameters) throws DataException {
|
302 |
//
|
303 |
// }
|
304 |
//
|
305 |
// @Override
|
306 |
// public FeatureCache getCache() {
|
307 |
// return null;
|
308 |
// }
|
309 |
|
310 |
@Override
|
311 |
public boolean isKnownEnvelope() { |
312 |
return false; |
313 |
} |
314 |
|
315 |
@Override
|
316 |
public boolean hasRetrievedFeaturesLimit() { |
317 |
return false; |
318 |
} |
319 |
|
320 |
@Override
|
321 |
public int getRetrievedFeaturesLimit() { |
322 |
return 0; |
323 |
} |
324 |
|
325 |
@Override
|
326 |
public Feature getFeature(DynObject dynobject) {
|
327 |
return null; |
328 |
} |
329 |
|
330 |
@Override
|
331 |
public Iterator iterator() { |
332 |
return null; |
333 |
} |
334 |
|
335 |
@Override
|
336 |
public String getName() { |
337 |
return null; |
338 |
} |
339 |
|
340 |
@Override
|
341 |
public String getFullName() { |
342 |
return null; |
343 |
} |
344 |
|
345 |
@Override
|
346 |
public String getProviderName() { |
347 |
return null; |
348 |
} |
349 |
|
350 |
@Override
|
351 |
public void refresh() throws DataException { |
352 |
|
353 |
} |
354 |
|
355 |
@Override
|
356 |
public DataSet getDataSet() throws DataException { |
357 |
return null; |
358 |
} |
359 |
|
360 |
@Override
|
361 |
public DataSet getDataSet(DataQuery dataQuery) throws DataException { |
362 |
return null; |
363 |
} |
364 |
|
365 |
@Override
|
366 |
public void accept(Visitor visitor) throws BaseException { |
367 |
|
368 |
} |
369 |
|
370 |
@Override
|
371 |
public void accept(Visitor visitor, DataQuery dataQuery) throws BaseException { |
372 |
|
373 |
} |
374 |
|
375 |
@Override
|
376 |
public void getDataSet(Observer observer) throws DataException { |
377 |
|
378 |
} |
379 |
|
380 |
@Override
|
381 |
public void getDataSet(DataQuery dataQuery, Observer observer) throws DataException { |
382 |
|
383 |
} |
384 |
|
385 |
@Override
|
386 |
public DataSet getSelection() throws DataException { |
387 |
return null; |
388 |
} |
389 |
|
390 |
@Override
|
391 |
public void setSelection(DataSet selection) throws DataException { |
392 |
|
393 |
} |
394 |
|
395 |
@Override
|
396 |
public DataSet createSelection() throws DataException { |
397 |
return null; |
398 |
} |
399 |
|
400 |
@Override
|
401 |
public Iterator getChildren() { |
402 |
return null; |
403 |
} |
404 |
|
405 |
@Override
|
406 |
public DataServerExplorer getExplorer() throws DataException, ValidateDataParametersException { |
407 |
return null; |
408 |
} |
409 |
|
410 |
@Override
|
411 |
public DataQuery createQuery() {
|
412 |
return null; |
413 |
} |
414 |
|
415 |
@Override
|
416 |
public Interval getInterval() {
|
417 |
return null; |
418 |
} |
419 |
|
420 |
@Override
|
421 |
public Collection getTimes() { |
422 |
return null; |
423 |
} |
424 |
|
425 |
@Override
|
426 |
public Collection getTimes(Interval interval) { |
427 |
return null; |
428 |
} |
429 |
|
430 |
@Override
|
431 |
public void disableNotifications() { |
432 |
|
433 |
} |
434 |
|
435 |
@Override
|
436 |
public void enableNotifications() { |
437 |
|
438 |
} |
439 |
|
440 |
@Override
|
441 |
public void beginComplexNotification() { |
442 |
|
443 |
} |
444 |
|
445 |
@Override
|
446 |
public void endComplexNotification() { |
447 |
|
448 |
} |
449 |
|
450 |
@Override
|
451 |
public void addObserver(Observer obsrvr) { |
452 |
|
453 |
} |
454 |
|
455 |
@Override
|
456 |
public void deleteObserver(Observer obsrvr) { |
457 |
|
458 |
} |
459 |
|
460 |
@Override
|
461 |
public void deleteObservers() { |
462 |
|
463 |
} |
464 |
|
465 |
@Override
|
466 |
public void saveToState(PersistentState ps) throws PersistenceException { |
467 |
|
468 |
} |
469 |
|
470 |
@Override
|
471 |
public void loadFromState(PersistentState ps) throws PersistenceException { |
472 |
|
473 |
} |
474 |
|
475 |
@Override
|
476 |
public Object getMetadataID() throws MetadataException { |
477 |
return null; |
478 |
} |
479 |
|
480 |
@Override
|
481 |
public String getMetadataName() throws MetadataException { |
482 |
return null; |
483 |
} |
484 |
|
485 |
@Override
|
486 |
public Set getMetadataChildren() throws MetadataException { |
487 |
return null; |
488 |
} |
489 |
|
490 |
@Override
|
491 |
public DynClass getDynClass() {
|
492 |
return null; |
493 |
} |
494 |
|
495 |
@Override
|
496 |
public void implement(DynClass dc) { |
497 |
|
498 |
} |
499 |
|
500 |
@Override
|
501 |
public void delegate(DynObject d) { |
502 |
|
503 |
} |
504 |
|
505 |
@Override
|
506 |
public Object getDynValue(String string) throws DynFieldNotFoundException { |
507 |
return null; |
508 |
} |
509 |
|
510 |
@Override
|
511 |
public void setDynValue(String string, Object o) throws DynFieldNotFoundException { |
512 |
|
513 |
} |
514 |
|
515 |
@Override
|
516 |
public boolean hasDynValue(String string) { |
517 |
return false; |
518 |
} |
519 |
|
520 |
@Override
|
521 |
public Object invokeDynMethod(String string, Object[] os) throws DynMethodException { |
522 |
return null; |
523 |
} |
524 |
|
525 |
@Override
|
526 |
public Object invokeDynMethod(int i, Object[] os) throws DynMethodException { |
527 |
return null; |
528 |
} |
529 |
|
530 |
@Override
|
531 |
public void clear() { |
532 |
|
533 |
} |
534 |
|
535 |
@Override
|
536 |
public void dispose() { |
537 |
|
538 |
} |
539 |
|
540 |
@Override
|
541 |
public void undo() throws UndoException { |
542 |
|
543 |
} |
544 |
|
545 |
@Override
|
546 |
public void undo(int i) throws UndoException { |
547 |
|
548 |
} |
549 |
|
550 |
@Override
|
551 |
public void redo() throws RedoException { |
552 |
|
553 |
} |
554 |
|
555 |
@Override
|
556 |
public void redo(int i) throws RedoException { |
557 |
|
558 |
} |
559 |
|
560 |
@Override
|
561 |
public List getUndoInfos() { |
562 |
return null; |
563 |
} |
564 |
|
565 |
@Override
|
566 |
public List getRedoInfos() { |
567 |
return null; |
568 |
} |
569 |
|
570 |
@Override
|
571 |
public boolean canUndo() { |
572 |
return false; |
573 |
} |
574 |
|
575 |
@Override
|
576 |
public boolean canRedo() { |
577 |
return false; |
578 |
} |
579 |
|
580 |
@Override
|
581 |
public List<Feature> getFeatures() { |
582 |
return null; |
583 |
} |
584 |
|
585 |
@Override
|
586 |
public void createCache(String name, DynObject parameters) throws DataException { |
587 |
|
588 |
} |
589 |
|
590 |
@Override
|
591 |
public FeatureCache getCache() {
|
592 |
return null; |
593 |
} |
594 |
|
595 |
@Override
|
596 |
public void useCache(String providerName, DynObject parameters) throws DataException { |
597 |
throw new UnsupportedOperationException(); |
598 |
} |
599 |
|
600 |
@Override
|
601 |
public DataStoreProviderFactory getProviderFactory() {
|
602 |
return null; |
603 |
} |
604 |
|
605 |
@Override
|
606 |
public boolean isBroken() { |
607 |
return false; |
608 |
} |
609 |
|
610 |
@Override
|
611 |
public Throwable getBreakingsCause() { |
612 |
return null; |
613 |
} |
614 |
|
615 |
@Override
|
616 |
public boolean hasDynMethod(String name) { |
617 |
return false; |
618 |
} |
619 |
|
620 |
@Override
|
621 |
public SpatialIndex wrapSpatialIndex(SpatialIndex index) {
|
622 |
return null; |
623 |
} |
624 |
|
625 |
@Override
|
626 |
public ExpressionBuilder createExpressionBuilder() {
|
627 |
return null; |
628 |
} |
629 |
|
630 |
@Override
|
631 |
public ExpressionBuilder createExpression() {
|
632 |
return createExpressionBuilder();
|
633 |
} |
634 |
|
635 |
@Override
|
636 |
public FeatureSet getFeatureSet(String filter) throws DataException { |
637 |
return null; |
638 |
} |
639 |
|
640 |
@Override
|
641 |
public FeatureSet getFeatureSet(String filter, String sortBy) throws DataException { |
642 |
return null; |
643 |
} |
644 |
|
645 |
@Override
|
646 |
public FeatureSet getFeatureSet(String filter, String sortBy, boolean asc) throws DataException { |
647 |
return null; |
648 |
} |
649 |
|
650 |
@Override
|
651 |
public List<Feature> getFeatures(FeatureQuery query) { |
652 |
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
653 |
} |
654 |
} |