deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.model.feature
Interface Feature

All Known Subinterfaces:
FeatureCollection
All Known Implementing Classes:
AbstractFeature, AbstractFeatureCollection, DefaultFeature, DefaultFeatureCollection, FeatureTupleCollection, ScaledFeature

public interface Feature

Features are, according to the Abstract Specification, digital representations of real world entities. Feature Identity thus refers to mechanisms to identify such representations: not to identify the real world entities that are the subject of a representation. Thus two different representations of a real world entity (say the Mississippi River) will be two different features with distinct identities. Real world identification systems, such as title numbers, while possibly forming a sound basis for an implementation of a feature identity mechanism, are not of themselves such a mechanism.

Version:
$Revision: 18195 $ $Date: 2009-06-18 17:55:39 +0200 (Do, 18 Jun 2009) $
Author:
Andreas Poth, Markus Schneider

Method Summary
 void addProperty(FeatureProperty property)
          Adds the given property to the feature's properties.
 java.lang.Object clone()
           
 Feature cloneDeep()
           
 java.lang.String getAttribute(java.lang.String name)
          Returns the attribute value of the attribute with the specified name.
 java.util.Map<java.lang.String,java.lang.String> getAttributes()
          Returns all attributes of the feature.
 Envelope getBoundedBy()
          Returns the envelope / bounding box of the feature.
 Geometry getDefaultGeometryPropertyValue()
          Returns the value of the default geometry property of the feature.
 FeatureProperty getDefaultProperty(PropertyPath path)
          Returns the property of the feature identified by the given PropertyPath.
 FeatureProperty getDefaultProperty(QualifiedName name)
          Returns the first property of the feature with the given name.
 java.lang.String getDescription()
          Returns the description of the feature.
 FeatureType getFeatureType()
          Returns the feature type of this feature.
 Geometry[] getGeometryPropertyValues()
          Returns the values of all geometry properties of the feature.
 java.lang.String getId()
          Returns the id of the feature.
 QualifiedName getName()
          Returns the qualified name of the feature.
 FeatureProperty getOwner()
          Returns the owner of the feature.
 FeatureProperty[] getProperties()
          Returns all properties of the feature in their original order.
 FeatureProperty[] getProperties(int index)
          Deprecated.  
 FeatureProperty[] getProperties(QualifiedName name)
          Returns the properties of the feature with the given name in their original order.
 void removeProperty(QualifiedName propertyName)
          Removes the properties with the given name.
 void replaceProperty(FeatureProperty oldProperty, FeatureProperty newProperty)
          Replaces the given property with a new one.
 void setAttribute(java.lang.String name, java.lang.String value)
          Sets the value of the attribute with the given name.
 void setEnvelopesUpdated()
          Signals that the envelopes of the geometry properties have been updated.
 void setFeatureType(FeatureType ft)
          Sets the feature type of this feature.
 void setId(java.lang.String fid)
          Sets the id of the feature.
 void setProperty(FeatureProperty property, int index)
          Sets the value for the given property.
 

Method Detail

getName

QualifiedName getName()
Returns the qualified name of the feature.

Returns:
the qualified name of the feature

getDescription

java.lang.String getDescription()
Returns the description of the feature.

Returns:
the description of the feature.

getId

java.lang.String getId()
Returns the id of the feature.

Returns:
the id of the feature

setId

void setId(java.lang.String fid)
Sets the id of the feature.

Parameters:
fid - the id of the feature to be set

getFeatureType

FeatureType getFeatureType()
Returns the feature type of this feature.

Returns:
the feature type of this feature

setFeatureType

void setFeatureType(FeatureType ft)
Sets the feature type of this feature.

Parameters:
ft - feature type to set

getProperties

FeatureProperty[] getProperties()
Returns all properties of the feature in their original order.

Returns:
all properties of the feature

getDefaultProperty

FeatureProperty getDefaultProperty(QualifiedName name)
Returns the first property of the feature with the given name.

