org.deegree_impl.model.feature
Class Feature_Impl

java.lang.Object
  extended byorg.deegree_impl.model.feature.Feature_Impl
All Implemented Interfaces:
Feature, java.io.Serializable
Direct Known Subclasses:
FeatureCollection_Impl, SI_LocationInstance_Impl

public class Feature_Impl
extends java.lang.Object
implements Feature, java.io.Serializable

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: 1.17 $ $Date: 2004/04/06 08:17:18 $
Author:
Andreas Poth, Markus Schneider
See Also:
Serialized Form

Field Summary
protected  GM_Envelope envelope
           
protected  FeatureType featureType
           
protected  java.util.ArrayList geoProps
           
protected  java.lang.String id
           
protected  java.util.HashMap properties
           
protected  java.lang.Object[] propRef
           
 
Constructor Summary
protected Feature_Impl(java.lang.String id, FeatureType featureType, FeatureProperty[] properties)
          initializes a feature with its id its FeatureType and an array of properties.
(package private) Feature_Impl(java.lang.String id, FeatureType featureType, java.lang.Object[] properties)
          initializes a feature with its id its FeatureType and an array of properties.
 
Method Summary
 GM_Object getDefaultGeometryProperty()
          Returns the default geometry of the Feature.
 GM_Envelope getEnvelope()
          returns the envelope / boundingbox of the feature
 FeatureType getFeatureType()
          returns the FeatureType of this Feature
 GM_Object[] getGeometryProperties()
          returns all geometry properties of the 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 .
 java.lang.Object[] getProperties()
          returns the properties of the feature as array of Objects
 java.lang.Object getProperty(int index)
          returns the property of the feature that matches the submitted index
 java.lang.Object getProperty(java.lang.String name)
          returns the property of the feature that matches the submitted name TODO --> throw ModelException
 void setProperty(FeatureProperty property)
          the value for the submitted property.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected java.lang.String id

featureType

protected FeatureType featureType

geoProps

protected java.util.ArrayList geoProps

properties

protected java.util.HashMap properties

propRef

protected java.lang.Object[] propRef

envelope

protected GM_Envelope envelope
Constructor Detail

Feature_Impl

Feature_Impl(java.lang.String id,
             FeatureType featureType,
             java.lang.Object[] properties)
initializes a feature with its id its FeatureType and an array of properties. It is assumed that the properties are in the same order then the property definition within the FeatureType.


Feature_Impl

protected Feature_Impl(java.lang.String id,
                       FeatureType featureType,
                       FeatureProperty[] properties)
initializes a feature with its id its FeatureType and an array of properties. It is assumed that the properties are in the same order then the property definition within the FeatureType.

Method Detail

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

getFeatureType

public FeatureType getFeatureType()
returns the FeatureType of this Feature

Specified by:
getFeatureType in interface Feature

getProperties

public java.lang.Object[] getProperties()
returns the properties of the feature as array of Objects

Specified by:
getProperties in interface Feature

getProperty

public java.lang.Object getProperty(java.lang.String name)
returns the property of the feature that matches the submitted name TODO --> throw ModelException

Specified by:
getProperty in interface Feature

getProperty

public java.lang.Object getProperty(int index)
returns the property of the feature that matches the submitted index

Specified by:
getProperty in interface Feature

getGeometryProperties

public GM_Object[] getGeometryProperties()
returns all geometry properties of the feature. If no geometry could be found an GM_Object[] with zero length will be returned.

Specified by:
getGeometryProperties in interface Feature

getDefaultGeometryProperty

public GM_Object getDefaultGeometryProperty()
Returns the default geometry of the Feature. If there are no geometry properties at all, or the default geometry is null (which is possible when using ESRI-Shapefiles), null is returned.

Specified by:
getDefaultGeometryProperty in interface Feature
Returns:
default geometry or null, if the Feature has none

setProperty

public void setProperty(FeatureProperty property)
the value for the submitted property. if no property with the submitted name exists the property will be added

Specified by:
setProperty in interface Feature

getEnvelope

public GM_Envelope getEnvelope()
returns the envelope / boundingbox of the feature

Specified by:
getEnvelope in interface Feature
Returns:

toString

public java.lang.String toString()