|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.model.feature.AbstractFeature org.deegree.model.feature.AbstractFeatureCollection org.deegree.model.feature.DefaultFeatureCollection
class DefaultFeatureCollection
This interface provides services for the management of groups of features. These groups can come into being for a number of reasons: e.g. a project as a whole, for the scope of a query, as the result of a query or arbitrarily selected by a user for some common manipulation. A feature's membership of a particular FeatureCollection does not necessarily imply any relationship with other member features. Composite or compound features which own constituent member Features (e.g. an Airport composed of Terminals, Runways, Aprons, Hangars, etc) may also support the FeatureCollection interface to provide a generic means for clients to access constituent members without needing to be aware of the internal implementation details of the compound feature.
-----------------------------------------------------------------------
Field Summary |
---|
Fields inherited from class org.deegree.model.feature.AbstractFeature |
---|
description, envelopeCalculated, featureType, owner |
Constructor Summary | |
---|---|
DefaultFeatureCollection(java.lang.String id,
Feature[] features)
constructor for initializing a feature collection with an id and an array of features. |
|
DefaultFeatureCollection(java.lang.String id,
Feature[] features,
QualifiedName qName)
Constructor for initializing a feature collection with an id and an array of features. |
|
DefaultFeatureCollection(java.lang.String id,
int initialCapacity)
|
Method Summary | |
---|---|
void |
add(Feature feature)
Appends a feature to the collection. |
void |
addProperty(FeatureProperty property)
Adds the given property to the feature's properties. |
void |
clear()
removes all features from a collection |
java.lang.Object |
clone()
|
Feature |
cloneDeep()
|
Envelope |
getBoundedBy()
Returns the envelope / boundingbox of the feature. |
FeatureProperty |
getDefaultProperty(PropertyPath path)
Returns the property of the feature identified by the given PropertyPath . |
Feature |
getFeature(int index)
returns the feature that is assigned to the submitted index. |
Feature |
getFeature(java.lang.String id)
|
FeatureType |
getFeatureType()
returns the FeatureType of this Feature |
java.util.Iterator<Feature> |
iterator()
returns an Iterator on the feature contained in a collection |
Feature |
remove(Feature feature)
removes the submitted feature from the collection |
Feature |
remove(int index)
removes a feature identified by its index from the feature collection. |
void |
removeProperty(QualifiedName propertyName)
Removes the properties with the given name. |
void |
replaceProperty(FeatureProperty oldProperty,
FeatureProperty newProperty)
Replaces the given property with a new one. |
void |
setEnvelopesUpdated()
Signals that the envelopes of the geometry properties have been updated. |
void |
setProperty(FeatureProperty property,
int index)
Sets the value for the given property. |
int |
size()
returns the number of features within the collection |
Feature[] |
toArray()
returns an array of all features |
java.lang.String |
toString()
|
Methods inherited from class org.deegree.model.feature.AbstractFeatureCollection |
---|
addAll, addAll, addAllUncontained, addAllUncontained, getDefaultGeometryPropertyValue, getDefaultProperty, getGeometryPropertyValues, getProperties, getProperties, getProperties, remove, setProperty |
Methods inherited from class org.deegree.model.feature.AbstractFeature |
---|
getAttribute, getAttributes, getDescription, getId, getName, getOwner, resetBounds, setAttribute, setFeatureType, setId |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.deegree.model.feature.Feature |
---|
getAttribute, getAttributes, getDescription, getId, getName, getOwner, setAttribute, setFeatureType, setId |
Constructor Detail |
---|
DefaultFeatureCollection(java.lang.String id, int initialCapacity)
DefaultFeatureCollection(java.lang.String id, Feature[] features)
DefaultFeatureCollection(java.lang.String id, Feature[] features, QualifiedName qName)
id
- of the feature collectionfeatures
- to be addedqName
- of the feature collection, if null
the default name of wfs:FeatureCollection will be
given.Method Detail |
---|
public void clear()
FeatureCollection
clear
in interface FeatureCollection
public FeatureType getFeatureType()
AbstractFeature
getFeatureType
in interface Feature
getFeatureType
in class AbstractFeature
public Feature[] toArray()
toArray
in interface FeatureCollection
public java.util.Iterator<Feature> iterator()
iterator
in interface FeatureCollection
public Feature getFeature(int index)
getFeature
in interface FeatureCollection
index
- of the feature.
public Feature getFeature(java.lang.String id)
getFeature
in interface FeatureCollection
id
- of the feature
null
will be returned.public Feature remove(Feature feature)
remove
in interface FeatureCollection
feature
- to remove
public Feature remove(int index)
remove
in interface FeatureCollection
index
- of the feature to remove.
public void add(Feature feature)
add
in interface FeatureCollection
feature
- to add.public int size()
size
in interface FeatureCollection
public void setProperty(FeatureProperty property, int index)
Feature
setProperty
in interface Feature
property
- property name and the property's new valueindex
- position of the property that is to be replacedpublic void addProperty(FeatureProperty property)
Feature
addProperty
in interface Feature
property
- property to insertpublic void removeProperty(QualifiedName propertyName)
Feature
removeProperty
in interface Feature
propertyName
- name of the properties to removepublic void replaceProperty(FeatureProperty oldProperty, FeatureProperty newProperty)
Feature
replaceProperty
in interface Feature
oldProperty
- property to be replacednewProperty
- new propertypublic Envelope getBoundedBy() throws GeometryException
AbstractFeature
null
will be returned.
getBoundedBy
in interface Feature
getBoundedBy
in class AbstractFeature
GeometryException
public void setEnvelopesUpdated()
AbstractFeature
setEnvelopesUpdated
in interface Feature
setEnvelopesUpdated
in class AbstractFeature
public java.lang.String toString()
toString
in class java.lang.Object
public FeatureProperty getDefaultProperty(PropertyPath path) throws PropertyPathResolvingException
Feature
PropertyPath
.
NOTE: Current implementation does not handle multiple properties (on the path) or index
addressing in the path.
getDefaultProperty
in interface Feature
path
- the path of the property to look up
PropertyPathResolvingException
PropertyPath
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface Feature
clone
in class AbstractFeature
java.lang.CloneNotSupportedException
public Feature cloneDeep() throws java.lang.CloneNotSupportedException
cloneDeep
in interface Feature
java.lang.CloneNotSupportedException
|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org