| org.geotools.data.FeatureStore
All known Subclasses: org.geotools.data.store.ContentFeatureStore, org.geotools.data.jdbc.JDBCFeatureStore, org.geotools.data.wfs.WFSFeatureStore, org.geotools.data.AbstractFeatureStore, org.geotools.data.postgis.WrappingPostgisFeatureStore,
FeatureStore | public interface FeatureStore extends FeatureSource(Code) | | Provides storage of data for Features.
Individual shapefiles, database tables, etc. are modified through this
interface.
This is a prototype DataSource replacement please see FeatureSource for more
information.
author: Jody Garnett author: Ray Gallagher author: Rob Hranac, TOPP author: Chris Holmes, TOPP version: $Id: FeatureStore.java 22642 2006-11-07 21:00:05Z jgarnett $ |
Method Summary | |
Set | addFeatures(FeatureCollection collection) Adds all features from the passed feature collection to the datasource.
Parameters: collection - The collection of features to add. | Transaction | getTransaction() Used to access the Transaction this DataSource is currently opperating
against. | void | modifyFeatures(AttributeType[] 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 | modifyFeatures(AttributeType 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 filter) Removes all of the features specificed by the passed filter from the
collection. | void | setFeatures(FeatureReader 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.
This method operates as a replacement for setAutoCommitMode. |
addFeatures | Set addFeatures(FeatureCollection collection) throws IOException(Code) | | Adds all features from the passed feature collection to the datasource.
Parameters: collection - The collection of features to add. the FeatureIds of the newly added features. throws: IOException - if anything goes wrong. |
getTransaction | Transaction getTransaction()(Code) | | Used to access the Transaction this DataSource is currently opperating
against.
Example Use: adding features to a road DataSource
Transaction t = roads.getTransaction();
try{
roads.addFeatures( features );
roads.getTransaction().commit();
}
catch( IOException erp ){
//something went wrong;
roads.getTransaction().rollback();
}
Transaction in use, or Transaction.AUTO_COMMIT |
modifyFeatures | void modifyFeatures(AttributeType[] type, Object[] value, Filter filter) throws IOException(Code) | | Modifies the passed attribute types with the passed objects in all
features that correspond to the passed OGS filter.
Parameters: type - The attributes to modify. Parameters: value - The values to put in the attribute types. Parameters: filter - An OGC filter to note which attributes to modify. throws: IOException - if the attribute and object arrays are not eqaullength, if the object types do not match the attribute types,or if there are backend errors. |
modifyFeatures | void modifyFeatures(AttributeType type, Object value, Filter filter) throws IOException(Code) | | 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.
Parameters: type - The attributes to modify. Parameters: value - The values to put in the attribute types. Parameters: filter - An OGC filter to note which attributes to modify. throws: IOException - If modificaton is not supported, if the object typedo not match the attribute type. |
removeFeatures | void removeFeatures(Filter filter) throws IOException(Code) | | Removes all of the features specificed by the passed filter from the
collection.
Parameters: filter - An OpenGIS filter; specifies which features to remove. throws: IOException - If anything goes wrong. |
setFeatures | void setFeatures(FeatureReader reader) throws IOException(Code) | | Deletes the all the current Features of this datasource and adds the new
collection. Primarily used as a convenience method for file
datasources.
Parameters: reader - - the collection to be written throws: IOException - if there are any datasource errors. |
setTransaction | void setTransaction(Transaction transaction)(Code) | | 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.
Parameters: transaction - DOCUMENT ME! |
|
|