org.geotools.feature
Class DefaultFeatureTypeFactory

java.lang.Object
  extended byorg.geotools.feature.FeatureTypes
      extended byorg.geotools.feature.FeatureTypeBuilder
          extended byorg.geotools.feature.FeatureTypeFactory
              extended byorg.geotools.feature.DefaultFeatureTypeFactory
All Implemented Interfaces:
Factory

public class DefaultFeatureTypeFactory
extends FeatureTypeFactory

A simple DefaultFeatureTypeFactory which stores its Attributes in a list. Oppurtunistic reuse is easy! Simply subclass this and override the method createFeatureType to return whatever type of FeatureType you want.

Version:
$Id: DefaultFeatureTypeFactory.java 17701 2006-01-23 00:00:51Z desruisseaux $
Author:
Ian Schneider, USDA-ARS

Field Summary
 
Fields inherited from class org.geotools.feature.FeatureTypes
ANY_LENGTH
 
Constructor Summary
DefaultFeatureTypeFactory()
           
 
Method Summary
protected  void add(AttributeType type)
          DOCUMENT ME!
protected  void add(int idx, AttributeType type)
          DOCUMENT ME!
protected  FeatureType createAbstractType()
           
protected  FeatureType createFeatureType()
          DOCUMENT ME!
 AttributeType get(int idx)
          DOCUMENT ME!
 int getAttributeCount()
          DOCUMENT ME!
protected  AttributeType remove(AttributeType type)
          DOCUMENT ME!
protected  AttributeType remove(int idx)
          DOCUMENT ME!
protected  AttributeType set(int idx, AttributeType type)
          DOCUMENT ME!
 
Methods inherited from class org.geotools.feature.FeatureTypeFactory
createTemplate, newFeatureType, newFeatureType, newFeatureType, newFeatureType, newFeatureType, newFeatureType, newInstance, toString
 
Methods inherited from class org.geotools.feature.FeatureTypeBuilder
addBaseTypes, addType, addType, addTypes, check, contains, getBuiltinTypes, getDefaultGeometry, getFeatureType, getImplementationHints, getName, getNamespace, getSuperTypes, importType, importType, isAbstract, removeAll, removeType, removeType, 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

DefaultFeatureTypeFactory

public DefaultFeatureTypeFactory()
Method Detail

add

protected void add(AttributeType type)
            throws java.lang.IllegalArgumentException
Description copied from class: FeatureTypeBuilder
DOCUMENT ME!

Specified by:
add in class FeatureTypeBuilder
Parameters:
type -
Throws:
java.lang.IllegalArgumentException

add

protected void add(int idx,
                   AttributeType type)
            throws java.lang.ArrayIndexOutOfBoundsException,
                   java.lang.IllegalArgumentException
Description copied from class: FeatureTypeBuilder
DOCUMENT ME!

Specified by:
add in class FeatureTypeBuilder
Parameters:
idx -
type -
Throws:
java.lang.ArrayIndexOutOfBoundsException
java.lang.IllegalArgumentException

createFeatureType

protected FeatureType createFeatureType()
                                 throws SchemaException
Description copied from class: FeatureTypeBuilder
DOCUMENT ME!

Specified by:
createFeatureType in class FeatureTypeBuilder
Returns:
Throws:
SchemaException

get

public AttributeType get(int idx)
                  throws java.lang.ArrayIndexOutOfBoundsException
Description copied from class: FeatureTypeBuilder
DOCUMENT ME!

Specified by:
get in class FeatureTypeBuilder
Parameters:
idx -
Returns:
Throws:
java.lang.ArrayIndexOutOfBoundsException

getAttributeCount

public int getAttributeCount()
Description copied from class: FeatureTypeBuilder
DOCUMENT ME!

Specified by:
getAttributeCount in class FeatureTypeBuilder
Returns:

remove

protected AttributeType remove(int idx)
                        throws java.lang.ArrayIndexOutOfBoundsException
Description copied from class: FeatureTypeBuilder
DOCUMENT ME!

Specified by:
remove in class FeatureTypeBuilder
Parameters:
idx -
Returns:
Throws:
java.lang.ArrayIndexOutOfBoundsException

remove

protected AttributeType remove(AttributeType type)
Description copied from class: FeatureTypeBuilder
DOCUMENT ME!

Specified by:
remove in class FeatureTypeBuilder
Parameters:
type -
Returns:

set

protected AttributeType set(int idx,
                            AttributeType type)
                     throws java.lang.ArrayIndexOutOfBoundsException,
                            java.lang.IllegalArgumentException
Description copied from class: FeatureTypeBuilder
DOCUMENT ME!

Specified by:
set in class FeatureTypeBuilder
Parameters:
idx -
type -
Returns:
Throws:
java.lang.ArrayIndexOutOfBoundsException
java.lang.IllegalArgumentException

createAbstractType

protected FeatureType createAbstractType()
                                  throws SchemaException
Throws:
SchemaException


Copyright © GeoTools. All Rights Reserved.