|
GeoAPI 2.0 Build 2005-06-08 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@XmlElement(value="FeatureCollection") public interface FeatureCollection
Represents a collection of features. Implementations and client code
should adhere to the rules set forth by Collection. That is, some methods
are optional to implement, and may throw an UnsupportedOperationException.
Collection| Method Summary | |
|---|---|
boolean |
add(Feature o)
Adds the given feature to this collection. |
boolean |
addAll(Collection<Feature> c)
Adds all of the features contained in the given collection to this collection. |
void |
addFeatureListener(FeatureListener fl)
Adds a listener whose methods will be called whenever a new feature is added or removed from this collection. |
void |
clear()
Removes all of the features contained in this collection. |
void |
close()
If some sort of connection was opened to a backing store to support this collection, then closes this connection. |
boolean |
contains(Feature o)
Checks if the given feature is a member of this collection. |
boolean |
containsAll(Collection<Feature> c)
Checks if every feature in the given collection is also a member of this feature collection. |
LockRequest |
getLockRequest()
Returns the request indicating the duration for the lockAll(java.util.Collection method. |
Transaction |
getTransaction()
Retrieves the current transaction on this feature collection or null if there is no current transaction. |
boolean |
isEmpty()
Returns true if this collection contains no Features. |
FeatureIterator |
iterator()
Returns an iterator that enumerates all of the features in this collection. |
LockResponse |
lock()
Lock this collection of features. |
LockResponse |
lockAll(Collection<Feature> c)
Lock indicated features. |
boolean |
remove(Feature o)
Removes the given feature from this collection. |
boolean |
removeAll(Collection<Feature> c)
Removes the given features from this collection. |
void |
removeFeatureListener(FeatureListener fl)
Removes a listener that was previously added with addFeatureListener(org.opengis.feature.FeatureListener). |
boolean |
retainAll(Collection<Feature> c)
Removes any features from this collection that are not present in the given collection. |
void |
setLockRequest(LockRequest lock)
Indicates the duration, and any additional information for any subsequent lock operations. |
void |
setTransaction(Transaction t)
Begins a new transaction on this collection. |
int |
size()
Returns the size of the collection, if known. |
FeatureCollection |
subCollection(Filter filter)
Returns a collection whose contents are the subset of features in this collection that pass the given filter. |
Object[] |
toArray()
Creates a Feature array and populates it. |
Feature[] |
toArray(Feature[] buffer)
Populates the given array with the features in this collection. |
| Methods inherited from interface Collection |
|---|
addAll, contains, containsAll, equals, hashCode, remove, removeAll, retainAll, toArray |
| Methods inherited from interface Feature |
|---|
getAttribute, getAttribute, getBounds, getFeatureType, getID, getParent, setAttribute, setAttribute |
| Method Detail |
|---|
FeatureIterator iterator()
throws BackingStoreException
FeatureIterator.
iterator in interface Collection<Feature>iterator in interface Iterable<Feature>BackingStoreException - If an error occurs while fetching the features.
Object[] toArray()
throws BackingStoreException,
OutOfMemoryError
Feature array and populates it.
toArray in interface Collection<Feature>BackingStoreException - If an error occurs while fetching the features.
OutOfMemoryError - if the feature collection is too large to fit into memory.
Feature[] toArray(Feature[] buffer)
throws BackingStoreException,
OutOfMemoryError
BackingStoreException - If an error occurs while fetching the features.
OutOfMemoryError - if the feature collection is too large to fit into memory.
boolean isEmpty()
throws BackingStoreException
true if this collection contains no Features.
isEmpty in interface Collection<Feature>BackingStoreException - If an error occurs while checking for features.
@XmlElement(value="numberOfFeatures")
int size()
throws BackingStoreException
size in interface Collection<Feature>BackingStoreException - If an error occurs while checking for features.
boolean contains(Feature o)
throws BackingStoreException
BackingStoreException - If an error occurs while searching the feature.
boolean containsAll(Collection<Feature> c)
throws BackingStoreException
BackingStoreException - If an error occurs while searching the features.
boolean add(Feature o)
throws UnsupportedOperationException,
BackingStoreException
addAll(java.util.Collection) method. The addition of
features takes place within the context of the current
transaction on this feature collection.
add in interface Collection<Feature>UnsupportedOperationException - if the addition of new features is not supported.
BackingStoreException - If an error occurs while adding the feature.
boolean addAll(Collection<Feature> c)
throws UnsupportedOperationException,
BackingStoreException
UnsupportedOperationException - if the addition of new features is not supported.
BackingStoreException - If an error occurs while adding the features.
void clear()
throws UnsupportedOperationException,
BackingStoreException
clear in interface Collection<Feature>UnsupportedOperationException - if the removal of features is not supported.
BackingStoreException - If an error occurs while removing the features.
boolean remove(Feature o)
throws UnsupportedOperationException,
BackingStoreException
UnsupportedOperationException - if the removal of features is not supported.
BackingStoreException - If an error occurs while removing the feature.
boolean removeAll(Collection<Feature> c)
throws UnsupportedOperationException,
BackingStoreException
UnsupportedOperationException - if the removal of features is not supported.
BackingStoreException - If an error occurs while removing the features.
boolean retainAll(Collection<Feature> c)
throws UnsupportedOperationException,
BackingStoreException
UnsupportedOperationException - if the removal of features is not supported.
BackingStoreException - If an error occurs while removing the features.
FeatureCollection subCollection(Filter filter)
throws BackingStoreException
FeatureStore that created this collection
and AND-ing the filter that produced this collection with the given filter.
Compare this method to List.subList(int,int)
from the Java Collections framework.
BackingStoreException - If an error occurs while fetching the features.
void close()
throws IOException
finalize()
method just in case the user forgets to call close so that perhaps things
might get cleaned up.
After invoking this method, all references to the feature listener objects will be cleared and no further events will be fired.
IOExceptionvoid setTransaction(Transaction t)
Implementors of this method should attach some state to the given
transaction by calling Transaction.putState(java.lang.Object, org.opengis.feature.Transaction.State), passing in a
key that identifies this type of collection and a value that is a
data store-specific implementation of the Transaction.State
interface. When the transaction is complete, either
commit() or
rollback()
will be called on the state object that was attached.
Transaction getTransaction()
void setLockRequest(LockRequest lock)
Implementations may provide some TRANSACTION_LOCK constant to request that the
lock only endure for the duration of the current transaction.
LockResponse lockAll(Collection<Feature> c)
LockResponse.
Workflows:
LockRequest + AUTO_COMMIT returns a
LockResponse indicating the success of the operation and authorization
tokens aquired.TRANSACTION_LOCK + Transaction returns TRANSACTION_LOCKRESPONSE
indicating a short term lock is held that will expire at the next commit or rollback.
Use this workflow to reserve content before starting edits.LockRequest + Transaction returns PENDING. Check the result
of commit to discover the success of any lock methods made during the transaction.
AUTO_COMMIT,
TRANSACTION_LOCK for a short term lock, or PENDING
when used in a transaction.LockResponse lock()
LockResponse.
Workflows:
LockRequest + AUTO_COMMIT returns a
LockResponse indicating the success of the operation and authorization
tokens aquired.TRANSACTION_LOCK + Transaction returns TRANSACTION_LOCKRESPONSE
indicating a short term lock is held that will expire at the next commit or rollback.
Use this workflow to reserve content before starting edits.LockRequest + Transaction returns PENDING. Check the result
of commit to discover the success of any lock methods made during the transaction.
AUTO_COMMIT,
TRANSACTION_LOCK for a short term lock, or PENDING
when used in a transaction.LockRequest getLockRequest()
lockAll(java.util.Collection) method.
void addFeatureListener(FeatureListener fl)
FeatureCollection objects
may be the result of a query, the methods of the FeatureListener may
be invoked when a feature's attributes have been updated in such a way
that its values now pass the filter (or no longer pass the filter).
void removeFeatureListener(FeatureListener fl)
addFeatureListener(org.opengis.feature.FeatureListener).
|
GeoAPI 2.0 Build 2005-06-08 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
|
Symbols, terms and definitions | Copyright OpenGIS® Consortium |