org.geotools.feature
Class FeatureImpl

Object
  extended by PropertyImpl
      extended by AttributeImpl
          extended by ComplexAttributeImpl
              extended by FeatureImpl
All Implemented Interfaces:
Attribute, ComplexAttribute, Feature, Property

public class FeatureImpl
extends ComplexAttributeImpl
implements Feature

Temptative implementation of Feature.

NOTE this is work in progress and at this time not really being used throughout the library.

Author:
jdeolive, jgarnett
Module:
modules/library/main (gt-main.jar)

Field Summary
 
Fields inherited from class AttributeImpl
id
 
Fields inherited from class PropertyImpl
descriptor, userData, value
 
Constructor Summary
FeatureImpl(Collection<Property> properties, AttributeDescriptor desc, FeatureId id)
          Create a Feature with the following content.
FeatureImpl(Collection<Property> properties, FeatureType type, FeatureId id)
          Create a Feature with the following content.
 
Method Summary
 BoundingBox getBounds()
          Get the total bounds of this feature which is calculated by doing a union of the bounds of each geometry this feature is associated with.
 GeometryAttribute getDefaultGeometryProperty()
           
 FeatureId getIdentifier()
           
 FeatureType getType()
           
 void setDefaultGeometryProperty(GeometryAttribute defaultGeometry)
           
 
Methods inherited from class ComplexAttributeImpl
getProperties, getProperties, getProperties, getProperty, getProperty, getValue, properties, setValue, setValue
 
Methods inherited from class AttributeImpl
equals, getDescriptor, hashCode, parse, toString, validate
 
Methods inherited from class PropertyImpl
getName, getUserData, isNillable
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ComplexAttribute
getProperties, getProperties, getProperties, getProperty, getProperty, getValue, setValue, validate
 
Methods inherited from interface Attribute
getDescriptor
 
Methods inherited from interface Property
getName, getUserData, isNillable, setValue
 

Constructor Detail

FeatureImpl

public FeatureImpl(Collection<Property> properties,
                   AttributeDescriptor desc,
                   FeatureId id)
Create a Feature with the following content.

Parameters:
properties - Collectio of Properties (aka Attributes and/or Associations)
desc - Nested descriptor
id - Feature ID

FeatureImpl

public FeatureImpl(Collection<Property> properties,
                   FeatureType type,
                   FeatureId id)
Create a Feature with the following content.

Parameters:
properties - Collectio of Properties (aka Attributes and/or Associations)
type - Type of feature to be created
id - Feature ID
Method Detail

getType

public FeatureType getType()
Specified by:
getType in interface Attribute
Specified by:
getType in interface ComplexAttribute
Specified by:
getType in interface Feature
Specified by:
getType in interface Property
Overrides:
getType in class ComplexAttributeImpl

getIdentifier

public FeatureId getIdentifier()
Specified by:
getIdentifier in interface Attribute
Specified by:
getIdentifier in interface Feature
Overrides:
getIdentifier in class AttributeImpl

getBounds

public BoundingBox getBounds()
Get the total bounds of this feature which is calculated by doing a union of the bounds of each geometry this feature is associated with.

Specified by:
getBounds in interface Feature
Returns:
An Envelope containing the total bounds of this Feature.
TODO:
REVISIT: what to return if there are no geometries in the feature? For now we'll return a null envelope, make this part of interface? (IanS - by OGC standards, all Feature must have geom)

getDefaultGeometryProperty

public GeometryAttribute getDefaultGeometryProperty()
Specified by:
getDefaultGeometryProperty in interface Feature

setDefaultGeometryProperty

public void setDefaultGeometryProperty(GeometryAttribute defaultGeometry)
Specified by:
setDefaultGeometryProperty in interface Feature


Copyright © 1996-2009 Geotools. All Rights Reserved.