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