org.geotools.data.wfs.v1_0_0
Class WFSFeatureStore

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

public class WFSFeatureStore
extends WFSFeatureSource
implements FeatureStore<SimpleFeatureType,SimpleFeature>

DOCUMENT ME!

Author:
dzwiers
Module:

Nested Class Summary
 
Nested classes/interfaces inherited from class WFSFeatureSource
WFSFeatureSource.WFSFeatureResults
 
Field Summary
protected  Transaction trans
           
 
Fields inherited from class WFSFeatureSource
ds, fname
 
Fields inherited from class AbstractFeatureSource
hints, queryCapabilities
 
Constructor Summary
WFSFeatureStore(WFS_1_0_0_DataStore ds, String typeName)
           
 
Method Summary
 List<FeatureId> addFeatures(FeatureCollection<SimpleFeatureType,SimpleFeature> collection)
          Adds all features from the passed feature collection to the datasource.
 List<FeatureId> addFeatures(FeatureReader<SimpleFeatureType,SimpleFeature> reader)
           
 Transaction getTransaction()
          Retrieve the Transaction this FeatureSource is operating against.
 void modifyFeatures(AttributeDescriptor[] type, Object[] value, Filter filter2)
          Modifies the passed attribute types with the passed objects in all features that correspond to the passed OGS filter.
 void modifyFeatures(AttributeDescriptor type, Object value, Filter filter)
          Modifies the passed attribute types with the passed objects in all features that correspond to the passed OGS filter.
 void removeFeatures(Filter filter2)
          Removes all of the features specificed by the passed filter from the collection.
 void setFeatures(FeatureReader<SimpleFeatureType,SimpleFeature> reader)
          Deletes the all the current Features of this datasource and adds the new collection.
 void setTransaction(Transaction transaction)
          Provides a transaction for commit/rollback control of this FeatureStore.
 
Methods inherited from class WFSFeatureSource
addFeatureListener, getBounds, getBounds, getDataStore, getFeatures, getFeatures, getFeatures, getInfo, getName, getSchema, removeFeatureListener
 
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
addFeatureListener, getBounds, getBounds, getCount, getDataStore, getFeatures, getFeatures, getFeatures, getInfo, getName, getQueryCapabilities, getSchema, getSupportedHints, removeFeatureListener
 

Field Detail

trans

protected Transaction trans
Constructor Detail

WFSFeatureStore

public WFSFeatureStore(WFS_1_0_0_DataStore ds,
                       String typeName)
Parameters:
ds -
typeName -
Method Detail

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.

Specified by:
getTransaction in interface FeatureStore<SimpleFeatureType,SimpleFeature>
Overrides:
getTransaction in class WFSFeatureSource
Returns:
Transacstion FeatureSource is operating against
See Also:
AbstractFeatureSource.getTransaction()

addFeatures

public List<FeatureId> addFeatures(FeatureReader<SimpleFeatureType,SimpleFeature> reader)
                            throws IOException
Throws:
IOException

addFeatures

public List<FeatureId> addFeatures(FeatureCollection<SimpleFeatureType,SimpleFeature> collection)
                            throws IOException
Description copied from interface: FeatureStore
Adds all features from the passed feature collection to the datasource.

A list of FeatureIds is returned; one for each Feature in the order created. Please note that these FeatureIds may not be assigned until after a commit has been performed.

Specified by:
addFeatures in interface FeatureStore<SimpleFeatureType,SimpleFeature>
Parameters:
collection - The collection of features to add.
Returns:
the FeatureIds of the newly added features.
Throws:
IOException - if anything goes wrong.

removeFeatures

public void removeFeatures(Filter filter2)
                    throws IOException
Description copied from interface: FeatureStore
Removes all of the features specificed by the passed filter from the collection.

Specified by:
removeFeatures in interface FeatureStore<SimpleFeatureType,SimpleFeature>
Parameters:
filter2 - An OpenGIS filter; specifies which features to remove.
Throws:
IOException - If anything goes wrong.
See Also:
org.geotools.data.FeatureStore#removeFeatures(org.geotools.filter.Filter)

modifyFeatures

public void modifyFeatures(AttributeDescriptor[] type,
                           Object[] value,
                           Filter filter2)
                    throws IOException
Description copied from interface: FeatureStore
Modifies the passed attribute types with the passed objects in all features that correspond to the passed OGS filter.

Specified by:
modifyFeatures in interface FeatureStore<SimpleFeatureType,SimpleFeature>
Parameters:
type - The attributes to modify.
value - The values to put in the attribute types.
filter2 - An OGC filter to note which attributes to modify.
Throws:
IOException - if the attribute and object arrays are not eqaul length, if the object types do not match the attribute types, or if there are backend errors.
See Also:
org.geotools.data.FeatureStore#modifyFeatures(org.geotools.feature.AttributeType[], java.lang.Object[], org.geotools.filter.Filter)

modifyFeatures

public void modifyFeatures(AttributeDescriptor type,
                           Object value,
                           Filter filter)
                    throws IOException
Description copied from interface: FeatureStore
Modifies the passed attribute types with the passed objects in all features that correspond to the passed OGS filter. A convenience method for single attribute modifications.

Specified by:
modifyFeatures in interface FeatureStore<SimpleFeatureType,SimpleFeature>
Parameters:
type - The attributes to modify.
value - The values to put in the attribute types.
filter - An OGC filter to note which attributes to modify.
Throws:
IOException - If modificaton is not supported, if the object type do not match the attribute type.
See Also:
org.geotools.data.FeatureStore#modifyFeatures(org.geotools.feature.AttributeType, java.lang.Object, org.geotools.filter.Filter)

setFeatures

public void setFeatures(FeatureReader<SimpleFeatureType,SimpleFeature> reader)
                 throws IOException
Description copied from interface: FeatureStore
Deletes the all the current Features of this datasource and adds the new collection. Primarily used as a convenience method for file datasources.

Specified by:
setFeatures in interface FeatureStore<SimpleFeatureType,SimpleFeature>
Parameters:
reader - - the collection to be written
Throws:
IOException - if there are any datasource errors.
See Also:
FeatureStore.setFeatures(org.geotools.data.FeatureReader)

setTransaction

public void setTransaction(Transaction transaction)
Description copied from interface: FeatureStore
Provides a transaction for commit/rollback control of this FeatureStore.

This method operates as a replacement for setAutoCommitMode. When a transaction is provided you are no longer automatically committing.

In order to return to AutoCommit mode supply the Transaction.AUTO_COMMIT to this method. Since this represents a return to AutoCommit mode the previous Transaction will be commited.

Specified by:
setTransaction in interface FeatureStore<SimpleFeatureType,SimpleFeature>
Parameters:
transaction - DOCUMENT ME!
See Also:
FeatureStore.setTransaction(org.geotools.data.Transaction)


Copyright © 1996-2009 Geotools. All Rights Reserved.