org.geotools.data.wfs.v1_0_0
Class WFSFeatureSource

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

public class WFSFeatureSource
extends AbstractFeatureSource
implements FeatureSource<SimpleFeatureType,SimpleFeature>

FeatureSource extension interface to provide WFS specific extra information.

Author:
dzwiers
Module:

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)
          Adds a listener to the list that's notified each time a change to the FeatureStore occurs.
 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
 FeatureCollection<SimpleFeatureType,SimpleFeature> getFeatures()
          Retrieve all Features.
 FeatureCollection<SimpleFeatureType,SimpleFeature> getFeatures(Filter filter)
           
 FeatureCollection<SimpleFeatureType,SimpleFeature> 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 featureType that features extracted from this datasource will be created with.
 Transaction getTransaction()
          Retrieve the Transaction this FeatureSource is operating against.
 void removeFeatureListener(FeatureListener listener)
          Removes a listener from the list that's notified each time a change to the FeatureStore occurs.
 
Methods inherited from class AbstractFeatureSource
getCount, getFeatures, getQueryCapabilities, getSupportedHints, namedQuery
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface FeatureSource
getCount, getFeatures, getQueryCapabilities, getSupportedHints
 

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

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 AttributeDescriptor for the Features served by 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:
DataStore implementing this FeatureStore
See Also:
FeatureSource.getDataStore()

addFeatureListener

public void addFeatureListener(FeatureListener listener)
Description copied from interface: FeatureSource
Adds a listener to the list that's notified each time a change to the FeatureStore occurs.

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

removeFeatureListener

public void removeFeatureListener(FeatureListener listener)
Description copied from interface: FeatureSource
Removes a listener from the list that's notified each time a change to the FeatureStore occurs.

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

getSchema

public SimpleFeatureType getSchema()
Description copied from interface: FeatureSource
Retrieves the featureType that features extracted from this datasource will be created with.

The schema returned is the LCD supported by all available Features. In the common case of shapfiles and database table this schema will match that of every feature available. In the degenerate GML case this will simply reflect the gml:AbstractFeatureType.

Specified by:
getSchema in interface FeatureSource<SimpleFeatureType,SimpleFeature>
Returns:
the schema of features created by this datasource.
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 - DOCUMENT ME!
See Also:
FeatureSource.getBounds(org.geotools.data.Query)

getFeatures

public FeatureCollection<SimpleFeatureType,SimpleFeature> getFeatures()
                                                               throws IOException
Description copied from class: AbstractFeatureSource
Retrieve all Features.

Specified by:
getFeatures in interface FeatureSource<SimpleFeatureType,SimpleFeature>
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 FeatureCollection<SimpleFeatureType,SimpleFeature> getFeatures(Filter filter)
                                                               throws IOException
Throws:
IOException
See Also:
org.geotools.data.FeatureSource#getFeatures(org.geotools.filter.Filter)

getFeatures

public FeatureCollection<SimpleFeatureType,SimpleFeature> 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>
Overrides:
getFeatures in class AbstractFeatureSource
Parameters:
query - a datasource query object. It encapsulates requested information, such as typeName, maxFeatures and filter.
Returns:
Collection The collection to put the features into.
Throws:
IOException - For all data source errors.
See Also:
FeatureSource.getFeatures(org.geotools.data.Query)

getTransaction

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

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

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


Copyright © 1996-2009 Geotools. All Rights Reserved.