org.geotools.feature.visitor
Class UniqueVisitor
java.lang.Object
org.geotools.feature.visitor.UniqueVisitor
- All Implemented Interfaces:
- FeatureCalc, org.opengis.feature.FeatureVisitor
public class UniqueVisitor
- extends java.lang.Object
- implements FeatureCalc
Generates a list of unique values from a collection
- Since:
- 2.2.M2
- Author:
- Cory Horner, Refractions
Constructor Summary |
UniqueVisitor(org.opengis.filter.expression.Expression expr)
|
UniqueVisitor(int attributeTypeIndex,
org.opengis.feature.simple.SimpleFeatureType type)
|
UniqueVisitor(java.lang.String attributeTypeName)
|
UniqueVisitor(java.lang.String attrName,
org.opengis.feature.simple.SimpleFeatureType type)
|
Method Summary |
org.opengis.filter.expression.Expression |
getExpression()
|
CalcResult |
getResult()
Returns the result of the calculation as a handy object which can be merged and modified. |
java.util.Set |
getUnique()
|
void |
init(FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> collection)
|
void |
reset()
|
void |
setValue(java.lang.Object newSet)
|
void |
visit(org.opengis.feature.Feature feature)
|
void |
visit(org.opengis.feature.simple.SimpleFeature feature)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UniqueVisitor
public UniqueVisitor(java.lang.String attributeTypeName)
UniqueVisitor
public UniqueVisitor(int attributeTypeIndex,
org.opengis.feature.simple.SimpleFeatureType type)
throws IllegalFilterException
- Throws:
IllegalFilterException
UniqueVisitor
public UniqueVisitor(java.lang.String attrName,
org.opengis.feature.simple.SimpleFeatureType type)
throws IllegalFilterException
- Throws:
IllegalFilterException
UniqueVisitor
public UniqueVisitor(org.opengis.filter.expression.Expression expr)
init
public void init(FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> collection)
visit
public void visit(org.opengis.feature.simple.SimpleFeature feature)
visit
public void visit(org.opengis.feature.Feature feature)
- Specified by:
visit
in interface org.opengis.feature.FeatureVisitor
getExpression
public org.opengis.filter.expression.Expression getExpression()
getUnique
public java.util.Set getUnique()
setValue
public void setValue(java.lang.Object newSet)
reset
public void reset()
getResult
public CalcResult getResult()
- Description copied from interface:
FeatureCalc
- Returns the result of the calculation as a handy object which can be merged and modified.
- Specified by:
getResult
in interface FeatureCalc
- Returns:
- the results of the calculation
Copyright © 1996-2010 Geotools. All Rights Reserved.