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

org.deegree.model.feature
Class AbstractFeature

java.lang.Object
  extended by org.deegree.model.feature.AbstractFeature
All Implemented Interfaces:
Feature
Direct Known Subclasses:
AbstractFeatureCollection, DefaultFeature

abstract class AbstractFeature
extends java.lang.Object
implements Feature

Version:
$Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18 Jun 2009) $
Author:
Andreas Poth, last edited by: $Author: mschneider $

Field Summary
protected  java.lang.String description
           
protected  Envelope envelope
           
protected  boolean envelopeCalculated
           
protected  FeatureType featureType
           
protected  FeatureProperty owner
           
 
Constructor Summary
AbstractFeature(java.lang.String id, FeatureType featureType)
           
AbstractFeature(java.lang.String id, FeatureType featureType, FeatureProperty owner)
           
 
Method Summary
 java.lang.Object clone()
           
 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 / boundingbox of the feature.
 java.lang.String getDescription()
          Returns the description of the feature.
 FeatureType getFeatureType()
          returns the FeatureType of this Feature
 java.lang.String getId()
          returns the id of the Feature. the id has to be a name space that must be unique for each feature. use the adress of the datasource in addition to a number for example .
 QualifiedName getName()
          Returns the qualified name of the feature.
 FeatureProperty getOwner()
          Returns the owner of the feature.
protected  void resetBounds()
          resets the envelope of the feature so the next call of getBounds() will force a re-calculation
 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.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.deegree.model.feature.Feature
addProperty, cloneDeep, getDefaultGeometryPropertyValue, getDefaultProperty, getDefaultProperty, getGeometryPropertyValues, getProperties, getProperties, getProperties, removeProperty, replaceProperty, setProperty
 

Field Detail

featureType

protected FeatureType featureType

envelope

protected Envelope envelope

envelopeCalculated

protected boolean envelopeCalculated

description

protected java.lang.String description

owner

protected FeatureProperty owner
Constructor Detail

AbstractFeature

AbstractFeature(java.lang.String id,
                FeatureType featureType)
Parameters:
id -
featureType -

AbstractFeature

AbstractFeature(java.lang.String id,
                FeatureType featureType,
                FeatureProperty owner)
Parameters:
id -
featureType -
Method Detail

getDescription

public java.lang.String getDescription()
Description copied from interface: Feature
Returns the description of the feature.

Specified by:
getDescription in interface Feature
Returns:
the description of the feature.

getName

public QualifiedName getName()
Description copied from interface: Feature
Returns the qualified name of the feature.

Specified by:
getName in interface Feature
Returns:
the qualified name of the feature

getBoundedBy

public Envelope getBoundedBy()
                      throws GeometryException
Returns the envelope / boundingbox of the feature. The bounding box will be created in a recursion. That means if a property of the feature (a) contains another feature (b) the bounding box of b will be merged with the bounding box calculated from the geometry properties of a. A feature has no geometry properties and no properties that are features (and having a bounding box theirself) null will be returned.

Specified by:
getBoundedBy in interface Feature
Returns:
the envelope / bounding box of the feature
Throws:
GeometryException

setEnvelopesUpdated

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

Specified by:
setEnvelopesUpdated in interface Feature

getOwner

public FeatureProperty getOwner()
Description copied from interface: Feature
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.

Specified by:
getOwner in interface Feature
Returns:
the owner of the feature, or null if the feature does not belong to a feature property

getId

public java.lang.String getId()
returns the id of the Feature. the id has to be a name space that must be unique for each feature. use the adress of the datasource in addition to a number for example .

Specified by:
getId in interface Feature
Returns:
the id of the feature

setId

public void setId(java.lang.String fid)
Description copied from interface: Feature
Sets the id of the feature.

Specified by:
setId in interface Feature
Parameters:
fid - the id of the feature to be set

getFeatureType

public FeatureType getFeatureType()
returns the FeatureType of this Feature

Specified by:
getFeatureType in interface Feature
Returns:
the feature type of this feature

setFeatureType

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

Specified by:
setFeatureType in interface Feature
Parameters:
ft - feature type to set

resetBounds

protected void resetBounds()
resets the envelope of the feature so the next call of getBounds() will force a re-calculation


getAttribute

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

Specified by:
getAttribute in interface Feature
Parameters:
name - name of the attribute
Returns:
the attribute value

getAttributes

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

Specified by:
getAttributes in interface Feature
Returns:
all attributes, keys are names, values are attribute values

setAttribute

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

Specified by:
setAttribute in interface Feature
Parameters:
name - name of the attribute
value - value to set

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Specified by:
clone in interface Feature
Overrides:
clone in class java.lang.Object
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

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