org.geotools.data
Class SampleDataAccessFeatureCollection

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<org.opengis.feature.Feature>
              extended by org.geotools.data.SampleDataAccessFeatureCollection
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<org.opengis.feature.Feature>, java.util.Collection<org.opengis.feature.Feature>, java.util.List<org.opengis.feature.Feature>, java.util.RandomAccess, FeatureCollection<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature>

public class SampleDataAccessFeatureCollection
extends java.util.ArrayList<org.opengis.feature.Feature>
implements FeatureCollection<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature>

Collection of features from a SampleDataAccess.

Since:
2.6
Version:
$Id: SampleDataAccessFeatureCollection.java 32358 2009-01-28 07:28:02Z bencaradocdavies $
Author:
Ben Caradoc-Davies, CSIRO Exploration and Mining
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
SampleDataAccessFeatureCollection()
           
 
Method Summary
 void accepts(org.opengis.feature.FeatureVisitor visitor, org.opengis.util.ProgressListener progress)
          Visit the contents of a feature collection.
 boolean addAll(FeatureCollection<? extends org.opengis.feature.type.FeatureType,? extends org.opengis.feature.Feature> resource)
           
 void addListener(CollectionListener listener)
          Unsupported operation.
 void close(FeatureIterator<org.opengis.feature.Feature> close)
          Nothing to close.
 void close(java.util.Iterator<org.opengis.feature.Feature> close)
          Nothing to close.
 FeatureIterator<org.opengis.feature.Feature> features()
          Get an iterator over the features.
 ReferencedEnvelope getBounds()
          Not yet implemented.
 java.lang.String getID()
          Not yet implemented.
 org.opengis.feature.type.FeatureType getSchema()
          Return type of features.
 void purge()
          Close any outstanding resources released by this resources.
 void removeListener(CollectionListener listener)
          Unsupported operation.
 FeatureCollection<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature> sort(org.opengis.filter.sort.SortBy order)
          Unsupported operation.
 FeatureCollection<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature> subCollection(org.opengis.filter.Filter filter)
          Unsupported operation.
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeRange, retainAll, set, size, subList, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode
 
Methods inherited from class java.util.AbstractCollection
containsAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.geotools.feature.FeatureCollection
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode
 

Constructor Detail

SampleDataAccessFeatureCollection

public SampleDataAccessFeatureCollection()
Method Detail

accepts

public void accepts(org.opengis.feature.FeatureVisitor visitor,
                    org.opengis.util.ProgressListener progress)
             throws java.io.IOException
Description copied from interface: FeatureCollection
Visit the contents of a feature collection.

The order of traversal is dependent on the FeatureCollection implementation; some collections are able to make efficient use of an internal index in order to quickly visit features located in the same region.

Specified by:
accepts in interface FeatureCollection<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature>
Parameters:
visitor - Closure applied to each feature in turn.
progress - Used to report progress, may be used to interrupt the operation
Throws:
java.io.IOException
See Also:
FeatureCollection.accepts(org.opengis.feature.FeatureVisitor, org.opengis.util.ProgressListener)

addAll

public boolean addAll(FeatureCollection<? extends org.opengis.feature.type.FeatureType,? extends org.opengis.feature.Feature> resource)
Specified by:
addAll in interface FeatureCollection<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature>
See Also:
FeatureCollection.addAll(org.geotools.feature.FeatureCollection)

addListener

public void addListener(CollectionListener listener)
                 throws java.lang.NullPointerException
Unsupported operation.

Specified by:
addListener in interface FeatureCollection<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature>
Parameters:
listener - The listener to add
Throws:
java.lang.NullPointerException - If the listener is null.
See Also:
FeatureCollection.addListener(org.geotools.feature.CollectionListener)

close

public void close(FeatureIterator<org.opengis.feature.Feature> close)
Nothing to close.

Specified by:
close in interface FeatureCollection<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature>
See Also:
FeatureCollection.close(org.geotools.feature.FeatureIterator)

close

public void close(java.util.Iterator<org.opengis.feature.Feature> close)
Nothing to close.

Specified by:
close in interface FeatureCollection<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature>
See Also:
FeatureCollection.close(java.util.Iterator)

features

public FeatureIterator<org.opengis.feature.Feature> features()
Get an iterator over the features.

Specified by:
features in interface FeatureCollection<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature>
Returns:
A FeatureIterator.
See Also:
FeatureCollection.features()

getBounds

public ReferencedEnvelope getBounds()
Not yet implemented.

Specified by:
getBounds in interface FeatureCollection<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature>
Returns:
An Envelope containing the total bounds of this collection.
See Also:
FeatureCollection.getBounds()

getID

public java.lang.String getID()
Not yet implemented.

Specified by:
getID in interface FeatureCollection<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature>
See Also:
FeatureCollection.getID()

getSchema

public org.opengis.feature.type.FeatureType getSchema()
Return type of features.

Specified by:
getSchema in interface FeatureCollection<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature>
Returns:
FeatureType describing the "common" schema to all child features of this collection
See Also:
FeatureCollection.getSchema()

purge

public void purge()
Description copied from interface: FeatureCollection
Close any outstanding resources released by this resources.

This method should be used with great caution, it is however available to allow the use of the ResourceCollection with algorthims that are unaware of the need to close iterators after use.

Example of using a normal Collections utility method:


 Collections.sort( collection );
 collection.purge();
 

Specified by:
purge in interface FeatureCollection<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature>
See Also:
FeatureCollection.purge()

removeListener

public void removeListener(CollectionListener listener)
                    throws java.lang.NullPointerException
Unsupported operation.

Specified by:
removeListener in interface FeatureCollection<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature>
Parameters:
listener - The listener to remove
Throws:
java.lang.NullPointerException - If the listener is null.
See Also:
FeatureCollection.removeListener(org.geotools.feature.CollectionListener)

sort

public FeatureCollection<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature> sort(org.opengis.filter.sort.SortBy order)
Unsupported operation.

Specified by:
sort in interface FeatureCollection<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature>
Returns:
FeatureCollection sorted in the indicated order
See Also:
FeatureCollection.sort(org.opengis.filter.sort.SortBy)

subCollection

public FeatureCollection<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature> subCollection(org.opengis.filter.Filter filter)
Unsupported operation.

Specified by:
subCollection in interface FeatureCollection<org.opengis.feature.type.FeatureType,org.opengis.feature.Feature>
Returns:
FeatureCollection identified as subset.
See Also:
FeatureCollection.subCollection(org.opengis.filter.Filter)


Copyright © 1996-2010 Geotools. All Rights Reserved.