Package org.geotools.feature
Class FeatureImpl
Object
PropertyImpl
AttributeImpl
ComplexAttributeImpl
FeatureImpl
- All Implemented Interfaces:
Attribute,ComplexAttribute,Feature,Property
Temptative implementation of Feature.
NOTE this is work in progress and at this time not really being used throughout the library.
- Author:
- jdeolive, jgarnett
-
Field Summary
Fields inherited from class AttributeImpl
idFields inherited from class PropertyImpl
descriptor, value -
Constructor Summary
ConstructorsConstructorDescriptionFeatureImpl(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
Modifier and TypeMethodDescriptionGet the total bounds of this feature which is calculated by doing a union of the bounds of each geometry this feature is associated with.The default geometric attribute of the feature.Unique Identifier for the attribute.getType()The type of the property.voidsetDefaultGeometryProperty(GeometryAttribute defaultGeometry) Sets the default geometric attribute of the feature.Methods inherited from class ComplexAttributeImpl
addValue, find, findAll, findLast, getProperties, getProperties, getProperties, getProperty, getProperty, getValue, properties, setValue, setValueMethods inherited from class AttributeImpl
equals, getDescriptor, hashCode, parse, toString, validateMethods inherited from class PropertyImpl
getName, getUserData, getUserData, isNillableMethods inherited from interface Attribute
getDescriptorMethods inherited from interface ComplexAttribute
getProperties, getProperties, getProperties, getProperty, getProperty, getValue, setValue, validateMethods inherited from interface Property
getName, getUserData, hasUserData, isNillable, setValue
-
Constructor Details
-
FeatureImpl
Create a Feature with the following content.- Parameters:
properties- Collectio of Properties (aka Attributes and/or Associations)desc- Nested descriptorid- Feature ID
-
FeatureImpl
Create a Feature with the following content.- Parameters:
properties- Collectio of Properties (aka Attributes and/or Associations)type- Type of feature to be createdid- Feature ID
-
-
Method Details
-
getType
Description copied from interface:PropertyThe type of the property.The type contains information about the value or content of the property such as its java class.
This value is also available via
getDescriptor().getType().- Specified by:
getTypein interfaceAttribute- Specified by:
getTypein interfaceComplexAttribute- Specified by:
getTypein interfaceFeature- Specified by:
getTypein interfaceProperty- Overrides:
getTypein classComplexAttributeImpl- Returns:
- The property type.
- See Also:
-
getIdentifier
Description copied from interface:AttributeUnique Identifier for the attribute.This value is non-null in the case that
getType().isIdentifiable()istrue.- Specified by:
getIdentifierin interfaceAttribute- Specified by:
getIdentifierin interfaceFeature- Overrides:
getIdentifierin classAttributeImpl- Returns:
- A unique identifier for the attribute, or
nullif the attribute is non-identifiable.
-
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:
getBoundsin interfaceFeature- 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
Description copied from interface:FeatureThe default geometric attribute of the feature.This method returns
nullin the case where no such attribute exists.- Specified by:
getDefaultGeometryPropertyin interfaceFeature- Returns:
- The default geometry attribute, or
null.
-
setDefaultGeometryProperty
Description copied from interface:FeatureSets the default geometric attribute of the feature.This value must be an attribute which is already defined for the feature. In other words, this method can not be used to add a new attribute to the feature.
- Specified by:
setDefaultGeometryPropertyin interfaceFeature- Parameters:
defaultGeometry- The new geomtric attribute.
-