|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.data.AbstractFeatureSource
This is a starting point for providing your own FeatureSource implementation.
Subclasses must implement:
You may find a FeatureSource implementations that is more specific to your needs - such as JDBCFeatureSource.
For an example of this class customized for use please see MemoryDataStore.
Constructor Summary | |
AbstractFeatureSource()
|
Method Summary | |
com.vividsolutions.jts.geom.Envelope |
getBounds()
Retrieve Bounds of all Features. |
com.vividsolutions.jts.geom.Envelope |
getBounds(Query query)
Retrieve Bounds of Query results. |
int |
getCount(Query query)
Retrieve total number of Query results. |
FeatureCollection |
getFeatures()
Retrieve all Features. |
FeatureCollection |
getFeatures(Filter filter)
Retrieve all Feature matching the Filter. |
FeatureCollection |
getFeatures(Query query)
Provides an interface to for the Resutls of a Query. |
Transaction |
getTransaction()
Retrieve the Transaction this FeatureSource is opperating against. |
protected Query |
namedQuery(Query query)
Ensure query modified with typeName. |
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.FeatureSource |
addFeatureListener, getDataStore, getSchema, removeFeatureListener |
Constructor Detail |
public AbstractFeatureSource()
Method Detail |
public Transaction getTransaction()
For a plain FeatureSource that cannot modify this will always be Transaction.AUTO_COMMIT.
public FeatureCollection getFeatures(Query query)
Various queries can be made against the results, the most basic being to retrieve Features.
getFeatures
in interface FeatureSource
query
-
FeatureSource.getFeatures(org.geotools.data.Query)
public FeatureCollection getFeatures(Filter filter) throws java.io.IOException
getFeatures
in interface FeatureSource
filter
- Indicates features to retrieve
java.io.IOException
- If results could not be obtainedpublic FeatureCollection getFeatures() throws java.io.IOException
getFeatures
in interface FeatureSource
java.io.IOException
- If features could not be obtainedpublic com.vividsolutions.jts.geom.Envelope getBounds() throws java.io.IOException
Currently returns null, consider getFeatures().getBounds() instead.
Subclasses may override this method to perform the appropriate optimization for this result.
getBounds
in interface FeatureSource
java.io.IOException
- DOCUMENT ME!public com.vividsolutions.jts.geom.Envelope getBounds(Query query) throws java.io.IOException
Currently returns null, consider getFeatures( query ).getBounds() instead.
Subclasses may override this method to perform the appropriate optimization for this result.
getBounds
in interface FeatureSource
query
- Query we are requesting the bounds of
java.io.IOException
- DOCUMENT ME!protected Query namedQuery(Query query)
This method will make copy of the provided query, using DefaultQuery, if query.getTypeName is not equal to getSchema().getTypeName().
query
- Origional query
public int getCount(Query query) throws java.io.IOException
Currently returns -1, consider getFeatures( query ).getCount() instead.
Subclasses may override this method to perform the appropriate optimization for this result.
getCount
in interface FeatureSource
query
- Query we are requesting the count of
java.io.IOException
- if there are errors getting the count
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |