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

org.deegree.gml.feature
Class FeatureReference

java.lang.Object
  extended by org.deegree.gml.GMLReference<Feature>
      extended by org.deegree.gml.feature.FeatureReference
All Implemented Interfaces:
Feature, MatchableObject, GMLObject

public class FeatureReference
extends GMLReference<Feature>
implements Feature

Represents a reference to a feature, which is usually expressed using an xlink:href attribute in GML (may be document-local or remote).

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

Constructor Summary
FeatureReference(GMLReferenceResolver resolver, String uri, String baseURL)
          Creates a new FeatureReference instance.
 
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 object.
 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(PropertyName propName, GMLVersion version)
          Returns the values that are selected by the given PropertyName expression.
 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 class org.deegree.gml.GMLReference
getGMLProperties, getReferencedObject, getURI, isLocal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.deegree.gml.GMLObject
getGMLProperties
 

Constructor Detail

FeatureReference

public FeatureReference(GMLReferenceResolver resolver,
                        String uri,
                        String baseURL)
Creates a new FeatureReference instance.

Parameters:
resolver - used for resolving the reference, must not be null
uri - the feature's uri, must not be null
baseURL - base URL for resolving the uri, may be null (no resolving of relative URLs)
Method Detail

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

getGeometryProperties

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

Specified by:
getGeometryProperties in interface Feature
Returns:
all geometry properties

getId

public String getId()
Description copied from interface: GMLObject
Returns the id of the object.

Specified by:
getId in interface Feature
Specified by:
getId in interface MatchableObject
Specified by:
getId in interface GMLObject
Overrides:
getId in class GMLReference<Feature>
Returns:
the id of the object, or null if it doesn't have an id

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.

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

Specified by:
getProperties in interface Feature
Returns:
all properties, excluding standard GML properties

getProperties

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

Specified by:
getProperty in interface Feature
Parameters:
propName - name of the requested property
Returns:
the property with the given name

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

getPropertyValue

public Object getPropertyValue(QName propName)
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
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.

Specified by:
getPropertyValues in interface Feature
Parameters:
propName - name of the requested property
Returns:
the values of the properties with the given name, in order

getType

public FeatureType getType()
Description copied from interface: Feature
Returns the type information for this feature.

Specified by:
getType in interface Feature
Returns:
the type information

setId

public void setId(String id)
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.

Specified by:
setId in interface Feature
Parameters:
id - the id of the feature instance

setProperties

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

Specified by:
setProperties in interface Feature
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)
Description copied from interface: Feature
Sets the value of a specific occurence of a property with a given name (or removes the property 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)

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

]]>