org.geotools.data
Interface VersioningFeatureStore
- All Superinterfaces:
- FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature>, FeatureStore<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature>, VersioningFeatureSource
- All Known Subinterfaces:
- VersioningFeatureLocking
- All Known Implementing Classes:
- VersionedPostgisFeatureStore
public interface VersioningFeatureStore
- extends VersioningFeatureSource, FeatureStore<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature>
Versioning feature store, provides rollback facilities not included in
standard feature stores, plus the extra methods inherited from
VersioningFeatureSource
- Author:
- Andrea Aime, TOPP
Method Summary |
java.lang.String |
getVersion()
Returns the revision for the current transaction, or null if no transaction is set. |
void |
rollback(java.lang.String toVersion,
org.opengis.filter.Filter filter,
java.lang.String[] users)
Rolls back features matching the filter to the state they had on the
specified version. |
Methods inherited from interface org.geotools.data.FeatureSource |
addFeatureListener, getBounds, getBounds, getCount, getDataStore, getFeatures, getFeatures, getFeatures, getInfo, getName, getQueryCapabilities, getSchema, getSupportedHints, removeFeatureListener |
rollback
void rollback(java.lang.String toVersion,
org.opengis.filter.Filter filter,
java.lang.String[] users)
throws java.io.IOException
- Rolls back features matching the filter to the state they had on the
specified version.
For a feature to be included into the rollback it's sufficient that one
of its states between toVersion
and current matches the
filter.
- Parameters:
toVersion
- target of the rollbackfilter
- limits the feature whose history will be rolled back by an OGC
filterusers
- limits the feaeature whose history will be rolled back, by
catching only those that have been modified by at least one of
the specified users. May be null to avoi user filtering.
- Throws:
java.io.IOException
getVersion
java.lang.String getVersion()
throws java.io.IOException,
java.lang.UnsupportedOperationException
- Returns the revision for the current transaction, or null if no transaction is set.
This operation is optional, some datastore may not be able to determine the version before
the commit, in that case an
UnsupportedOperationException
will be thrown
- Returns:
-
- Throws:
java.io.IOException
java.lang.UnsupportedOperationException
Copyright © 1996-2010 Geotools. All Rights Reserved.