|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@XmlElement(value="FeatureCollection") public interface FeatureCollection
Represents a FeatureCollection (explicitly a Collection
Note the "attributes" available in a FeatureCollection are to be
considered a derrived quality based on the contents (or members) of the
collection. An "empty" FeatureCollection should not exist.
Collection
. That is, some methods are optional
to implement, and may throw an UnsupportedOperationException
.
Collection
Method Summary | |
---|---|
void |
accepts(FeatureVisitor visitor,
ProgressListener progress)
Will visit the contents of the feature collection. |
void |
close(Iterator<Feature> iterator)
You are required to close iterators after use. |
FeatureCollectionType |
getType()
Restricted to return a FeatureCollectionType. |
Iterator<Feature> |
iterator()
Access contents of this collection, you are required to close iterators after use. |
Collection<FeatureType> |
memberTypes()
Convenience method for obtaining the collection of member types in which members of this collection may implement. |
FeatureCollection |
sort(SortBy order)
A sorted "view" of this collection in the order indicated. |
FeatureCollection |
subCollection(Filter filter)
FeatureCollection "view" indicated by provided filter. |
Methods inherited from interface Feature |
---|
getBounds, getCRS, getDefaultGeometry, getID, getUserData, putUserData, setCRS, setDefaultGeometry |
Methods inherited from interface ComplexAttribute |
---|
associations, attributes, get, getDescriptor, getValue, setValue |
Methods inherited from interface Attribute |
---|
nillable, operation, setValue |
Methods inherited from interface Property |
---|
descriptor, name |
Method Detail |
---|
FeatureCollectionType getType()
getType
in interface Attribute
getType
in interface ComplexAttribute
getType
in interface Feature
getType
in interface Property
Iterator<Feature> iterator()
Two points to using iterator successfully:
next()
is only "valid" until the
call to next()
is made.
Please note you will be limited to a single worker thread to access an iterator, this is a consequence of a feature only being valid until next is called. For an alternative please use visitor. Conversly plit you request into sections with one for each worker thread.
XPath Mapping:
featureMember/*
featureMembers
void close(Iterator<Feature> iterator)
Many FeatureCollections are backed by IO resources that need to be returned to the opperating system after use.
FeatureCollection subCollection(Filter filter)
The contents of the returned FeatureCollection are determined by applying the provider Fitler to the entire contents of this FeatureCollection. The result is "live" aqnd modifications will be shared.
This method is used cut down on the number of filter based methods required for a useful FeatureCollection construct. The FeatureCollections returned really should be considered as a temporary "view" used to control the range of a removeAll, or modify operation.
Example Use:
collection.subCollection( filter ).removeAll();
The above recommended use is agreement with the Collections API precident of
List.subList( start, end ).
The results of subCollection:
filter
-
FeatureList
FeatureCollection sort(SortBy order)
order
-
Collection<FeatureType> memberTypes()
Equivalent to calling the following:
getType().getMemberTypes()
void accepts(FeatureVisitor visitor, ProgressListener progress)
visitor
-
IOException
For more comparison with iterator based access
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |