org.geotools.feature
Class FeatureTypeFactory

Object
  extended by FeatureTypes
      extended by FeatureTypeBuilder
          extended by FeatureTypeFactory
All Implemented Interfaces:
Factory
Direct Known Subclasses:
DefaultFeatureTypeFactory

Deprecated. Please use FeatureTypeBuilder

public abstract class FeatureTypeFactory
extends FeatureTypeBuilder

Replaced with use of FeatureTypeBuilder to follow standard pattern naming conventions.

Author:
Ian Schneider
Module:

Field Summary
 
Fields inherited from class FeatureTypeBuilder
ABSTRACT_FEATURE_TYPE
 
Fields inherited from class FeatureTypes
ANY_LENGTH, DEFAULT_NAMESPACE, DEFAULT_TYPENAME, EMPTY
 
Constructor Summary
FeatureTypeFactory()
          Deprecated. An empty public constructor.
 
Method Summary
static FeatureTypeFactory createTemplate(FeatureType original)
          Deprecated. Create a FeatureTypeFactory which contains all of the AttributeTypes from the given FeatureType.
static FeatureType newFeatureType(AttributeType[] types, String name)
          Deprecated. Create a new FeatureType with the given AttributeTypes.
static FeatureType newFeatureType(AttributeType[] types, String name, URI ns)
          Deprecated. Create a new FeatureType with the given AttributeTypes.
static FeatureType newFeatureType(AttributeType[] types, String name, URI ns, boolean isAbstract)
          Deprecated. Create a new FeatureType with the given AttributeTypes.
static FeatureType newFeatureType(AttributeType[] types, String name, URI ns, boolean isAbstract, FeatureType[] superTypes)
          Deprecated. The most specific way to create a new FeatureType.
static FeatureType newFeatureType(AttributeType[] types, String name, URI ns, boolean isAbstract, FeatureType[] superTypes, AttributeType defaultGeometry)
          Deprecated. The most specific way to create a new FeatureType.
static FeatureType newFeatureType(AttributeType[] types, String name, URI ns, boolean isAbstract, FeatureType[] superTypes, GeometryAttributeType defaultGeometry)
          Deprecated. The most specific way to create a new FeatureType.
static FeatureTypeFactory newInstance(String name)
          Deprecated. Create a new FeatureTypeFactory with the given typeName.
 String toString()
          Deprecated. Returns a string representation of this factory.
 
Methods inherited from class FeatureTypeBuilder
add, add, addBaseTypes, addType, addType, addTypes, check, contains, createFeatureType, get, getAttributeCount, getDefaultGeometry, getFeatureType, getImplementationHints, getName, getNamespace, getSuperTypes, importType, importType, isAbstract, remove, remove, removeAll, removeType, removeType, set, setAbstract, setDefaultGeometry, setName, setNamespace, setSuperTypes, setType, swap
 
Methods inherited from class FeatureTypes
ancestors, equals, equals, equals, equals, equalsAncestors, equalsId, getAncestors, getFieldLength, isDecendedFrom, isDecendedFrom, newFeatureType, newFeatureType, newFeatureType, newFeatureType, newFeatureType, newFeatureType, transform, transform, transform
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FeatureTypeFactory

public FeatureTypeFactory()
Deprecated. 
An empty public constructor. Subclasses should not provide a constructor.

Method Detail

newFeatureType

public static FeatureType newFeatureType(AttributeType[] types,
                                         String name,
                                         URI ns,
                                         boolean isAbstract,
                                         FeatureType[] superTypes)
                                  throws FactoryRegistryException,
                                         SchemaException
Deprecated. 
The most specific way to create a new FeatureType.

Parameters:
types - The AttributeTypes to create the FeatureType with.
name - The typeName of the FeatureType. Required, may not be null.
ns - The namespace of the FeatureType. Optional, may be null.
isAbstract - True if this created type should be abstract.
superTypes - A Collection of types the FeatureType will inherit from. Currently, all types inherit from feature in the opengis namespace.
Returns:
A new FeatureType created from the given arguments.
Throws:
FactoryRegistryException - If there are problems creating a factory.
SchemaException - If the AttributeTypes provided are invalid in some way.

newFeatureType

public static FeatureType newFeatureType(AttributeType[] types,
                                         String name,
                                         URI ns,
                                         boolean isAbstract,
                                         FeatureType[] superTypes,
                                         AttributeType defaultGeometry)
                                  throws FactoryRegistryException,
                                         SchemaException
Deprecated. 
The most specific way to create a new FeatureType.

