org.geotools.data.wfs
Class WFSFeatureSource.WFSFeatureResults

java.lang.Object
  extended byorg.geotools.data.store.DataFeatureCollection
      extended byorg.geotools.data.DefaultFeatureResults
          extended byorg.geotools.data.wfs.WFSFeatureSource.WFSFeatureResults
All Implemented Interfaces:
java.util.Collection, Feature, FeatureCollection, FeatureResults, ResourceCollection
Enclosing class:
WFSFeatureSource

public static class WFSFeatureSource.WFSFeatureResults
extends DefaultFeatureResults
implements FeatureResults

Author:
dzwiers

Nested Class Summary
 
Nested classes inherited from class org.geotools.feature.Feature
Feature.NULL
 
Field Summary
 
Fields inherited from class org.geotools.data.DefaultFeatureResults
featureSource
 
Constructor Summary
WFSFeatureSource.WFSFeatureResults(WFSFeatureSource fs, Query query)
           
 
Method Summary
 com.vividsolutions.jts.geom.Envelope getBounds()
          Returns the bounding box of this FeatureResults.
 int getCount()
          Returns the number of Features in this FeatureResults.
 FeatureType getSchema()
          Returns the FeatureType of the contents of this collection.
 FeatureReader reader()
          Provides access to the Features, please note that FeatureReader is a blocking api.
 
Methods inherited from class org.geotools.data.DefaultFeatureResults
collection, getTransaction
 
Methods inherited from class org.geotools.data.store.DataFeatureCollection
accepts, add, addAll, addListener, clear, close, close, closeIterator, contains, containsAll, features, fireChange, fireChange, fireChange, getAttribute, getAttribute, getAttributes, getDefaultGeometry, getFeatureType, getID, getNumberOfAttributes, getParent, isEmpty, iterator, openIteartor, purge, remove, removeAll, removeListener, retainAll, setAttribute, setAttribute, setDefaultGeometry, setParent, size, sort, sort, subCollection, toArray, toArray, writer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.geotools.data.FeatureResults
collection
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Constructor Detail

WFSFeatureSource.WFSFeatureResults

public WFSFeatureSource.WFSFeatureResults(WFSFeatureSource fs,
                                          Query query)
Parameters:
fs -
query -
Method Detail

getSchema

public FeatureType getSchema()
Description copied from interface: FeatureResults
Returns the FeatureType of the contents of this collection.

Please note that for a collection with a mixed contents the FeatureType may be degenerate (ie very generic). For many applications (like shapefiles or tables) the FeatureType can safely be used to describe all the Features in the result set.

Specified by:
getSchema in interface FeatureResults
Overrides:
getSchema in class DefaultFeatureResults
Returns:
DOCUMENT ME!
See Also:
FeatureResults.getSchema()

reader

public FeatureReader reader()
                     throws java.io.IOException
Description copied from interface: FeatureResults
Provides access to the Features, please note that FeatureReader is a blocking api.

Specified by:
reader in interface FeatureResults
Overrides:
reader in class DefaultFeatureResults
Returns:
FeatureReader for this Query
Throws:
java.io.IOException - If results could not be obtained
See Also:
FeatureResults.reader()

getBounds

public com.vividsolutions.jts.geom.Envelope getBounds()
Description copied from interface: FeatureResults
Returns the bounding box of this FeatureResults.

This opperation may be expensive. Consider FeatureSource.getBounds( Query ) as an alternative.

This method is logically the same as:
 
 public Envelope getBounds() throws IOException {
     Envelope newBBox = new Envelope();
     Envelope internal;
     Feature feature;
 
     for (FeatureReader r = reader(); r.hasNext();) {
         feature = r.next();
         internal = feature.getDefaultGeometry().getEnvelopeInternal();
         newBBox.expandToInclude(internal);
     }
     return newBBox;  
 }
 
 

Specified by:
getBounds in interface FeatureResults
Overrides:
getBounds in class DefaultFeatureResults
Returns:
See Also:
FeatureResults.getBounds()

getCount

public int getCount()
             throws java.io.IOException
Description copied from interface: FeatureResults
Returns the number of Features in this FeatureResults.

This opperation may be expensive. Consider FeatureSource.getCount( Query ) as an alternative.

This method is logically the same as:
 
 public int getCount() throws IOException {
     int count = 0;
     for (FeatureReader r = reader(); r.hasNext(); count++) {
         r.next();
     }
     return count;  
 }
 
 

Specified by:
getCount in interface FeatureResults
Overrides:
getCount in class DefaultFeatureResults
Returns:
Throws:
java.io.IOException - If feature could not be read
See Also:
FeatureResults.getCount()


Copyright © GeoTools. All Rights Reserved.