|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.vfny.geoserver.global.GeoServerFeatureSource
GeoServer wrapper for backend Geotools2 DataStore.
Support FeatureSource decorator for FeatureTypeInfo that takes care of mapping the FeatureTypeInfo's FeatureSource with the schema and definition query configured for it.
Because GeoServer requires that attributes always be returned in the same order we need a way to smoothly inforce this. Could we use this class to do so?
Field Summary | |
protected org.geotools.data.FeatureSource |
source
FeatureSource being served up |
Method Summary | |
void |
addFeatureListener(org.geotools.data.FeatureListener listener)
Implement addFeatureListener. |
static GeoServerFeatureSource |
create(org.geotools.data.FeatureSource featureSource,
org.geotools.feature.FeatureType schema,
org.geotools.filter.Filter definitionQuery)
Factory that make the correct decorator for the provided featureSource. |
com.vividsolutions.jts.geom.Envelope |
getBounds()
Retrieves the total extent of this FeatureSource. |
com.vividsolutions.jts.geom.Envelope |
getBounds(org.geotools.data.Query query)
Retrive the extent of the Query. |
int |
getCount(org.geotools.data.Query query)
Adjust query and forward to source. |
org.geotools.data.DataStore |
getDataStore()
Implement getDataStore. |
org.geotools.data.FeatureResults |
getFeatures()
Implement getFeatures. |
org.geotools.data.FeatureResults |
getFeatures(org.geotools.filter.Filter filter)
Implement getFeatures. |
org.geotools.data.FeatureResults |
getFeatures(org.geotools.data.Query query)
Implement getFeatures. |
org.geotools.feature.FeatureType |
getSchema()
Implement getSchema. |
protected org.geotools.filter.Filter |
makeDefinitionFilter(org.geotools.filter.Filter filter)
If a definition query has been configured for the FeatureTypeInfo, makes and return a new Filter that contains both the query's filter and the layer's definition one, by logic AND'ing them. |
protected org.geotools.data.Query |
makeDefinitionQuery(org.geotools.data.Query query)
Takes a query and adapts it to match re definitionQuery filter configured for a feature type. |
void |
removeFeatureListener(org.geotools.data.FeatureListener listener)
Implement removeFeatureListener. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected org.geotools.data.FeatureSource source
Method Detail |
public static GeoServerFeatureSource create(org.geotools.data.FeatureSource featureSource, org.geotools.feature.FeatureType schema, org.geotools.filter.Filter definitionQuery)
This factory method is public and will be used to create all required subclasses. By comparison the constructors for this class have package visibiliy.
featureSource
- schema
- DOCUMENT ME!definitionQuery
- DOCUMENT ME!
protected org.geotools.data.Query makeDefinitionQuery(org.geotools.data.Query query) throws java.io.IOException
query
- Query against this DataStore
java.io.IOException
- See DataSourceException
org.geotools.data.DataSourceException
- If query could not meet the restrictions of
definitionQueryprotected org.geotools.filter.Filter makeDefinitionFilter(org.geotools.filter.Filter filter) throws org.geotools.data.DataSourceException
filter
- Origional user supplied Filter
org.geotools.data.DataSourceException
- If the filter could not meet the limitations
of definitionQuerypublic org.geotools.data.DataStore getDataStore()
Description ...
getDataStore
in interface org.geotools.data.FeatureSource
FeatureSource.getDataStore()
public void addFeatureListener(org.geotools.data.FeatureListener listener)
Description ...
addFeatureListener
in interface org.geotools.data.FeatureSource
listener
- FeatureSource.addFeatureListener(org.geotools.data.FeatureListener)
public void removeFeatureListener(org.geotools.data.FeatureListener listener)
Description ...
removeFeatureListener
in interface org.geotools.data.FeatureSource
listener
- FeatureSource.removeFeatureListener(org.geotools.data.FeatureListener)
public org.geotools.data.FeatureResults getFeatures(org.geotools.data.Query query) throws java.io.IOException
Description ...
getFeatures
in interface org.geotools.data.FeatureSource
query
-
java.io.IOException
FeatureSource.getFeatures(org.geotools.data.Query)
public org.geotools.data.FeatureResults getFeatures(org.geotools.filter.Filter filter) throws java.io.IOException
Description ...
getFeatures
in interface org.geotools.data.FeatureSource
filter
-
java.io.IOException
FeatureSource.getFeatures(org.geotools.filter.Filter)
public org.geotools.data.FeatureResults getFeatures() throws java.io.IOException
Description ...
getFeatures
in interface org.geotools.data.FeatureSource
java.io.IOException
FeatureSource.getFeatures()
public org.geotools.feature.FeatureType getSchema()
Description ...
getSchema
in interface org.geotools.data.FeatureSource
FeatureSource.getSchema()
public com.vividsolutions.jts.geom.Envelope getBounds() throws java.io.IOException
Please note this extent will reflect the provided definitionQuery.
getBounds
in interface org.geotools.data.FeatureSource
null
if no
optimizations exist.
java.io.IOException
- If bounds of definitionQuerypublic com.vividsolutions.jts.geom.Envelope getBounds(org.geotools.data.Query query) throws java.io.IOException
This method provides access to an optimized getBounds opperation. If no
optimized opperation is available null
will be returned.
You may still make use of getFeatures( Query ).getCount() which will return the correct answer (even if it has to itterate through all the results to do so.
getBounds
in interface org.geotools.data.FeatureSource
query
- User's query
null
if no optimization is
available
java.io.IOException
- If a problem is encountered with sourcepublic int getCount(org.geotools.data.Query query)
This method provides access to an optimized getCount opperation. If no
optimized opperation is available -1
will be returned.
You may still make use of getFeatures( Query ).getCount() which will return the correct answer (even if it has to itterate through all the results to do so).
getCount
in interface org.geotools.data.FeatureSource
query
- User's query.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |