org.geotools.feature
Class DefaultAttributeTypeFactory

java.lang.Object
  extended byorg.geotools.feature.AttributeTypeFactory
      extended byorg.geotools.feature.DefaultAttributeTypeFactory
All Implemented Interfaces:
Factory

public class DefaultAttributeTypeFactory
extends AttributeTypeFactory

Factory for creating DefaultAttributeTypes.

Version:
$Id: DefaultAttributeTypeFactory.java 18021 2006-02-14 20:36:18Z jdeolive $
Author:
Ian Schneider

Constructor Summary
DefaultAttributeTypeFactory()
           
DefaultAttributeTypeFactory(FilterFactory factory)
           
 
Method Summary
protected  AttributeType createAttributeType(java.lang.String name, java.lang.Class clazz, boolean isNillable, Filter filter, java.lang.Object defaultValue, java.lang.Object metadata)
          Implementation of AttributeType creation.
protected  AttributeType createAttributeType(java.lang.String name, java.lang.Class clazz, boolean isNillable, int fieldLength)
          Create an AttributeType with the given name, Class, nillability, and fieldLength meta-data.
protected  AttributeType createAttributeType(java.lang.String name, java.lang.Class clazz, boolean isNillable, int fieldLength, java.lang.Object defaultValue)
          Implementation of AttributeType creation.
protected  AttributeType createAttributeType(java.lang.String name, java.lang.Class clazz, boolean isNillable, int fieldLength, java.lang.Object defaultValue, java.lang.Object metaData)
          Create a Feature AttributeType which holds the a Feature instance which is of the given FeatureType or null if any arbitrary Feature can be held.
protected  AttributeType createAttributeType(java.lang.String name, FeatureType type, boolean isNillable)
          Creates the DefaultAttributeType.Feature
protected  Filter length(int fieldLength)
           
 void setFilterFactory(FilterFactory factory)
           
 
Methods inherited from class org.geotools.feature.AttributeTypeFactory
defaultInstance, getImplementationHints, newAttributeType, newAttributeType, newAttributeType, newAttributeType, newAttributeType, newAttributeType, newAttributeType, newAttributeType, newInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAttributeTypeFactory

public DefaultAttributeTypeFactory()

DefaultAttributeTypeFactory

public DefaultAttributeTypeFactory(FilterFactory factory)
Method Detail

setFilterFactory

public void setFilterFactory(FilterFactory factory)

createAttributeType

protected AttributeType createAttributeType(java.lang.String name,
                                            java.lang.Class clazz,
                                            boolean isNillable,
                                            int fieldLength)
Create an AttributeType with the given name, Class, nillability, and fieldLength meta-data. This method will itself call createAttributeType(String,Class,boolean,int,Object) with null as the default value. To use your own default value, use the above method, providing your default value.

Specified by:
createAttributeType in class AttributeTypeFactory
Parameters:
name - The name of the AttributeType to create.
clazz - the class of the AttributeType to create.
isNillable - whether the AttributeType should allow nulls.
Returns:
the newly created AttributeType

createAttributeType

protected AttributeType createAttributeType(java.lang.String name,
                                            FeatureType type,
                                            boolean isNillable)
Creates the DefaultAttributeType.Feature

Specified by:
createAttributeType in class AttributeTypeFactory
Parameters:
name - The name of the AttributeType to create.
type - To use for validation.
isNillable - whether the AttributeType should allow nulls.
Returns:
the newly created feature AttributeType.

length

protected Filter length(int fieldLength)

createAttributeType

protected AttributeType createAttributeType(java.lang.String name,
                                            java.lang.Class clazz,
                                            boolean isNillable,
                                            int fieldLength,
                                            java.lang.Object defaultValue)
Implementation of AttributeType creation.

Specified by:
createAttributeType in class AttributeTypeFactory
Parameters:
name - The name of the AttributeType to be created.
clazz - The class that objects will validate against.
isNillable - if nulls are allowed in the new type.
Returns:
the new AttributeType

createAttributeType

protected AttributeType createAttributeType(java.lang.String name,
                                            java.lang.Class clazz,
                                            boolean isNillable,
                                            Filter filter,
                                            java.lang.Object defaultValue,
                                            java.lang.Object metadata)
Implementation of AttributeType creation.

Specified by:
createAttributeType in class AttributeTypeFactory
Parameters:
name - The name of the AttributeType to be created.
clazz - The class that objects will validate against.
isNillable - if nulls are allowed in the new type.
filter - Used to limit the valid values
Returns:
the new AttributeType

createAttributeType

protected AttributeType createAttributeType(java.lang.String name,
                                            java.lang.Class clazz,
                                            boolean isNillable,
                                            int fieldLength,
                                            java.lang.Object defaultValue,
                                            java.lang.Object metaData)
Description copied from class: AttributeTypeFactory
Create a Feature AttributeType which holds the a Feature instance which is of the given FeatureType or null if any arbitrary Feature can be held.

Specified by:
createAttributeType in class AttributeTypeFactory
Parameters:
name - The name of the AttributeType to be created.
clazz - The FeatureType that Features will validate against.
isNillable - if nulls are allowed in the new type.
defaultValue - default value, may be null if isNilable is true
metaData - metadata for attribute type (such as CoordianteReferenceSystem)
Returns:
the new AttributeType


Copyright © GeoTools. All Rights Reserved.