Permalink
Browse files

fix up geogit - this one looks especially sketchy

  • Loading branch information...
jodygarnett committed Oct 30, 2012
1 parent 7937506 commit 0be5e644ccf997c6be87f4372544e2f86ec3b066
@@ -34,9 +34,6 @@
import org.geotools.data.simple.SimpleFeatureCollection;
import org.geotools.data.simple.SimpleFeatureIterator;
import org.geotools.factory.Hints;
-import org.geotools.feature.CollectionListener;
-import org.geotools.feature.FeatureCollection;
-import org.geotools.feature.FeatureIterator;
import org.geotools.geometry.jts.JTS;
import org.geotools.geometry.jts.ReferencedEnvelope;
import org.geotools.referencing.CRS;
@@ -108,10 +105,10 @@ public void setMaxFeatures(Integer maxFeatures) {
private final GeometryDescriptor[] geometryDescriptors;
- private GeometryDescriptor mainGeometry;
+ //private GeometryDescriptor mainGeometry;
public FeatureReprojector(final SimpleFeatureType type) {
- this.mainGeometry = type.getGeometryDescriptor();
+ // this.mainGeometry = type.getGeometryDescriptor();
List<GeometryDescriptor> list = new ArrayList<GeometryDescriptor>(2);
for (AttributeDescriptor att : type.getAttributeDescriptors()) {
@@ -194,13 +191,6 @@ public String getID() {
return null;
}
- /**
- * @see org.geotools.feature.FeatureCollection#purge()
- */
- @Override
- public void purge() {
- }
-
/**
* @see org.geotools.feature.FeatureCollection#getBounds()
*/
@@ -276,26 +266,18 @@ public int size() {
}
/**
- * @see org.geotools.feature.FeatureCollection#iterator()
+ * @see org.geotools.data.simple.SimpleFeatureCollection#features()
+ * @see #iterator()
*/
@Override
- public Iterator<SimpleFeature> iterator() {
+ public SimpleFeatureIterator features() {
final FeatureRefIterator refs = new FeatureRefIterator(typeTree, filter);
Iterator<SimpleFeature> features = new GeoGitFeatureIterator(refs,
type, filter, odb);
if (maxFeatures != null) {
features = Iterators.limit(features, maxFeatures.intValue());
}
- return features;
- }
-
- /**
- * @see org.geotools.data.simple.SimpleFeatureCollection#features()
- * @see #iterator()
- */
- @Override
- public SimpleFeatureIterator features() {
- final Iterator<SimpleFeature> iterator = iterator();
+ final Iterator<SimpleFeature> iterator = features;
return new SimpleFeatureIterator() {
@Override
@@ -470,38 +452,6 @@ public void accepts(FeatureVisitor visitor, ProgressListener progress)
}
- @Override
- public void close(FeatureIterator<SimpleFeature> close) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void close(Iterator<SimpleFeature> close) {
- // TODO Auto-generated method stub
-
- }
-
- /**
- * @see org.geotools.feature.FeatureCollection#addListener(org.geotools.feature.CollectionListener)
- */
- @Override
- public void addListener(CollectionListener listener)
- throws NullPointerException {
- // TODO Auto-generated method stub
-
- }
-
- /**
- * @see org.geotools.feature.FeatureCollection#removeListener(org.geotools.feature.CollectionListener)
- */
- @Override
- public void removeListener(CollectionListener listener)
- throws NullPointerException {
- // TODO Auto-generated method stub
-
- }
-
/**
* @see org.geotools.feature.FeatureCollection#isEmpty()
*/
@@ -510,27 +460,6 @@ public boolean isEmpty() {
return false;
}
- @Override
- public boolean add(SimpleFeature obj) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public boolean addAll(Collection<? extends SimpleFeature> collection) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public boolean addAll(
- FeatureCollection<? extends SimpleFeatureType, ? extends SimpleFeature> resource) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void clear() {
- throw new UnsupportedOperationException();
- }
-
@Override
public boolean contains(Object o) {
throw new UnsupportedOperationException();
@@ -541,20 +470,6 @@ public boolean containsAll(Collection<?> o) {
throw new UnsupportedOperationException();
}
- @Override
- public boolean remove(Object o) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public boolean removeAll(Collection<?> c) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public boolean retainAll(Collection<?> c) {
- throw new UnsupportedOperationException();
- }
@Override
public Object[] toArray() {
Oops, something went wrong.

0 comments on commit 0be5e64

Please sign in to comment.