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

org.deegree.feature
Interface Feature

All Superinterfaces:
GMLObject, MatchableObject
All Known Subinterfaces:
FeatureCollection, SimpleFeature, StreamFeatureCollection
All Known Implementing Classes:
AbstractFeature, AbstractFeatureCollection, FeatureReference, GenericFeature, GenericFeatureCollection, GenericSimpleFeature

public interface Feature
extends MatchableObject, GMLObject

A feature is a structured object with named properties, an identifier and type information. Properties may have geometric and non-geometric values and may be (nested) features.

The Feature interface and related types are designed to be compatible with the following specifications:

Notes on the representation of GML features

The interface supports two modes of operation: GML-agnostic and GML (and version) specific. Blabla...

Version:
$Revision: 21224 $, $Date: 2009-12-03 16:51:57 +0100 (Do, 03 Dez 2009) $
Author:
Markus Schneider, last edited by: $Author: mschneider $

Method Summary
 Envelope getEnvelope()
          Returns the envelope of the feature.
 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(GMLVersion version)
          Returns all properties in order, including standard GML properties.
 Property<?>[] getProperties(QName propName)
          Returns the properties with the given name, in order.
 Property<?>[] getProperties(QName propName, GMLVersion version)
          Returns the properties with the given name, in order.
 Property<?> getProperty(QName propName)
          Returns the property with the given name.
 Property<?> getProperty(QName propName, GMLVersion version)
          Returns the property with the given name.
 Object getPropertyValue(QName propName)
          Returns the values of the property with the given name.
 Object getPropertyValue(QName propName, GMLVersion version)
          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.
 Object[] getPropertyValues(QName propName, GMLVersion version)
          Returns the values of the properties with the given name, in order.
 FeatureType getType()
          Returns the type information for this feature.
 void setId(String id)
          Sets the id of the feature.
 void setProperties(List<Property<?>> props)
          Called during construction to initialize the properties of the feature.
 void setProperties(List<Property<?>> props, GMLVersion version)
          Called during construction to initialize the properties of the feature.
 void setPropertyValue(QName propName, int occurence, Object value)
          Sets the value of a specific occurence of a property with a given name (or removes the property feature).
 void setPropertyValue(QName propName, int occurence, Object value, GMLVersion version)
          Sets the value of a specific occurence of a property with a given name (or removes the property from the feature).
 
Methods inherited from interface org.deegree.filter.MatchableObject
getPropertyValues
 
Methods inherited from interface org.deegree.gml.GMLObject
getGMLProperties
 

Method Detail

getId

String getId()
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.

Specified by:
getId in interface GMLObject
Specified by:
getId in interface MatchableObject
Returns:
the id of the feature

setId

void setId(String id)
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:
id - the id of the feature instance

getName

QName getName()
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

getType

FeatureType getType()
Returns the type information for this feature.

Returns:
the type information

getProperties

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

Returns:
all properties, excluding standard GML properties

getProperties

Property<?>[] getProperties(GMLVersion version)
Returns all properties in order, including standard GML properties.

Parameters:
version - determines the names and types of the standard GML properties, must not be null
Returns:
all properties, including standard GML properties

getPropertyValues

Object[] getPropertyValues(QName propName)
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

getPropertyValues

Object[] getPropertyValues(QName propName,
                           GMLVersion version)
Returns the values of the properties with the given name, in order.

Parameters:
propName - name of the requested property
version - determines the names and types of the standard GML properties, must not be null
Returns:
the values of the properties with the given name, in order

getPropertyValue

Object getPropertyValue(QName propName)
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
Throws:
IllegalArgumentException - if the feature has more than one property with the given name

getPropertyValue

Object getPropertyValue(QName propName,
                        GMLVersion version)
Returns the values of the property with the given name.

Parameters:
propName - name of the requested property
version - determines the names and types of the standard GML properties, must not be null
Returns:
the values of the properties with the given name
Throws:
IllegalArgumentException - if the feature has more than one property with the given name

getProperties

Property<?>[] getProperties(QName propName)
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

getProperties

Property<?>[] getProperties(QName propName,
                            GMLVersion version)
Returns the properties with the given name, in order.

Parameters:
propName - name of the requested properties
version - determines the names and types of the standard GML properties, must not be null
Returns:
the properties with the given name, in order

getProperty

Property<?> getProperty(QName propName)
Returns the property with the given name.

Parameters:
propName - name of the requested property
Returns:
the property with the given name
Throws:
IllegalArgumentException - if the feature has more than one property with the given name

getProperty

Property<?> getProperty(QName propName,
                        GMLVersion version)
Returns the property with the given name.

Parameters:
propName - name of the requested property
version - determines the names and types of the standard GML properties, must not be null
Returns:
the property with the given name
Throws:
IllegalArgumentException - if the feature has more than one property with the given name

getGeometryProperties

Property<Geometry>[] getGeometryProperties()
Returns all geometry-valued properties in order.

Returns:
all geometry properties

getEnvelope

Envelope getEnvelope()
Returns the envelope of the feature.

Returns:
the envelope of the feature, or null if the feature has no envelope information / geometry properties

setPropertyValue

void setPropertyValue(QName propName,
                      int occurence,
                      Object value)
Sets the value of a specific occurence of a property with a given name (or removes the property feature).

Parameters:
propName - property name
occurence - 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)
Throws:
IllegalArgumentException - if the property names or values are not compatible with the feature type

setPropertyValue

void setPropertyValue(QName propName,
                      int occurence,
                      Object value,
                      GMLVersion version)
Sets the value of a specific occurence of a property with a given name (or removes the property from the feature).

Parameters:
propName - property name
occurence - 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)
version - determines the names and types of the standard GML properties, must not be null
Throws:
IllegalArgumentException - if the property names or values are not compatible with the feature type

setProperties

void setProperties(List<Property<?>> props)
                   throws IllegalArgumentException
Called during construction to initialize the properties of the feature.

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

setProperties

void setProperties(List<Property<?>> props,
                   GMLVersion version)
                   throws IllegalArgumentException
Called during construction to initialize the properties of the feature.

Parameters:
props -
version - determines the names and types of the standard GML properties, must not be null
Throws:
IllegalArgumentException - if the property names or values are not compatible with the feature type

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

]]>