Interface FeatureFactory

All Known Implementing Classes:
AbstractFeatureFactoryImpl, AppSchemaFeatureFactoryImpl, LenientFeatureFactoryImpl, ValidatingFeatureFactoryImpl

public interface FeatureFactory
Factory for creation of attributes, associations, and features.

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.

Since:
2.2
Author:
Gabriel Roldan (Axios Engineering), Justin Deoliveira (The Open Planning Project)
  • Method Details

    • createAssociation

      Association createAssociation(Attribute value, AssociationDescriptor descriptor)
      Creates an association.
      Parameters:
      value - The value of the association, an attribute.
      descriptor - The association descriptor.
    • createAttribute

      Attribute createAttribute(Object value, AttributeDescriptor descriptor, String id)
      Creates an attribute.
      Parameters:
      value - The value of the attribute, may be null.
      descriptor - The attribute descriptor.
      id - The id of the attribute, may be null.
    • createGeometryAttribute

      GeometryAttribute createGeometryAttribute(Object geometry, GeometryDescriptor descriptor, String id, CoordinateReferenceSystem crs)
      Creates a geometry attribute.

      descriptor.getType() must be an instance of GeometryType.

      Parameters:
      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.
    • createComplexAttribute

      ComplexAttribute createComplexAttribute(Collection<Property> value, AttributeDescriptor descriptor, String id)
      Creates a complex attribute.

      descriptor.getType() must be an instance of ComplexType.

      Parameters:
      value - The value of the attribute, a collection of properties.
      descriptor - The attribute descriptor.
      id - The id of the attribute, may be null.
    • createComplexAttribute

      ComplexAttribute createComplexAttribute(Collection<Property> value, ComplexType type, String id)
      Creates a complex attribute.
      Parameters:
      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.
    • createFeature

      Feature createFeature(Collection<Property> value, AttributeDescriptor descriptor, String id)
      Creates a feature.

      descriptor.getType() must be an instance of FeatureType.

      Parameters:
      value - The value of the feature, a collection of properties.
      descriptor - The attribute descriptor.
      id - The id of the feature.
    • createFeature

      Feature createFeature(Collection<Property> value, FeatureType type, String id)
      Creates a feature.
      Parameters:
      value - The value of the feature, a collection of properties.
      type - The type of the feature.
      id - The id of the feature.
    • createSimpleFeature

      SimpleFeature createSimpleFeature(Object[] array, SimpleFeatureType type, String id)
      Create a SimpleFeature from an array of objects.

      Please note that the provided array may be used directly by an implementation.

      Parameters:
      array - Object array of values; this array may beused directly.
      type - The type of the simple feature.
      id - The id of the feature.
    • createSimpleFeautre

      SimpleFeature createSimpleFeautre(Object[] array, AttributeDescriptor descriptor, String id)
      Creates a simple feature.

      descriptor.getType() must be an instance of SimpleFeatureType.

      Parameters:
      array - Object array of values; this array may be used directly.
      descriptor - The attribute descriptor.
      id - The id of the feature.