01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2002-2006, GeoTools Project Managment Committee (PMC)
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation;
09: * version 2.1 of the License.
10: *
11: * This library 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 GNU
14: * Lesser General Public License for more details.
15: */
16: package org.geotools.data.postgis;
17:
18: import java.io.IOException;
19: import java.util.Set;
20:
21: import org.geotools.data.FeatureReader;
22: import org.geotools.data.FeatureStore;
23: import org.geotools.data.Transaction;
24: import org.geotools.feature.AttributeType;
25: import org.geotools.feature.FeatureCollection;
26: import org.opengis.filter.Filter;
27:
28: /**
29: * Really delegates everything to a wrapped feature store, but allows to
30: * advertise a data store other than the original one
31: *
32: * @author aaime
33: * @since 2.4
34: *
35: */
36: class WrappingPostgisFeatureStore extends WrappingPostgisFeatureSource
37: implements FeatureStore {
38:
39: private FeatureStore wrappedStore;
40:
41: public WrappingPostgisFeatureStore(FeatureStore wrapped,
42: VersionedPostgisDataStore store) {
43: super (wrapped, store);
44: this .wrappedStore = wrapped;
45: }
46:
47: public Set addFeatures(FeatureCollection collection)
48: throws IOException {
49: return wrappedStore.addFeatures(collection);
50: }
51:
52: public Transaction getTransaction() {
53: return wrappedStore.getTransaction();
54: }
55:
56: public void modifyFeatures(AttributeType type, Object value,
57: Filter filter) throws IOException {
58: wrappedStore.modifyFeatures(type, value, filter);
59: }
60:
61: public void modifyFeatures(AttributeType[] type, Object[] value,
62: Filter filter) throws IOException {
63: wrappedStore.modifyFeatures(type, value, filter);
64: }
65:
66: public void removeFeatures(Filter filter) throws IOException {
67: wrappedStore.removeFeatures(filter);
68: }
69:
70: public void setFeatures(FeatureReader reader) throws IOException {
71: wrappedStore.setFeatures(reader);
72: }
73:
74: public void setTransaction(Transaction transaction) {
75: wrappedStore.setTransaction(transaction);
76: }
77:
78: }
|