org.geotools.feature
Class FeatureTypeFactory

java.lang.Object
  extended byorg.geotools.feature.FeatureTypes
      extended byorg.geotools.feature.FeatureTypeBuilder
          extended byorg.geotools.feature.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.

Version:
$Id: FeatureTypeFactory.java 17701 2006-01-23 00:00:51Z desruisseaux $
Author:
Ian Schneider

Field Summary
 
Fields inherited from class org.geotools.feature.FeatureTypes
ANY_LENGTH
 
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, java.lang.String name)
          Deprecated. Create a new FeatureType with the given AttributeTypes.
static FeatureType newFeatureType(AttributeType[] types, java.lang.String name, java.net.URI ns)
          Deprecated. Create a new FeatureType with the given AttributeTypes.
static FeatureType newFeatureType(AttributeType[] types, java.lang.String name, java.net.URI ns, boolean isAbstract)
          Deprecated. Create a new FeatureType with the given AttributeTypes.
static FeatureType newFeatureType(AttributeType[] types, java.lang.String name, java.net.URI ns, boolean isAbstract, FeatureType[] superTypes)
          Deprecated. The most specific way to create a new FeatureType.
static FeatureType newFeatureType(AttributeType[] types, java.lang.String name, java.net.URI ns, boolean isAbstract, FeatureType[] superTypes, AttributeType defaultGeometry)
          Deprecated. The most specific way to create a new FeatureType.
static FeatureType newFeatureType(AttributeType[] types, java.lang.String name, java.net.URI ns, boolean isAbstract, FeatureType[] superTypes, GeometryAttributeType defaultGeometry)
          Deprecated. The most specific way to create a new FeatureType.
static FeatureTypeFactory newInstance(java.lang.String name)
          Deprecated. Create a new FeatureTypeFactory with the given typeName.
 java.lang.String toString()
          Deprecated. Returns a string representation of this factory.
 
Methods inherited from class org.geotools.feature.FeatureTypeBuilder
add, add, addBaseTypes, addType, addType, addTypes, check, contains, createFeatureType, get, getAttributeCount, getBuiltinTypes, 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 org.geotools.feature.FeatureTypes
ancestors, equals, equals, equals, equalsAncestors, equalsId, getFieldLength, isDecendedFrom, isDecendedFrom, transform, transform
 
Methods inherited from class java.lang.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,
                                         java.lang.String name,
                                         java.net.URI ns,
                                         boolean isAbstract,
                                         FeatureType[] superTypes)
                                  throws FactoryConfigurationError,
                                         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:
FactoryConfigurationError - If there are problems creating a factory.
SchemaException - If the AttributeTypes provided are invalid in some way.

newFeatureType

public static FeatureType newFeatureType(AttributeType[] types,
                                         java.lang.String name,
                                         java.net.URI ns,
                                         boolean isAbstract,
                                         FeatureType[] superTypes,
                                         AttributeType defaultGeometry)
                                  throws FactoryConfigurationError,
                                         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:
FactoryConfigurationError - If there are problems creating a factory.
SchemaException - If the AttributeTypes provided are invalid in some way.

newFeatureType

public static FeatureType newFeatureType(AttributeType[] types,
                                         java.lang.String name,
                                         java.net.URI ns,
                                         boolean isAbstract,
                                         FeatureType[] superTypes,
                                         GeometryAttributeType defaultGeometry)
                                  throws FactoryConfigurationError,
                                         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:
FactoryConfigurationError - If there are problems creating a factory.
SchemaException - If the AttributeTypes provided are invalid in some way.

newFeatureType

public static FeatureType newFeatureType(AttributeType[] types,
                                         java.lang.String name,
                                         java.net.URI ns,
                                         boolean isAbstract)
                                  throws FactoryConfigurationError,
                                         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:
FactoryConfigurationError - If there are problems creating a factory.
SchemaException - If the AttributeTypes provided are invalid in some way.

newFeatureType

public static FeatureType newFeatureType(AttributeType[] types,
                                         java.lang.String name,
                                         java.net.URI ns)
                                  throws FactoryConfigurationError,
                                         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:
FactoryConfigurationError - If there are problems creating a factory.
SchemaException - If the AttributeTypes provided are invalid in some way.

newFeatureType

public static FeatureType newFeatureType(AttributeType[] types,
                                         java.lang.String name)
                                  throws FactoryConfigurationError,
                                         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:
FactoryConfigurationError - If there are problems creating a factory.
SchemaException - If the AttributeTypes provided are invalid in some way.

newInstance

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

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

createTemplate

public static FeatureTypeFactory createTemplate(FeatureType original)
                                         throws FactoryConfigurationError
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:
FactoryConfigurationError - If a FeatureTypeFactory cannot be found.

toString

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

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


Copyright © GeoTools. All Rights Reserved.