@XmlSchema(URL="http://schemas.opengis.net/wfs/1.1.0/wfs.xsd", specification=OGC_04094)
Package org.opengis.feature
Feature objects.See: Description
-
Interface Summary Interface Description Feature Represents a feature of arbitrary complexity.FeatureAttributeDescriptor Descriptor that gives the name, data type, and cardinality of an attribute from aFeatureType.FeatureCollection Represents a collection of features.FeatureIterator Extends theIteratorinterface to include aclosemethod for cleaning up connections to a persistent store.FeatureListener The listener interface for receiving feature events.FeatureStore Gives a normalized interface to a data provider that can serve up collections ofFeatureobjects.FeatureStoreFactory A provider of spatial information.FeatureStoreListener Interface whose methods are invoked when types are modified in aFeatureStore.FeatureType Describes a feature in an application namespace.FeatureTypeFactory Interface through which newFeatureTypes are made known to aFeatureCanvas.LockRequest Represents the request for a lock.LockResponse Represents a response for a lock request.Query Used by thegetFeaturesmethod of the data store interface, to encapsulate a request.Transaction The controller for transaction withFeatureStore.Transaction.State FeatureStoreimplementations can use this interface to externalize the state they require to implementTransactionsupport. -
Class Summary Class Description DataType Enumeration class whose static constants give the possible data types for Feature attributes.FeatureEvent Instances of this class are passed to the methods ofFeatureListenerwhen a new feature is added to, removed from, or changed within a given feature collection.FeatureStoreEvent Instances of this class are passed to the methods ofFeatureStoreListenerwhen the user of theFeatureStoreadds, deletes, or modifies a feature type. -
Exception Summary Exception Description BackingStoreException Thrown to indicate that aFeatureCollectionoperation could not complete because of a failure in the backing store, or a failure to contact the backing store.FeatureStoreException Thrown to indicate that aFeatureStoreoperation could not complete because of a failure in the backing store, or a failure to contact the backing store.
Package org.opengis.feature Description
Feature objects.
Package Specification
This package is based on the following specifications:
- Ref WFS spec for locking workflow
- Ref Catalog 2.0 spec for paging idea and QueryRequest paging idea
WFS Long Transaction Support
The locking workflow described by FeatureCollection.lock()
methods and LockRequest, and LockResponse,
and indeed the Transaction facilities employed by
FeatureCollection are informed by the requirements
of the WFS specification.
The WFS specification provides an attractive middle ground between full
versioned Features, and light-weight in-process or file lock based approaches. Locks
are maintained for a requested duration. A successful lock operation results
in an authorization token that may be used at a later time. A transaction
may be assigned a token allowing it to work on previously locked features.
WFS allows a lock to be taken out across multiple FeatureCollections in a single
request. We have extended this idea to support FeatureCollection
from different FeatureStores - although we confess that the
authorization tokens are still on a per FeatureStore basis.
Code example:
// The FilterFactory.bnf( "" ) method is unfortuantly mythical
//
FeatureStore featureStore = FeatureStoreFactory.create( new URI("myfile.gml") );
GenericName roads = featureStore.getTypeNames().iterator().next();
FeatureCollection kaslo = featureStore.getFeatures( roads, FilterFactory.bnf( "CITY='kaslo'" );
LockRequest lockRequest = new LockRequest( 45678 );
Transaction t = new Transaction();
kaslo.setTransaction( t );
kaslo.setLock( lockRequest );
kaslo.lock(); // returns LockResponse.PENDING
LockResponse lockResults = t.commit(); // kaslo roads are now locked
String token = lockResults.getToken(); // token now contains a data store specific string (like WDRHENDHA123123ADEF )
// This is a pure momento with no meaning to client code and no documented
// internal strucutre. May not even be human readable.
kaslo.deleteAll( kaslo.subCollection( FilterFactory.bnf( "CITY='kaslo' AND NAME='A street'" ) );
try {
t.commit(); // commit does not even return as we have a lock conflict ...
} catch (IOException locked){
// A stree is safe - we did not use authorization
System.out.println("expected locking message:"+locked);
}
t.useAuthorization( token );
kaslo.deleteAll( kaslo.subCollection( FilterFactory.bnf( "CITY='kaslo' AND NAME='A street'" ) );
lockResults = t.commit(); // lockResults now equals LockResults.NONE as this commit had no lock methods called
At the end of the above example, kaslo A street has been deleted and the remaining streets in kaslo are unlocked since the token has been used.
Related Documentation
org.opengis.metadata- ISO 19115 (TC211) Metadata specificationorg.opengis.filter- defines a query language similar in scope to QueryDefinition
DataMelt 3.0 © DataMelt by jWork.ORG