Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.
`Object` | `clone()`
`Feature` | `cloneDeep()`
`String` | `getAttribute(String name)` Returns the attribute value of the attribute with the specified name.
`Map<String,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.
`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.
`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(String name, 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(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

    String getDescription()

  Returns the description of the feature.

  Returns:
    the description of the feature.

### getId

    String getId()

  Returns the id of the feature.

  Returns:
    the id of the feature

### setId

    void setId(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

    String getAttribute(String name)

  Returns the attribute value of the attribute with the specified name.

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

### getAttributes

    Map<String,String> getAttributes()

  Returns all attributes of the feature.

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

### setAttribute

    void setAttribute(String name,
                      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

    Object clone()
                 throws 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:
    `CloneNotSupportedException`

### cloneDeep

    Feature cloneDeep()
                      throws CloneNotSupportedException

  Returns:
    a deep clone of a feature. All not simple properties (incl. geometries) will be cloned
  Throws:
    `CloneNotSupportedException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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