org.geotools.feature
Class FeatureBuilder<FT extends FeatureType,F extends Feature>

Object
  extended by FeatureBuilder<FT,F>
Type Parameters:
FT - The kind of FeatureType whose feature the builder will build. Allows you to enforce a stricter specialist type; eg. SimpleFeatureType.
F - The kind of Feature that the builder will build. Allows you to enforce a stricter specialist type; eg. SimpleFeature.
Direct Known Subclasses:
ComplexFeatureBuilder

public abstract class FeatureBuilder<FT extends FeatureType,F extends Feature>
extends Object

This class provides some common functionality for builders and defines an abstraction for Feature builders' public interfaces.

Author:
bro879

Field Summary
protected  FeatureFactory factory
          the feature factory
protected  FT featureType
          the feature type
 
Constructor Summary
protected FeatureBuilder(FT featureType, FeatureFactory factory)
           
 
Method Summary
abstract  F buildFeature(String id)
           
protected  Object convert(Object value, PropertyDescriptor descriptor)
           
static String createDefaultFeatureId()
          Internal method for creating feature id's when none is specified.
static FeatureIdImpl createDefaultFeatureIdentifier(String suggestedId)
          Internal method for a temporary FeatureId that can be assigned a real value after a commit.
 FT getFeatureType()
          Returns the feature type used by this builder as a feature template
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

featureType

protected FT extends FeatureType featureType
the feature type


factory

protected FeatureFactory factory
the feature factory

Constructor Detail

FeatureBuilder

protected FeatureBuilder(FT featureType,
                         FeatureFactory factory)
Method Detail

buildFeature

public abstract F buildFeature(String id)

getFeatureType

public FT getFeatureType()
Returns the feature type used by this builder as a feature template

Returns:

convert

protected Object convert(Object value,
                         PropertyDescriptor descriptor)

createDefaultFeatureId

public static String createDefaultFeatureId()
Internal method for creating feature id's when none is specified.


createDefaultFeatureIdentifier

public static FeatureIdImpl createDefaultFeatureIdentifier(String suggestedId)
Internal method for a temporary FeatureId that can be assigned a real value after a commit.

Parameters:
suggestedId - suggested id


Copyright © 1996-2014 Geotools. All Rights Reserved.