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

org.deegree.feature
Class AbstractFeature

java.lang.Object
  extended by org.deegree.feature.AbstractFeature
All Implemented Interfaces:
Feature, MatchableObject, GMLObject
Direct Known Subclasses:
AbstractFeatureCollection, GenericFeature, GenericSimpleFeature

abstract class AbstractFeature
extends Object
implements Feature

Abstract base class for common Feature implementations.

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

Field Summary
protected  StandardGMLFeatureProps standardProps
          Stores the default GML properties that every GML feature allows for (gml:name, gml:description, ...).
 
Constructor Summary
AbstractFeature()
           
 
Method Summary
protected  Envelope calcEnvelope()
          Helper method for calculating the envelope of a feature.
 Envelope getEnvelope()
          Returns the envelope of the feature.
 GMLStdProps getGMLProperties()
          Returns the standard GML properties (e.g.
 Property<?>[] getProperties(GMLVersion version)
          Returns all properties in order, including standard GML properties.
 Property<?>[] getProperties(QName propName, GMLVersion version)
          Returns the properties with the given name, in order.
 Property<?> getProperty(QName propName, GMLVersion version)
          Returns the property with the given name.
 Object getPropertyValue(QName propName, GMLVersion version)
          Returns the values of the property with the given name.
 Object[] getPropertyValues(PropertyName propName, GMLVersion version)
          Returns the values that are selected by the given PropertyName expression.
 Object[] getPropertyValues(QName propName, GMLVersion version)
          Returns the values of the properties with the given name, in order.
 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, 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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.deegree.feature.Feature
getGeometryProperties, getId, getName, getProperties, getProperties, getProperty, getPropertyValue, getPropertyValues, getType, setId, setProperties, setPropertyValue
 

Field Detail

standardProps

protected StandardGMLFeatureProps standardProps
Stores the default GML properties that every GML feature allows for (gml:name, gml:description, ...).

Constructor Detail

AbstractFeature

AbstractFeature()
Method Detail

getGMLProperties

public GMLStdProps 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

getPropertyValues

public Object[] getPropertyValues(PropertyName propName,
                                  GMLVersion version)
                           throws org.jaxen.JaxenException
Description copied from interface: MatchableObject
Returns the values that are selected by the given PropertyName expression.

Specified by:
getPropertyValues in interface MatchableObject
Parameters:
propName - XPath expression that usually selects a property
Returns:
the selected values
Throws:
org.jaxen.JaxenException - if an exception occurs during the evaluation of the XPath expression

getEnvelope

public Envelope getEnvelope()
Description copied from interface: Feature
Returns the envelope of the feature.

Specified by:
getEnvelope in interface Feature
Returns:
the envelope of the feature, or null if the feature has no envelope information / geometry properties

calcEnvelope

protected Envelope calcEnvelope()
Helper method for calculating the envelope of a feature.

Returns:
envelope of all geometry properties of the feature

getProperties

public Property<?>[] getProperties(GMLVersion version)
Description copied from interface: Feature
Returns all properties in order, including standard GML properties.

Specified by:
getProperties in interface Feature
Parameters:
version - determines the names and types of the standard GML properties, must not be null
Returns:
all properties, including standard GML properties

getProperties

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

Specified by:
getProperties in interface Feature
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

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

Specified by:
getProperty in interface Feature
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

getPropertyValue

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

Specified by:
getPropertyValue in interface Feature
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

getPropertyValues

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

Specified by:
getPropertyValues in interface Feature
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

setProperties

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

Specified by:
setProperties in interface Feature
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

setPropertyValue

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

Specified by:
setPropertyValue in interface 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

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

]]>