org.geotools.data.store
Class ReTypingIterator

Object
  extended by ReTypingIterator
All Implemented Interfaces:
Iterator

public class ReTypingIterator
extends Object
implements Iterator

Iterator wrapper which re-types features on the fly based on a target feature type.

Author:
Justin Deoliveira, The Open Planning Project
Module:
modules/library/main (gt-main.jar)

Constructor Summary
ReTypingIterator(Iterator delegate, SimpleFeatureType source, SimpleFeatureType target)
           
 
Method Summary
 Iterator getDelegate()
           
 boolean hasNext()
           
 Object next()
           
 void remove()
           
protected  AttributeDescriptor[] typeAttributes(SimpleFeatureType original, SimpleFeatureType target)
          Supplies mapping from origional to target FeatureType.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReTypingIterator

public ReTypingIterator(Iterator delegate,
                        SimpleFeatureType source,
                        SimpleFeatureType target)
Method Detail

getDelegate

public Iterator getDelegate()

remove

public void remove()
Specified by:
remove in interface Iterator

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator

next

public Object next()
Specified by:
next in interface Iterator

typeAttributes

protected AttributeDescriptor[] typeAttributes(SimpleFeatureType original,
                                               SimpleFeatureType target)
Supplies mapping from origional to target FeatureType.

Will also ensure that origional can cover target

Parameters:
target - Desired FeatureType
origional - Origional FeatureType
Returns:
Mapping from originoal to target FeatureType
Throws:
IllegalArgumentException - if unable to provide a mapping


Copyright © 1996-2010 Geotools. All Rights Reserved.