Parameters:
types - The AttributeTypes to create the FeatureType with.
name - The typeName of the FeatureType. Required, may not be null.
ns - The namespace of the FeatureType. Optional, may be null.
isAbstract - True if this created type should be abstract.
superTypes - A Collection of types the FeatureType will inherit from. Currently, all types inherit from feature in the opengis namespace.
Returns:
A new FeatureType created from the given arguments.
Throws:
FactoryRegistryException - If there are problems creating a factory.
SchemaException - If the AttributeTypes provided are invalid in some way.

newFeatureType

public static FeatureType newFeatureType(AttributeType[] types,
                                         String name,
                                         URI ns,
                                         boolean isAbstract,
                                         FeatureType[] superTypes,
                                         GeometryAttributeType defaultGeometry)
                                  throws FactoryRegistryException,
                                         SchemaException
Deprecated. 
The most specific way to create a new FeatureType.

Parameters:
types - The AttributeTypes to create the FeatureType with.
name - The typeName of the FeatureType. Required, may not be null.
ns - The namespace of the FeatureType. Optional, may be null.
isAbstract - True if this created type should be abstract.
superTypes - A Collection of types the FeatureType will inherit from. Currently, all types inherit from feature in the opengis namespace.
Returns:
A new FeatureType created from the given arguments.
Throws:
FactoryRegistryException - If there are problems creating a factory.
SchemaException - If the AttributeTypes provided are invalid in some way.

newFeatureType

public static FeatureType newFeatureType(AttributeType[] types,
                                         String name,
                                         URI ns,
                                         boolean isAbstract)
                                  throws FactoryRegistryException,
                                         SchemaException
Deprecated. 
Create a new FeatureType with the given AttributeTypes. A short cut for calling newFeatureType(types,name,ns,isAbstract,null).

Parameters:
types - The AttributeTypes to create the FeatureType with.
name - The typeName of the FeatureType. Required, may not be null.
ns - The namespace of the FeatureType. Optional, may be null.
isAbstract - True if this created type should be abstract.
Returns:
A new FeatureType created from the given arguments.
Throws:
FactoryRegistryException - If there are problems creating a factory.
SchemaException - If the AttributeTypes provided are invalid in some way.

newFeatureType

public static FeatureType newFeatureType(AttributeType[] types,
                                         String name,
                                         URI ns)
                                  throws FactoryRegistryException,
                                         SchemaException
Deprecated. 
Create a new FeatureType with the given AttributeTypes. A short cut for calling newFeatureType(types,name,ns,false,null).

Parameters:
types - The AttributeTypes to create the FeatureType with.
name - The typeName of the FeatureType. Required, may not be null.
ns - The namespace of the FeatureType. Optional, may be null.
Returns:
A new FeatureType created from the given arguments.
Throws:
FactoryRegistryException - If there are problems creating a factory.
SchemaException - If the AttributeTypes provided are invalid in some way.

newFeatureType

public static FeatureType newFeatureType(AttributeType[] types,
                                         String name)
                                  throws FactoryRegistryException,
                                         SchemaException
Deprecated. 
Create a new FeatureType with the given AttributeTypes. A short cut for calling newFeatureType(types,name,null,false,null). Useful for test cases or datasources which may not allow a namespace.

Parameters:
types - The AttributeTypes to create the FeatureType with.
name - The typeName of the FeatureType. Required, may not be null.
Returns:
A new FeatureType created from the given arguments.
Throws:
FactoryRegistryException - If there are problems creating a factory.
SchemaException - If the AttributeTypes provided are invalid in some way.

newInstance

public static FeatureTypeFactory newInstance(String name)
                                      throws FactoryRegistryException
Deprecated. 
Create a new FeatureTypeFactory with the given typeName.

Parameters:
name - The typeName of the feature to create.
Returns:
A new FeatureTypeFactory instance.
Throws:
FactoryRegistryException - If there exists a configuration error.

createTemplate

public static FeatureTypeFactory createTemplate(FeatureType original)
                                         throws FactoryRegistryException
Deprecated. 
Create a FeatureTypeFactory which contains all of the AttributeTypes from the given FeatureType. This is simply a convenience method for
 FeatureTypeFactory factory = FeatureTypeFactory.newInstace();
 factory.importType(yourTypeHere);
 factory.setName(original.getName());
 factory.setNamespace(original.getNamespace());
 factory.setNillable(original.isNillable());
 factory.setDefaultGeometry(original.getDefaultGeometry());
 

Parameters:
original - The FeatureType to obtain information from.
Returns:
A new FeatureTypeFactory which is initialized with the state of the original FeatureType.
Throws:
FactoryRegistryException - If a FeatureTypeFactory cannot be found.

toString

public String toString()
Deprecated. 
Returns a string representation of this factory.

Overrides:
toString in class FeatureTypeBuilder
Returns:
The string representing this factory.


Copyright © 1996-2009 Geotools. All Rights Reserved.