Package org.geotools.feature.type
Class FeatureTypeFactoryImpl
Object
FeatureTypeFactoryImpl
- All Implemented Interfaces:
FeatureTypeFactory
- Direct Known Subclasses:
UniqueNameFeatureTypeFactoryImpl
This implementation is capable of creating a good default implementation of the Types used in the feature model.
The implementation focus here is on corretness rather then efficiency or even strict error messages. The code serves as a good example, but is not optimized for any particular use.
- Author:
- Jody Garnett
-
Constructor Summary
ConstructorsConstructorDescriptionRely on setter injectionFeatureTypeFactoryImpl(CRSFactory crsFactory, FilterFactory filterFactory) Constructor injection -
Method Summary
Modifier and TypeMethodDescriptioncreateAssociationDescriptor(AssociationType type, Name name, int minOccurs, int maxOccurs, boolean isNillable) Creates an association descriptor.createAssociationType(Name name, AttributeType relatedType, boolean isAbstract, List<Filter> restrictions, AssociationType superType, InternationalString description) Creates an association type.createAttributeDescriptor(AttributeType type, Name name, int minOccurs, int maxOccurs, boolean isNillable, Object defaultValue) Creates an attribute descriptor.createAttributeType(Name name, Class<?> binding, boolean isIdentifiable, boolean isAbstract, List<Filter> restrictions, AttributeType superType, InternationalString description) Creates an attribute type.createComplexType(Name name, Collection<PropertyDescriptor> schema, boolean isIdentifiable, boolean isAbstract, List<Filter> restrictions, AttributeType superType, InternationalString description) Creates a complex type.createFeatureType(Name name, Collection<PropertyDescriptor> schema, GeometryDescriptor defaultGeometry, boolean isAbstract, List<Filter> restrictions, AttributeType superType, InternationalString description) Creates a feature type.createGeometryDescriptor(GeometryType type, Name name, int minOccurs, int maxOccurs, boolean isNillable, Object defaultValue) Creates a geometry descriptor.createGeometryType(Name name, Class<?> binding, CoordinateReferenceSystem crs, boolean isIdentifiable, boolean isAbstract, List<Filter> restrictions, AttributeType superType, InternationalString description) Creates a geometric attribute type.createSchema(String uri) Creates a schema.createSimpleFeatureType(Name name, List<AttributeDescriptor> schema, GeometryDescriptor defaultGeometry, boolean isAbstract, List<Filter> restrictions, AttributeType superType, InternationalString description) Creates a simple feature type.voidsetCRSFactory(CRSFactory crsFactory) voidsetFilterFactory(FilterFactory filterFactory)
-
Constructor Details
-
FeatureTypeFactoryImpl
public FeatureTypeFactoryImpl()Rely on setter injection -
FeatureTypeFactoryImpl
Constructor injection
-
-
Method Details
-
createSchema
Description copied from interface:FeatureTypeFactoryCreates a schema.- Specified by:
createSchemain interfaceFeatureTypeFactory- Parameters:
uri- The uri of the schema.
-
getCRSFactory
-
setCRSFactory
-
getFilterFactory
-
setFilterFactory
-
createAssociationDescriptor
public AssociationDescriptor createAssociationDescriptor(AssociationType type, Name name, int minOccurs, int maxOccurs, boolean isNillable) Description copied from interface:FeatureTypeFactoryCreates an association descriptor.- Specified by:
createAssociationDescriptorin interfaceFeatureTypeFactory- Parameters:
type- The type of the described association.name- The name of the described association.minOccurs- The minimum number of occurences of the described association.maxOccurs- The maximum number of occurences of the described association.isNillable- Flag indicating wether the association is allowed to benull.
-
createAttributeDescriptor
public AttributeDescriptor createAttributeDescriptor(AttributeType type, Name name, int minOccurs, int maxOccurs, boolean isNillable, Object defaultValue) Description copied from interface:FeatureTypeFactoryCreates an attribute descriptor.- Specified by:
createAttributeDescriptorin interfaceFeatureTypeFactory- Parameters:
type- The type of the described attribute.name- The name of the described attribute.minOccurs- The minimum number of occurences of the described attribute.maxOccurs- The maximum number of occurences of the described attribute.isNillable- Flag indicating if the described attribute may have a null value.defaultValue- The default value of the described attribute.
-
createGeometryDescriptor
public GeometryDescriptor createGeometryDescriptor(GeometryType type, Name name, int minOccurs, int maxOccurs, boolean isNillable, Object defaultValue) Description copied from interface:FeatureTypeFactoryCreates a geometry descriptor.- Specified by:
createGeometryDescriptorin interfaceFeatureTypeFactory- Parameters:
type- The type of the described attribute.name- The name of the described attribute.minOccurs- The minimum number of occurences of the described attribute.maxOccurs- The maximum number of occurences of the described attribute.isNillable- Flag indicating if the described attribute may have a null value.defaultValue- The default value of the described attribute.
-
createAssociationType
public AssociationType createAssociationType(Name name, AttributeType relatedType, boolean isAbstract, List<Filter> restrictions, AssociationType superType, InternationalString description) Description copied from interface:FeatureTypeFactoryCreates an association type.- Specified by:
createAssociationTypein interfaceFeatureTypeFactory- Parameters:
name- The name of the type.relatedType- The type of attributes referenced by the association.isAbstract- Flag indicating if the type is abstract.restrictions- Set of restrictions on the association.superType- Parent type.description- A description of the type..
-
createAttributeType
public AttributeType createAttributeType(Name name, Class<?> binding, boolean isIdentifiable, boolean isAbstract, List<Filter> restrictions, AttributeType superType, InternationalString description) Description copied from interface:FeatureTypeFactoryCreates an attribute type.- Specified by:
createAttributeTypein interfaceFeatureTypeFactory- Parameters:
name- The name of the type.binding- The class that values of attributes of the type.isIdentifiable- Flag indicating if the attribute is identifiable.isAbstract- Flag indicating if the type is abstract.restrictions- Set of restrictions on the attribute.superType- Parent type.description- A description of the type.
-
createComplexType
public ComplexType createComplexType(Name name, Collection<PropertyDescriptor> schema, boolean isIdentifiable, boolean isAbstract, List<Filter> restrictions, AttributeType superType, InternationalString description) Description copied from interface:FeatureTypeFactoryCreates a complex type.- Specified by:
createComplexTypein interfaceFeatureTypeFactory- Parameters:
name- The name of the type.schema- Collection of property descriptors which define the type.isIdentifiable- Flag indicating if the attribute is identifiable.isAbstract- Flag indicating if the type is abstract.restrictions- Set of restrictions on the attribute.superType- Parent type.description- A description of the type.
-
createGeometryType
public GeometryType createGeometryType(Name name, Class<?> binding, CoordinateReferenceSystem crs, boolean isIdentifiable, boolean isAbstract, List<Filter> restrictions, AttributeType superType, InternationalString description) Description copied from interface:FeatureTypeFactoryCreates a geometric attribute type.- Specified by:
createGeometryTypein interfaceFeatureTypeFactory- Parameters:
name- The name of the type.binding- The class of values of attributes of the type.crs- The coordinate reference system of the type.isIdentifiable- Flag indicating if the attribute is identifiable.isAbstract- Flag indicating if the type is abstract.restrictions- Set of restrictions on the attribute.superType- Parent type.description- A description of the type.
-
createFeatureType
public FeatureType createFeatureType(Name name, Collection<PropertyDescriptor> schema, GeometryDescriptor defaultGeometry, boolean isAbstract, List<Filter> restrictions, AttributeType superType, InternationalString description) Description copied from interface:FeatureTypeFactoryCreates a feature type.- Specified by:
createFeatureTypein interfaceFeatureTypeFactory- Parameters:
name- The name of the type.schema- Collection of property descriptors which define the type.isAbstract- Flag indicating if the type is abstract.restrictions- Set of restrictions on the attribute.superType- Parent type.description- A description of the type.
-
createSimpleFeatureType
public SimpleFeatureType createSimpleFeatureType(Name name, List<AttributeDescriptor> schema, GeometryDescriptor defaultGeometry, boolean isAbstract, List<Filter> restrictions, AttributeType superType, InternationalString description) Description copied from interface:FeatureTypeFactoryCreates a simple feature type.- Specified by:
createSimpleFeatureTypein interfaceFeatureTypeFactory- Parameters:
name- The name of the type.schema- List of attribute descriptors which define the type.isAbstract- Flag indicating if the type is abstract.restrictions- Set of restrictions on the attribute.superType- Parent type.description- A description of the type.
-