org.deegree.feature
Class GenericFeature

java.lang.Object
  extended by org.deegree.feature.AbstractFeature
      extended by org.deegree.feature.GenericFeature
All Implemented Interfaces:
GMLObject, Object, TypedObjectNode, Feature

public class GenericFeature
extends AbstractFeature

Allows the representation of arbitrary Features.

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

Field Summary
 
Fields inherited from class org.deegree.feature.AbstractFeature
fid, ft, standardProps
 
Constructor Summary
GenericFeature(FeatureType ft, String fid, List<Property> props, GMLVersion version, ExtraProps extraProps)
          Creates a new GenericFeature instance.
 
Method Summary
 Property[] getGeometryProperties()
          Returns all geometry-valued properties in order.
 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.
 void setProperties(List<Property> props)
          Called during construction to initialize the properties of the feature.
 void setPropertyValue(QName propName, int occurrence, TypedObjectNode value)
          Sets the value of a specific occurrence of a property with a given name (or removes the property feature).
 
Methods inherited from class org.deegree.feature.AbstractFeature
calcEnvelope, getEnvelope, getExtraProperties, getGMLProperties, getId, getName, getProperties, getProperties, getProperty, getType, setExtraProperties, setId, setProperties, setPropertyValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericFeature

public GenericFeature(FeatureType ft,
                      String fid,
                      List<Property> props,
                      GMLVersion version,
                      ExtraProps extraProps)
Creates a new GenericFeature instance.

Parameters:
ft - feature type, must not be null
fid - feature id or null if the feature is anonymous (discouraged for most use cases)
props - properties of the feature
version - GML version (determines the names/types of the standard properties), or null (then no standard GML properties are allowed)
extraProps - extra properties, may be null
Method Detail

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

setPropertyValue

public void setPropertyValue(QName propName,
                             int occurrence,
                             TypedObjectNode value)
Description copied from interface: Feature
Sets the value of a specific occurrence 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, may be empty, but never null

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

getGeometryProperties

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

Returns:
all geometry properties


Copyright © 2011. All Rights Reserved.