public interface FeatureFactory
Implementations of this interface should not contain any "special logic" for creating attributes and features. Method implementations should be straight through calls to a constructor.
Association createAssociation(Attribute value, AssociationDescriptor descriptor)
value
- The value of the association, an attribute.descriptor
- The association descriptor.Attribute createAttribute(Object value, AttributeDescriptor descriptor, String id)
value
- The value of the attribute, may be null
.descriptor
- The attribute descriptor.id
- The id of the attribute, may be null
.GeometryAttribute createGeometryAttribute(Object geometry, GeometryDescriptor descriptor, String id, CoordinateReferenceSystem crs)
descriptor.getType()
must be an instance of GeometryType
.
geometry
- The value of the attribute, may be null
.descriptor
- The attribute descriptor.id
- The id of the attribute, may be null
.crs
- The coordinate reference system of the attribute, may be null
.ComplexAttribute createComplexAttribute(Collection<Property> value, AttributeDescriptor descriptor, String id)
descriptor.getType()
must be an instance of ComplexType
.
value
- The value of the attribute, a collection of properties.descriptor
- The attribute descriptor.id
- The id of the attribute, may be null
.ComplexAttribute createComplexAttribute(Collection<Property> value, ComplexType type, String id)
value
- The value of the attribute, a collection of properties.type
- The type of the attribute.id
- The id of the attribute, may be null
.Feature createFeature(Collection<Property> value, AttributeDescriptor descriptor, String id)
descriptor.getType()
must be an instance of FeatureType
.
value
- The value of the feature, a collection of properties.descriptor
- The attribute descriptor.id
- The id of the feature.Feature createFeature(Collection<Property> value, FeatureType type, String id)
value
- The value of the feature, a collection of properties.type
- The type of the feature.id
- The id of the feature.SimpleFeature createSimpleFeature(Object[] array, SimpleFeatureType type, String id)
Please note that the provided array may be used directly by an implementation.
array
- Object array of values; this array may beused directly.type
- The type of the simple feature.id
- The id of the feature.SimpleFeature createSimpleFeautre(Object[] array, AttributeDescriptor descriptor, String id)
descriptor.getType()
must be an instance of SimpleFeatureType
.
array
- Object array of values; this array may be used directly.descriptor
- The attribute descriptor.id
- The id of the feature.Copyright © 1996–2022 Geotools. All rights reserved.