org.deegree.feature
Interface Feature

All Superinterfaces:
GMLObject, Object, TypedObjectNode
All Known Subinterfaces:
FeatureCollection
All Known Implementing Classes:
AbstractFeature, AbstractFeatureCollection, FeatureReference, GenericFeature, GenericFeatureCollection

public interface Feature
extends 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 views on the features' properties: GML-agnostic and GML (and version) specific. Blabla...

Version:
$Revision: 31639 $, $Date: 2011-08-24 21:02:10 +0200 (Wed, 24 Aug 2011) $
Author:
Markus Schneider, last edited by: $Author: mschneider $

Method Summary
 Envelope getEnvelope()
          Returns the envelope of the feature.
 ExtraProps getExtraProperties()
          Returns the extra properties associated with the feature.
 Property[] getGeometryProperties()
          Returns all geometry-valued properties in order.
 StandardGMLFeatureProps getGMLProperties()
          Returns the standard GML properties (e.g.
 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.
 FeatureType getType()
          Returns the type information for this feature.
 void setExtraProperties(ExtraProps extraProps)
           
 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, TypedObjectNode value)
          Sets the value of a specific occurrence of a property with a given name (or removes the property feature).
 void setPropertyValue(QName propName, int occurence, TypedObjectNode value, GMLVersion version)
          Sets the value of a specific occurrence of a property with a given name (or removes the property from the feature).
 

Method Detail

getId

String getId()
Returns the id of the feature.

In a 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 Object
Returns:
the id of the feature, may be null

setId

void setId(String id)
Sets the id of the feature.

In a 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, may be null

getName

QName getName()
Returns the name of the feature.

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

Returns:
the name of the feature instance, never null

getType

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

Returns:
the type information, never null

getProperties

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

Returns:
all properties, excluding standard GML properties, may be empty, but never null

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, may be empty, but never null

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, may be empty, but never null

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, may be empty, but never null

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[] 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,
                      TypedObjectNode value)
Sets the value of a specific occurrence 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,
                      TypedObjectNode value,
                      GMLVersion version)
Sets the value of a specific occurrence 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

getGMLProperties

StandardGMLFeatureProps getGMLProperties()
Description copied from interface: GMLObject
Returns the standard GML properties (e.g. gml:name).

Specified by:
getGMLProperties in interface GMLObject
Returns:
the standard GML properties, may be

getExtraProperties

ExtraProps getExtraProperties()
Returns the extra properties associated with the feature.

These properties are not defined by the FeatureType, but provide a generic way to attach information to the Feature (e.g. rendering hints).

Returns:
extra properties, may be null

setExtraProperties

void setExtraProperties(ExtraProps extraProps)


Copyright © 2011. All Rights Reserved.