org.jscience.ml.gml.dom
Class FeatureImpl

java.lang.Object
  extended by org.jscience.ml.gml.dom.GMLConstructImpl
      extended by org.jscience.ml.gml.dom.FeatureImpl
All Implemented Interfaces:
Feature, GMLConstruct, GMLConstructOwner, PropertyOwner, UnknownConstructOwner, XMLDescribable
Direct Known Subclasses:
FeatureCollectionImpl

public class FeatureImpl
extends GMLConstructImpl
implements Feature

A DOM-based implementation of the Feature interface.


Field Summary
 
Fields inherited from interface org.jscience.ml.gml.infoset.Feature
BOUNDED_BY_PROP, DESCRIPTION_PROP, FID_ATTR, NAME_PROP
 
Constructor Summary
protected FeatureImpl(FeatureOwner owner, org.w3c.dom.Element domElement, GMLDocument document)
          Initializes this feature construct and all GML constructs owned by it.
 
Method Summary
 Geometry getBoundedBy()
          Returns the boundedBy property of this feature.
 java.lang.String getDescription()
          Returns the value of the description property of this feature.
 java.lang.String getId()
          Returns the Id of this feature, presumably stored in the fid attribute.
 java.lang.String getName()
          Returns the value of the name property of this feature.
 PropertyIterator getPropertyIterator()
          Returns an iterator to all properties of this feature.
 UnknownConstructIterator getUnknownConstructIterator()
          Returns an iterator to all unknown constructs of this feature.
protected  boolean hasProperties()
          DOCUMENT ME!
protected  boolean hasUnknownConstructs()
          DOCUMENT ME!
static Feature newFeature(FeatureOwner owner, org.w3c.dom.Element sourceElement, GMLDocument document)
          This method must be used to create new features and feature collections.
protected  void refreshInternals()
          Refreshes the internal data cache from the DOM source tree.
 java.lang.String toString()
          Returns a one-line string representation of this feature.
 
Methods inherited from class org.jscience.ml.gml.dom.GMLConstructImpl
getAttribute, getAttribute, getAttribute, getAttributeCount, getAttributeLine, getDOMElement, getGMLConstructIterator, getGMLDocument, getOwner, getXMLDescriptor, hasCoordinates, hasCoords, hasFeatures, hasGeometries, setGMLDocument
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jscience.ml.gml.infoset.GMLConstruct
getAttribute, getAttribute, getAttribute, getAttributeCount, getOwner
 
Methods inherited from interface org.jscience.ml.gml.infoset.XMLDescribable
getXMLDescriptor
 
Methods inherited from interface org.jscience.ml.gml.infoset.GMLConstructOwner
getGMLConstructIterator
 

Constructor Detail

FeatureImpl

protected FeatureImpl(FeatureOwner owner,
                      org.w3c.dom.Element domElement,
                      GMLDocument document)
Initializes this feature construct and all GML constructs owned by it. This constructor should be called only from the newFeature method.

See Also:
newFeature(FeatureOwner,Element,GMLDocument)
Method Detail

getBoundedBy

public Geometry getBoundedBy()
Returns the boundedBy property of this feature. This property defines the bounding box for this feature. In the future, the abstract geometry will be replaced by a Box.

Specified by:
getBoundedBy in interface Feature
Returns:
The Geometry/Box object if specified, otherwise null.

getName

public java.lang.String getName()
Returns the value of the name property of this feature.

Specified by:
getName in interface Feature
Returns:
Null if the name property is not specified.

getDescription

public java.lang.String getDescription()
Returns the value of the description property of this feature.

Specified by:
getDescription in interface Feature
Returns:
Null if the description property is not specified.

getId

public java.lang.String getId()
Returns the Id of this feature, presumably stored in the fid attribute.

Specified by:
getId in interface Feature
Returns:
Null if an Id is not specified.

getPropertyIterator

public PropertyIterator getPropertyIterator()
Returns an iterator to all properties of this feature.

Specified by:
getPropertyIterator in interface PropertyOwner
Returns:
DOCUMENT ME!

getUnknownConstructIterator

public UnknownConstructIterator getUnknownConstructIterator()
Returns an iterator to all unknown constructs of this feature.

Specified by:
getUnknownConstructIterator in interface UnknownConstructOwner
Returns:
DOCUMENT ME!

newFeature

public static Feature newFeature(FeatureOwner owner,
                                 org.w3c.dom.Element sourceElement,
                                 GMLDocument document)
This method must be used to create new features and feature collections.

Parameters:
owner - DOCUMENT ME!
sourceElement - DOCUMENT ME!
document - DOCUMENT ME!
Returns:
DOCUMENT ME!

toString

public java.lang.String toString()
Returns a one-line string representation of this feature.

Overrides:
toString in class GMLConstructImpl
Returns:
DOCUMENT ME!

hasProperties

protected boolean hasProperties()
DOCUMENT ME!

Overrides:
hasProperties in class GMLConstructImpl
Returns:
DOCUMENT ME!

hasUnknownConstructs

protected boolean hasUnknownConstructs()
DOCUMENT ME!

Overrides:
hasUnknownConstructs in class GMLConstructImpl
Returns:
DOCUMENT ME!

refreshInternals

protected void refreshInternals()
Refreshes the internal data cache from the DOM source tree. This method should be called each time the underlying DOM structure has changed.

Overrides:
refreshInternals in class GMLConstructImpl