public class FeatureImpl extends ComplexAttributeImpl implements Feature
NOTE this is work in progress and at this time not really being used throughout the library.
id
descriptor, userData, value
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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()
The default geometric attribute of the feature.
|
FeatureId |
getIdentifier()
Unique Identifier for the attribute.
|
FeatureType |
getType()
The type of the property.
|
void |
setDefaultGeometryProperty(GeometryAttribute defaultGeometry)
Sets the default geometric attribute of the feature.
|
getProperties, getProperties, getProperties, getProperty, getProperty, getValue, properties, setValue, setValue
equals, getDescriptor, hashCode, parse, toString, validate
getName, getUserData, isNillable
getProperties, getProperties, getProperties, getProperty, getProperty, getValue, setValue, validate
getDescriptor
getName, getUserData, isNillable, setValue
public FeatureImpl(Collection<Property> properties, AttributeDescriptor desc, FeatureId id)
properties
- Collectio of Properties (aka Attributes and/or Associations)desc
- Nested descriptorid
- Feature IDpublic FeatureImpl(Collection<Property> properties, FeatureType type, FeatureId id)
properties
- Collectio of Properties (aka Attributes and/or Associations)type
- Type of feature to be createdid
- Feature IDpublic FeatureType getType()
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()
.
getType
in interface Attribute
getType
in interface ComplexAttribute
getType
in interface Feature
getType
in interface Property
getType
in class ComplexAttributeImpl
Property.getType()
public FeatureId getIdentifier()
Attribute
This value is non-null in the case that getType().isIdentifiable()
is
true
.
getIdentifier
in interface Attribute
getIdentifier
in interface Feature
getIdentifier
in class AttributeImpl
null
if the attribute is
non-identifiable.public BoundingBox getBounds()
getBounds
in interface Feature
public GeometryAttribute getDefaultGeometryProperty()
Feature
This method returns null
in the case where no such attribute exists.
getDefaultGeometryProperty
in interface Feature
null
.public void setDefaultGeometryProperty(GeometryAttribute defaultGeometry)
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.
setDefaultGeometryProperty
in interface Feature
defaultGeometry
- The new geomtric attribute.Copyright © 1996–2019 Geotools. All rights reserved.