org.geotools.data.shapefile
Class ShapefileFeatureStore

java.lang.Object
  extended by org.geotools.data.AbstractFeatureSource
      extended by org.geotools.data.AbstractFeatureStore
          extended by org.geotools.data.shapefile.ShapefileFeatureStore
All Implemented Interfaces:
FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature>, FeatureStore<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature>

public class ShapefileFeatureStore
extends AbstractFeatureStore

Allows read-write access to the contents of a shape file.

Author:
Jody Garnett (Refractions Research Inc)

Field Summary
 
Fields inherited from class org.geotools.data.AbstractFeatureStore
transaction
 
Fields inherited from class org.geotools.data.AbstractFeatureSource
hints, queryCapabilities
 
Constructor Summary
ShapefileFeatureStore(ShapefileDataStore shapefileDataStore, java.util.Set hints, org.opengis.feature.simple.SimpleFeatureType featureType)
           
 
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(Query query)
          Retrieve Bounds of Query results.
 DataStore getDataStore()
          Overrides to explicitly type narrow the return type to DataStore
 ResourceInfo getInfo()
          Information describing the contents of this resoruce.
 org.opengis.feature.simple.SimpleFeatureType getSchema()
          Retrieves the featureType that features extracted from this datasource will be created with.
 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 org.geotools.data.AbstractFeatureStore
addFeatures, addFeatures, getTransaction, modifyFeatures, modifyFeatures, removeFeatures, setFeatures, setTransaction
 
Methods inherited from class org.geotools.data.AbstractFeatureSource
getBounds, getCount, getFeatures, getFeatures, getFeatures, getName, getQueryCapabilities, getSupportedHints, namedQuery
 
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
getBounds, getCount, getFeatures, getFeatures, getFeatures, getName, getQueryCapabilities, getSupportedHints
 

Constructor Detail

ShapefileFeatureStore

public ShapefileFeatureStore(ShapefileDataStore shapefileDataStore,
                             java.util.Set hints,
                             org.opengis.feature.simple.SimpleFeatureType featureType)
Method Detail

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<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature>
Specified by:
getDataStore in class AbstractFeatureSource
Returns:
DataStore implementing this FeatureStore

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.

Parameters:
listener - 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.

Parameters:
listener - FeatureListener

getSchema

public org.opengis.feature.simple.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.

Returns:
the schema of features created by this datasource.

getBounds

public ReferencedEnvelope getBounds(Query query)
                             throws java.io.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<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature>
Overrides:
getBounds in class AbstractFeatureSource
Parameters:
query - Query we are requesting the bounds of
Returns:
null representing the lack of an optimization
Throws:
java.io.IOException - DOCUMENT ME!

getInfo

public ResourceInfo getInfo()
Description copied from interface: FeatureSource
Information describing the contents of this resoruce.

Please note that for FeatureContent:



Copyright © 1996-2010 Geotools. All Rights Reserved.