|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.geotools.data.DefaultFeatureResults
Description
Details
| Field Summary | |
protected FeatureSource |
featureSource
|
protected Query |
query
|
| Constructor Summary | |
DefaultFeatureResults(FeatureSource source,
Query query)
FeatureResults query against featureSource. |
|
| Method Summary | |
FeatureCollection |
collection()
Provides a stop-gap bridge to our existing Renderers. |
com.vividsolutions.jts.geom.Envelope |
getBounds()
Returns the bounding box of this FeatureResults |
int |
getCount()
Number of Features in this query. |
FeatureType |
getSchema()
FeatureSchema for provided query. |
protected Transaction |
getTransaction()
Returns transaction from featureSource (if it is a FeatureStore), or Transaction.AUTO_COMMIT if it is not. |
FeatureReader |
reader()
Retrieve a FeatureReader for this Query |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Query query
protected FeatureSource featureSource
| Constructor Detail |
public DefaultFeatureResults(FeatureSource source,
Query query)
Please note that is object will not be valid after the transaction has closed.
source - query - | Method Detail |
public FeatureType getSchema()
throws java.io.IOException
If query.retrieveAllProperties() is true the FeatureSource
getSchema() will be returned.
If query.getPropertyNames() is used to limit the result of the Query a sub type will be returned based on FeatureSource.getSchema().
getSchema in interface FeatureResultsjava.io.IOException - DOCUMENT ME!
DataSourceException - DOCUMENT ME!protected Transaction getTransaction()
public FeatureReader reader()
throws java.io.IOException
reader in interface FeatureResultsjava.io.IOException - If results could not be obtained
public com.vividsolutions.jts.geom.Envelope getBounds()
throws java.io.IOException
This implementation will generate the correct results from reader() if the provided FeatureSource does not provide an optimized result via FeatureSource.getBounds( Query ).
If the feature has no geometry, then an empty envelope is returned.
getBounds in interface FeatureResultsjava.io.IOException - If bounds could not be obtained
DataSourceException - See IOExceptionFeatureResults.getBounds()
public int getCount()
throws java.io.IOException
This implementation will generate the correct results from reader() if the provided FeatureSource does not provide an optimized result via FeatureSource.getCount( Query ).
getCount in interface FeatureResultsjava.io.IOException - If feature could not be read
DataSourceException - See IOExceptionFeatureResults.getCount()
public FeatureCollection collection()
throws java.io.IOException
FeatureResultsThis method is logically the same as:
public FeatureCollection collection() throws IOException {
FeatureCollection collection = FeatureCollections.newCollection()
for (FeatureReader r = reader(); r.hasNext();) {
collection.add( r.next() );
}
return collection;
}
collection in interface FeatureResultsjava.io.IOException - If any problems occur aquiring Features
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||