org.geotools.feature.type
Class FeatureTypeFactoryImpl

Object
  extended by FeatureTypeFactoryImpl
All Implemented Interfaces:
FeatureTypeFactory
Direct Known Subclasses:
UniqueNameFeatureTypeFactoryImpl

public class FeatureTypeFactoryImpl
extends Object
implements FeatureTypeFactory

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
FeatureTypeFactoryImpl()
          Rely on setter injection
FeatureTypeFactoryImpl(CRSFactory crsFactory, FilterFactory filterFactory)
          Constructor injection
 
Method Summary
 AssociationDescriptor createAssociationDescriptor(AssociationType type, Name name, int minOccurs, int maxOccurs, boolean isNillable)
          Creates an association descriptor.
 AssociationType createAssociationType(Name name, AttributeType relatedType, boolean isAbstract, List restrictions, AssociationType superType, InternationalString description)
          Creates an association type.
 AttributeDescriptor createAttributeDescriptor(AttributeType type, Name name, int minOccurs, int maxOccurs, boolean isNillable, Object defaultValue)
          Creates an attribute descriptor.
 AttributeType createAttributeType(Name name, Class binding, boolean isIdentifiable, boolean isAbstract, List restrictions, AttributeType superType, InternationalString description)
          Creates an attribute type.
 ComplexType createComplexType(Name name, Collection schema, boolean isIdentifiable, boolean isAbstract, List restrictions, AttributeType superType, InternationalString description)
          Creates a complex type.
 FeatureType createFeatureType(Name name, Collection schema, GeometryDescriptor defaultGeometry, boolean isAbstract, List restrictions, AttributeType superType, InternationalString description)
          Creates a feature type.
 GeometryDescriptor createGeometryDescriptor(GeometryType type, Name name, int minOccurs, int maxOccurs, boolean isNillable, Object defaultValue)
          Creates a geometry descriptor.
 GeometryType createGeometryType(Name name, Class binding, CoordinateReferenceSystem crs, boolean isIdentifiable, boolean isAbstract, List restrictions, AttributeType superType, InternationalString description)
          Creates a geometric attribute type.
 Schema createSchema(String uri)
          Creates a schema.
 SimpleFeatureType createSimpleFeatureType(Name name, List<AttributeDescriptor> schema, GeometryDescriptor defaultGeometry, boolean isAbstract, List<Filter> restrictions, AttributeType superType, InternationalString description)
          Creates a simple feature type.
 CRSFactory getCRSFactory()
           
 FilterFactory getFilterFactory()
           
 void setCRSFactory(CRSFactory crsFactory)
           
 void setFilterFactory(FilterFactory filterFactory)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeatureTypeFactoryImpl

public FeatureTypeFactoryImpl()
Rely on setter injection


FeatureTypeFactoryImpl

public FeatureTypeFactoryImpl(CRSFactory crsFactory,
                              FilterFactory filterFactory)
Constructor injection

Method Detail

createSchema

public Schema createSchema(String uri)
Description copied from interface: FeatureTypeFactory
Creates a schema.

Specified by:
createSchema in interface FeatureTypeFactory
Parameters:
uri - The uri of the schema.

getCRSFactory

public CRSFactory getCRSFactory()

setCRSFactory

public void setCRSFactory(CRSFactory crsFactory)

getFilterFactory

public FilterFactory getFilterFactory()

setFilterFactory

public void setFilterFactory(FilterFactory filterFactory)

createAssociationDescriptor

public AssociationDescriptor createAssociationDescriptor(AssociationType type,
                                                         Name name,
                                                         int minOccurs,
                                                         int maxOccurs,
                                                         boolean isNillable)
Description copied from interface: FeatureTypeFactory
Creates an association descriptor.

Specified by:
createAssociationDescriptor in interface FeatureTypeFactory
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 be null.

createAttributeDescriptor

public AttributeDescriptor createAttributeDescriptor(AttributeType type,
                                                     Name name,
                                                     int minOccurs,
                                                     int maxOccurs,
                                                     boolean isNillable,
                                                     Object defaultValue)
Description copied from interface: FeatureTypeFactory
Creates an attribute descriptor.

Specified by:
createAttributeDescriptor in interface FeatureTypeFactory
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.

createGeometryDescriptor

public GeometryDescriptor createGeometryDescriptor(GeometryType type,
                                                   Name name,
                                                   int minOccurs,
                                                   int maxOccurs,
                                                   boolean isNillable,
                                                   Object defaultValue)
Description copied from interface: FeatureTypeFactory
Creates a geometry descriptor.

Specified by:
createGeometryDescriptor in interface FeatureTypeFactory
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.

createAssociationType

public AssociationType createAssociationType(Name name,
                                             AttributeType relatedType,
                                             boolean isAbstract,
                                             List restrictions,
                                             AssociationType superType,
                                             InternationalString description)
Description copied from interface: FeatureTypeFactory
Creates an association type.

Specified by:
createAssociationType in interface FeatureTypeFactory
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 restrictions,
                                         AttributeType superType,
                                         InternationalString description)
Description copied from interface: FeatureTypeFactory
Creates an attribute type.

Specified by:
createAttributeType in interface FeatureTypeFactory
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 schema,
                                     boolean isIdentifiable,
                                     boolean isAbstract,
                                     List restrictions,
                                     AttributeType superType,
                                     InternationalString description)
Description copied from interface: FeatureTypeFactory
Creates a complex type.

Specified by:
createComplexType in interface FeatureTypeFactory
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 restrictions,
                                       AttributeType superType,
                                       InternationalString description)
Description copied from interface: FeatureTypeFactory
Creates a geometric attribute type.

Specified by:
createGeometryType in interface FeatureTypeFactory
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 schema,
                                     GeometryDescriptor defaultGeometry,
                                     boolean isAbstract,
                                     List restrictions,
                                     AttributeType superType,
                                     InternationalString description)
Description copied from interface: FeatureTypeFactory
Creates a feature type.

Specified by:
createFeatureType in interface FeatureTypeFactory
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: FeatureTypeFactory
Creates a simple feature type.

Specified by:
createSimpleFeatureType in interface FeatureTypeFactory
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.


Copyright © 1996-2014 Geotools. All Rights Reserved.