org.geotools.data.store
Class ReTypingIterator
java.lang.Object
org.geotools.data.store.ReTypingIterator
- All Implemented Interfaces:
- java.util.Iterator
public class ReTypingIterator
- extends java.lang.Object
- implements java.util.Iterator
Iterator wrapper which re-types features on the fly based on a target
feature type.
- Author:
- Justin Deoliveira, The Open Planning Project
Constructor Summary |
ReTypingIterator(java.util.Iterator delegate,
org.opengis.feature.simple.SimpleFeatureType source,
org.opengis.feature.simple.SimpleFeatureType target)
|
Method Summary |
java.util.Iterator |
getDelegate()
|
boolean |
hasNext()
|
java.lang.Object |
next()
|
void |
remove()
|
protected org.opengis.feature.type.AttributeDescriptor[] |
typeAttributes(org.opengis.feature.simple.SimpleFeatureType original,
org.opengis.feature.simple.SimpleFeatureType target)
Supplies mapping from origional to target FeatureType. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReTypingIterator
public ReTypingIterator(java.util.Iterator delegate,
org.opengis.feature.simple.SimpleFeatureType source,
org.opengis.feature.simple.SimpleFeatureType target)
getDelegate
public java.util.Iterator getDelegate()
remove
public void remove()
- Specified by:
remove
in interface java.util.Iterator
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface java.util.Iterator
next
public java.lang.Object next()
- Specified by:
next
in interface java.util.Iterator
typeAttributes
protected org.opengis.feature.type.AttributeDescriptor[] typeAttributes(org.opengis.feature.simple.SimpleFeatureType original,
org.opengis.feature.simple.SimpleFeatureType target)
- Supplies mapping from origional to target FeatureType.
Will also ensure that origional can cover target
- Parameters:
target
- Desired FeatureTypeorigional
- Origional FeatureType
- Returns:
- Mapping from originoal to target FeatureType
- Throws:
java.lang.IllegalArgumentException
- if unable to provide a mapping
Copyright © 1996-2010 Geotools. All Rights Reserved.