01: package org.geotools.feature.iso.collection;
02:
03: import org.opengis.feature.FeatureCollection;
04: import org.opengis.feature.simple.SimpleFeatureCollection;
05: import org.opengis.feature.simple.SimpleFeatureCollectionType;
06: import org.opengis.feature.type.FeatureType;
07: import org.opengis.filter.Filter;
08: import org.opengis.filter.FilterFactory;
09:
10: /**
11: * Used as a reasonable default implementation for a subCollection of
12: * simple features.
13: * <p>
14: * Note: to implementors, this is not optimal, please do your own thing - your
15: * users will thank you.
16: * </p>
17: *
18: * @author Jody Garnett, Refractions Research, Inc.
19: * @author Justin Deoliveira, The Open Planning Project
20: */
21: public class SubSimpleFeatureCollection extends SubFeatureCollection
22: implements SimpleFeatureCollection {
23:
24: public SubSimpleFeatureCollection(
25: SimpleFeatureCollection collection, Filter filter,
26: FilterFactory factory) {
27: super (collection, filter, factory);
28: }
29:
30: public FeatureCollection subCollection(
31: org.opengis.filter.Filter filter) {
32: return new SubSimpleFeatureCollection(this , filter, factory);
33: }
34:
35: public FeatureType getMemberType() {
36: return ((SimpleFeatureCollection) collection).getMemberType();
37: }
38:
39: public SimpleFeatureCollectionType getFeatureCollectionType() {
40: return ((SimpleFeatureCollection) collection)
41: .getFeatureCollectionType();
42: }
43:
44: }
|