Parameters:
name - name of the property to look up
Returns:
the first property of the feature with the given name or null if the feature has no such property

getDefaultProperty

FeatureProperty getDefaultProperty(PropertyPath path)
                                   throws PropertyPathResolvingException
Returns the property of the feature identified by the given PropertyPath. NOTE: Current implementation does not handle multiple properties (on the path) or index addressing in the path.

Parameters:
path - the path of the property to look up
Returns:
the property of the feature identified by the given PropertyPath
Throws:
PropertyPathResolvingException
See Also:
PropertyPath

getProperties

FeatureProperty[] getProperties(QualifiedName name)
Returns the properties of the feature with the given name in their original order.

Parameters:
name - name of the properties to look up
Returns:
the properties of the feature with the given name or null if the feature has no property with that name

getProperties

@Deprecated
FeatureProperty[] getProperties(int index)
Deprecated. 

Returns the properties of the feature at the submitted index of the feature type definition.

Parameters:
index - index of the properties to look up
Returns:
the properties of the feature at the submitted index

getGeometryPropertyValues

Geometry[] getGeometryPropertyValues()
Returns the values of all geometry properties of the feature.

Returns:
the values of all geometry properties of the feature, or a zero-length array if the feature has no geometry properties

getDefaultGeometryPropertyValue

Geometry getDefaultGeometryPropertyValue()
Returns the value of the default geometry property of the feature. If the feature has no geometry property, this is a Point at the coordinates (0,0).

Returns:
default geometry or Point at (0,0) if feature has no geometry

setProperty

void setProperty(FeatureProperty property,
                 int index)
Sets the value for the given property. The index is needed to specify the occurences of the property that is to be replaced. Set to 0 for properties that may only occur once.

Parameters:
property - property name and the property's new value
index - position of the property that is to be replaced

addProperty

void addProperty(FeatureProperty property)
Adds the given property to the feature's properties. The position of the property is determined by the feature type. If the feature already has a property with this name, it is inserted behind it.

Parameters:
property - property to insert

removeProperty

void removeProperty(QualifiedName propertyName)
Removes the properties with the given name.

Parameters:
propertyName - name of the properties to remove

replaceProperty

void replaceProperty(FeatureProperty oldProperty,
                     FeatureProperty newProperty)
Replaces the given property with a new one.

Parameters:
oldProperty - property to be replaced
newProperty - new property

getBoundedBy

Envelope getBoundedBy()
                      throws GeometryException
Returns the envelope / bounding box of the feature.

Returns:
the envelope / bounding box of the feature
Throws:
GeometryException

getOwner

FeatureProperty getOwner()
Returns the owner of the feature. This is the feature property that has this feature as value or null if this feature is a root feature.

Returns:
the owner of the feature, or null if the feature does not belong to a feature property

getAttribute

java.lang.String getAttribute(java.lang.String name)
Returns the attribute value of the attribute with the specified name.

Parameters:
name - name of the attribute
Returns:
the attribute value

getAttributes

java.util.Map<java.lang.String,java.lang.String> getAttributes()
Returns all attributes of the feature.

Returns:
all attributes, keys are names, values are attribute values

setAttribute

void setAttribute(java.lang.String name,
                  java.lang.String value)
Sets the value of the attribute with the given name.

Parameters:
name - name of the attribute
value - value to set

setEnvelopesUpdated

void setEnvelopesUpdated()
Signals that the envelopes of the geometry properties have been updated.


clone

java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Returns:
a shallow clone of a feature. Property values will not be cloned except for properties that are features (DefaultFeature) or feature collections (DefaultFeatureCollection)
Throws:
java.lang.CloneNotSupportedException

cloneDeep

Feature cloneDeep()
                  throws java.lang.CloneNotSupportedException
Returns:
a deep clone of a feature. All not simple properties (incl. geometries) will be cloned
Throws:
java.lang.CloneNotSupportedException

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org