deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.feature
Class GenericFeatureCollection

java.lang.Object
  extended by org.deegree.feature.AbstractFeature
      extended by org.deegree.feature.AbstractFeatureCollection
          extended by org.deegree.feature.GenericFeatureCollection
All Implemented Interfaces:
Iterable<Feature>, Collection<Feature>, Feature, FeatureCollection, MatchableObject, GMLObject

public class GenericFeatureCollection
extends AbstractFeatureCollection

Allows the representation of arbitrary FeatureCollections, also those that use FeatureCollectionTypes with their own properties.

Version:
$Revision:$, $Date:$
Author:
Markus Schneider , last edited by: $Author:$

Field Summary
static QName FEATURE_MEMBER
           
 
Fields inherited from class org.deegree.feature.AbstractFeature
standardProps
 
Constructor Summary
GenericFeatureCollection()
          Creates a new empty GenericFeatureCollection instance without type information.
GenericFeatureCollection(FeatureCollectionType ft, String fid, List<Property<?>> props, GMLVersion version)
          Creates a new GenericFeatureCollection instance with type information and content specified using properties.
GenericFeatureCollection(String fid, Collection<Feature> memberFeatures)
          Creates a new GenericFeatureCollection instance without type information that contains the given features.
 
Method Summary
 boolean add(Feature e)
           
 boolean addAll(Collection<? extends Feature> c)
           
 void clear()
           
 boolean contains(Object o)
           
 boolean containsAll(Collection<?> c)
           
 Property<Geometry>[] getGeometryProperties()
          Returns all geometry-valued properties in order.
 String getId()
          Returns the id of the feature.
 QName getName()
          Returns the name of the feature.
 Property<?>[] getProperties()
          Returns all properties in order, excluding standard GML properties such as gml:name.
 Property<?>[] getProperties(QName propName)
          Returns the properties with the given name, in order.
 Property<?> getProperty(QName propName)
          Returns the property with the given name.
 Object getPropertyValue(QName propName)
          Returns the values of the property with the given name.
 Object[] getPropertyValues(QName propName)
          Returns the values of the properties with the given name, in order.
 FeatureCollectionType getType()
          Returns the type information for this feature collection.
 boolean isEmpty()
           
 Iterator<Feature> iterator()
           
 boolean remove(Object o)
           
 boolean removeAll(Collection<?> c)
           
 boolean retainAll(Collection<?> c)
           
 void setId(String fid)
          Sets the id of the feature.
 void setProperties(List<Property<?>> props)
          Called during construction to initialize the properties of the feature.
 void setPropertyValue(QName propName, int occurrence, Object value)
          Sets the value of a specific occurence of a property with a given name (or removes the property feature).
 int size()
           
 Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 
Methods inherited from class org.deegree.feature.AbstractFeatureCollection
calcEnvelope, getMembers
 
Methods inherited from class org.deegree.feature.AbstractFeature
getEnvelope, getGMLProperties, getProperties, getProperties, getProperty, getPropertyValue, getPropertyValues, getPropertyValues, setProperties, setPropertyValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.deegree.feature.Feature
getEnvelope, getProperties, getProperties, getProperty, getPropertyValue, getPropertyValues, setProperties, setPropertyValue
 
Methods inherited from interface org.deegree.filter.MatchableObject
getPropertyValues
 
Methods inherited from interface org.deegree.gml.GMLObject
getGMLProperties
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Field Detail

FEATURE_MEMBER

public static QName FEATURE_MEMBER
Constructor Detail

GenericFeatureCollection

public GenericFeatureCollection(FeatureCollectionType ft,
                                String fid,
                                List<Property<?>> props,
                                GMLVersion version)
Creates a new GenericFeatureCollection instance with type information and content specified using properties.

Parameters:
ft -
fid -
props -

GenericFeatureCollection

public GenericFeatureCollection(String fid,
                                Collection<Feature> memberFeatures)
Creates a new GenericFeatureCollection instance without type information that contains the given features.

Parameters:
fid -
memberFeatures -

GenericFeatureCollection

public GenericFeatureCollection()
Creates a new empty GenericFeatureCollection instance without type information.

Method Detail

getId

public String getId()
Description copied from interface: Feature
Returns the id of the feature.

In an GML representation of the feature, this corresponds to the gml:id (GML 3 and later) or fid (GML 2) attribute of the feature element.

Returns:
the id of the feature

setId

public void setId(String fid)
Description copied from interface: Feature
Sets the id of the feature.

In an GML representation of the feature, this corresponds to the gml:id (GML 3 and later) or fid (GML 2) attribute of the feature element.

Parameters:
fid - the id of the feature instance

getName

public QName getName()
Description copied from interface: Feature
Returns the name of the feature.

In an GML representation of the feature, this corresponds to the feature element's name.

Returns:
the name of the feature instance

getProperties

public Property<?>[] getProperties()
Description copied from interface: Feature
Returns all properties in order, excluding standard GML properties such as gml:name.

Returns:
all properties, excluding standard GML properties

getType

public FeatureCollectionType getType()
Description copied from interface: FeatureCollection
Returns the type information for this feature collection.

Returns:
the type information, never null

setProperties

public void setProperties(List<Property<?>> props)
                   throws IllegalArgumentException
Description copied from interface: Feature
Called during construction to initialize the properties of the feature.

Throws:
IllegalArgumentException - if the property names or values are not compatible with the feature type

iterator

public Iterator<Feature> iterator()

add

public boolean add(Feature e)

addAll

public boolean addAll(Collection<? extends Feature> c)

clear

public void clear()

contains

public boolean contains(Object o)

containsAll

public boolean containsAll(Collection<?> c)

isEmpty

public boolean isEmpty()

remove

public boolean remove(Object o)

removeAll

public boolean removeAll(Collection<?> c)

retainAll

public boolean retainAll(Collection<?> c)

size

public int size()

toArray

public Object[] toArray()

toArray

public <T> T[] toArray(T[] a)

setPropertyValue

public void setPropertyValue(QName propName,
                             int occurrence,
                             Object value)
Description copied from interface: Feature
Sets the value of a specific occurence of a property with a given name (or removes the property feature).

Parameters:
propName - property name
occurrence - index of the property, starting with zero. If the property is not a multi-property (i.e. maxOccurs=1), this is always zero.
value - new value of the property or null (removes the property)

getProperties

public Property<?>[] getProperties(QName propName)
Description copied from interface: Feature
Returns the properties with the given name, in order.

Parameters:
propName - name of the requested properties
Returns:
the properties with the given name, in order

getProperty

public Property<?> getProperty(QName propName)
Description copied from interface: Feature
Returns the property with the given name.

Parameters:
propName - name of the requested property
Returns:
the property with the given name

getPropertyValue

public Object getPropertyValue(QName propName)
Description copied from interface: Feature
Returns the values of the property with the given name.

Parameters:
propName - name of the requested property
Returns:
the values of the properties with the given name

getPropertyValues

public Object[] getPropertyValues(QName propName)
Description copied from interface: Feature
Returns the values of the properties with the given name, in order.

Parameters:
propName - name of the requested property
Returns:
the values of the properties with the given name, in order

getGeometryProperties

public Property<Geometry>[] getGeometryProperties()
Description copied from interface: Feature
Returns all geometry-valued properties in order.

Returns:
all geometry properties

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>