org.geotools.data.wfs.v1_0_0
Class WFSFeatureSource

Object
  extended by AbstractFeatureSource
      extended by WFSFeatureSource
All Implemented Interfaces:
FeatureSource<SimpleFeatureType,SimpleFeature>, SimpleFeatureSource
Direct Known Subclasses:
WFSFeatureStore

public class WFSFeatureSource
extends AbstractFeatureSource
implements SimpleFeatureSource

FeatureSource extension interface to provide WFS specific extra information.

Author:
dzwiers

Nested Class Summary
static class WFSFeatureSource.WFSFeatureResults
           
 
Field Summary
protected  WFS_1_0_0_DataStore ds
           
protected  String fname
           
 
Fields inherited from class AbstractFeatureSource
hints, queryCapabilities
 
Constructor Summary
protected WFSFeatureSource(WFS_1_0_0_DataStore ds, String fname)
           
 
Method Summary
 void addFeatureListener(FeatureListener listener)
          Registers a listening object that will be notified of changes to this FeatureSource.
 ReferencedEnvelope getBounds()
          Retrieve Bounds of all Features.
 ReferencedEnvelope getBounds(Query query)
          Retrieve Bounds of Query results.
 DataStore getDataStore()
          Overrides to explicitly type narrow the return type to DataStore
 SimpleFeatureCollection getFeatures()
          Retrieve all Features.
 SimpleFeatureCollection getFeatures(Filter filter)
          Retrieve all Feature matching the Filter.
 SimpleFeatureCollection getFeatures(Query query)
          Provides an interface to for the Results of a Query.
 ResourceInfo getInfo()
          Resource information from the wfs capabilities document.
 Name getName()
          Returns the same name than the feature type (ie, getSchema().getName() to honor the simple feature land common practice of calling the same both the Features produces and their types
 SimpleFeatureType getSchema()
          Retrieves the schema (feature type) that will apply to features retrieved from this FeatureSource.
 Set getSupportedHints()
          By default, no Hints are supported
 Transaction getTransaction()
          Retrieve the Transaction this SimpleFeatureSource is operating against.
 void removeFeatureListener(FeatureListener listener)
          Removes an object from this FeatureSource's listeners.
 
Methods inherited from class AbstractFeatureSource
getCount, getQueryCapabilities, namedQuery
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface FeatureSource
getCount, getQueryCapabilities
 

Field Detail

ds

protected WFS_1_0_0_DataStore ds

fname

protected String fname
Constructor Detail

WFSFeatureSource

protected WFSFeatureSource(WFS_1_0_0_DataStore ds,
                           String fname)
Method Detail

getSupportedHints

public Set getSupportedHints()
Description copied from class: AbstractFeatureSource
By default, no Hints are supported

Specified by:
getSupportedHints in interface FeatureSource<SimpleFeatureType,SimpleFeature>
Overrides:
getSupportedHints in class AbstractFeatureSource
Returns:
a set of RenderingHints#Key objects; may be empty but never null
See Also:
Hints.FEATURE_DETACHED, Hints.JTS_GEOMETRY_FACTORY, Hints.JTS_COORDINATE_SEQUENCE_FACTORY, Hints.JTS_PRECISION_MODEL, Hints.JTS_SRID, Hints.GEOMETRY_DISTANCE, Hints.FEATURE_2D

getName

public Name getName()
Description copied from class: AbstractFeatureSource
Returns the same name than the feature type (ie, getSchema().getName() to honor the simple feature land common practice of calling the same both the Features produces and their types

Specified by:
getName in interface FeatureSource<SimpleFeatureType,SimpleFeature>
Overrides:
getName in class AbstractFeatureSource
Returns:
the name of the features accessible through this FeatureSource
Since:
2.5
See Also:
FeatureSource.getName()

getInfo

public ResourceInfo getInfo()
Resource information from the wfs capabilities document.

Specified by:
getInfo in interface FeatureSource<SimpleFeatureType,SimpleFeature>
Overrides:
getInfo in class AbstractFeatureSource
Returns:
ResoruceInfo from the capabilities document
See Also:
FeatureSource.getInfo()

getDataStore

public DataStore getDataStore()
Description copied from class: AbstractFeatureSource
Overrides to explicitly type narrow the return type to DataStore

Specified by:
getDataStore in interface FeatureSource<SimpleFeatureType,SimpleFeature>
Specified by:
getDataStore in class AbstractFeatureSource
Returns:
the data source providing this FeatureSource
See Also:
FeatureSource.getDataStore()

addFeatureListener

public void addFeatureListener(FeatureListener listener)
Description copied from interface: FeatureSource
Registers a listening object that will be notified of changes to this FeatureSource.

Specified by:
addFeatureListener in interface FeatureSource<SimpleFeatureType,SimpleFeature>
Parameters:
listener - the new listener
See Also:
FeatureSource.addFeatureListener(org.geotools.data.FeatureListener)

removeFeatureListener

public void removeFeatureListener(FeatureListener listener)
Description copied from interface: FeatureSource
Removes an object from this FeatureSource's listeners.

Specified by:
removeFeatureListener in interface FeatureSource<SimpleFeatureType,SimpleFeature>
Parameters:
listener - the listener to remove
See Also:
FeatureSource.removeFeatureListener(org.geotools.data.FeatureListener)

getSchema

public SimpleFeatureType getSchema()
Description copied from interface: FeatureSource
Retrieves the schema (feature type) that will apply to features retrieved from this FeatureSource.

For a homogeneous data source such as a shapefile or a database table, this schema be that of all features. For a heterogeneous data source, e.g. a GML document, the schema returned is the lowest common denominator across all features.

Specified by:
getSchema in interface FeatureSource<SimpleFeatureType,SimpleFeature>
Returns:
the schema that will apply to features retrieved from this FeatureSource
See Also:
FeatureSource.getSchema()

getBounds

public ReferencedEnvelope getBounds()
                             throws IOException
Description copied from class: AbstractFeatureSource
Retrieve Bounds of all Features.

Currently returns null, consider getFeatures().getBounds() instead.

Subclasses may override this method to perform the appropriate optimization for this result.

Specified by:
getBounds in interface FeatureSource<SimpleFeatureType,SimpleFeature>
Overrides:
getBounds in class AbstractFeatureSource
Returns:
null representing the lack of an optimization
Throws:
IOException - DOCUMENT ME!
See Also:
FeatureSource.getBounds()

getBounds

public ReferencedEnvelope getBounds(Query query)
                             throws IOException
Description copied from class: AbstractFeatureSource
Retrieve Bounds of Query results.

Currently returns null, consider getFeatures( query ).getBounds() instead.

Subclasses may override this method to perform the appropriate optimization for this result.

Specified by:
getBounds in interface FeatureSource<SimpleFeatureType,SimpleFeature>
Overrides:
getBounds in class AbstractFeatureSource
Parameters:
query - Query we are requesting the bounds of
Returns:
null representing the lack of an optimization
Throws:
IOException - on any errors calculating the bounds
See Also:
FeatureSource.getBounds(org.geotools.data.Query)

getFeatures

public SimpleFeatureCollection getFeatures()
                                    throws IOException
Description copied from class: AbstractFeatureSource
Retrieve all Features.

Specified by:
getFeatures in interface FeatureSource<SimpleFeatureType,SimpleFeature>
Specified by:
getFeatures in interface SimpleFeatureSource
Overrides:
getFeatures in class AbstractFeatureSource
Returns:
FeatureResults of all Features in FeatureSource
Throws:
IOException - If features could not be obtained
See Also:
FeatureSource.getFeatures()

getFeatures

public SimpleFeatureCollection getFeatures(Filter filter)
                                    throws IOException
Description copied from class: AbstractFeatureSource
Retrieve all Feature matching the Filter.

Specified by:
getFeatures in interface FeatureSource<SimpleFeatureType,SimpleFeature>
Specified by:
getFeatures in interface SimpleFeatureSource
Overrides:
getFeatures in class AbstractFeatureSource
Parameters:
filter - Indicates features to retrieve
Returns:
FeatureResults indicating features matching filter
Throws:
IOException - If results could not be obtained
See Also:
org.geotools.data.FeatureSource#getFeatures(org.geotools.filter.Filter)

getFeatures

public SimpleFeatureCollection getFeatures(Query query)
                                    throws IOException
Description copied from class: AbstractFeatureSource
Provides an interface to for the Results of a Query.

Various queries can be made against the results, the most basic being to retrieve Features.

Specified by:
getFeatures in interface FeatureSource<SimpleFeatureType,SimpleFeature>
Specified by:
getFeatures in interface SimpleFeatureSource
Overrides:
getFeatures in class AbstractFeatureSource
Parameters:
query - DataAccess query for requested information, such as typeName, maxFeatures and filter.
Returns:
features retrieved by the Query
Throws:
IOException - if the underlying data source cannot be accessed.
See Also:
FeatureSource.getFeatures(org.geotools.data.Query)

getTransaction

public Transaction getTransaction()
Description copied from class: AbstractFeatureSource
Retrieve the Transaction this SimpleFeatureSource is operating against.

For a plain SimpleFeatureSource that cannot modify this will always be Transaction.AUTO_COMMIT.

Overrides:
getTransaction in class AbstractFeatureSource
Returns:
Transacstion SimpleFeatureSource is operating against
See Also:
AbstractFeatureSource.getTransaction()


Copyright © 1996-2014 Geotools. All Rights Reserved.