org.geotools.filter
Class FilterAttributeExtractor

java.lang.Object
  extended by org.geotools.filter.visitor.DefaultFilterVisitor
      extended by org.geotools.filter.FilterAttributeExtractor
All Implemented Interfaces:
org.opengis.filter.expression.ExpressionVisitor, org.opengis.filter.FilterVisitor
Direct Known Subclasses:
MetaBufferEstimator, StyleAttributeExtractor

public class FilterAttributeExtractor
extends DefaultFilterVisitor

A simple visitor that extracts every attribute used by a filter or an expression

Author:
wolf

Field Summary
protected  java.util.Set<java.lang.String> attributeNames
          Last set visited
protected  org.opengis.feature.simple.SimpleFeatureType featureType
          feature type to evaluate against
 
Constructor Summary
FilterAttributeExtractor()
          Just extract the property names; don't check against a feature type.
FilterAttributeExtractor(org.opengis.feature.simple.SimpleFeatureType featureType)
          Use the provided feature type as a sanity check when extracting property names.
 
Method Summary
 void clear()
          Resets the attributes found so that a new attribute search can be performed
 java.lang.String[] getAttributeNames()
          DOCUMENT ME!
 java.util.Set<java.lang.String> getAttributeNameSet()
          DOCUMENT ME!
 java.lang.Object visit(org.opengis.filter.expression.PropertyName expression, java.lang.Object data)
           
 
Methods inherited from class org.geotools.filter.visitor.DefaultFilterVisitor
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitNullFilter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

attributeNames

protected java.util.Set<java.lang.String> attributeNames
Last set visited


featureType

protected org.opengis.feature.simple.SimpleFeatureType featureType
feature type to evaluate against

Constructor Detail

FilterAttributeExtractor

public FilterAttributeExtractor()
Just extract the property names; don't check against a feature type.


FilterAttributeExtractor

public FilterAttributeExtractor(org.opengis.feature.simple.SimpleFeatureType featureType)
Use the provided feature type as a sanity check when extracting property names.

Parameters:
featureType -
Method Detail

getAttributeNameSet

public java.util.Set<java.lang.String> getAttributeNameSet()
DOCUMENT ME!

Returns:
an unmofiable set of the attribute names found so far during the visit

getAttributeNames

public java.lang.String[] getAttributeNames()
DOCUMENT ME!

Returns:
an array of the attribute names found so far during the visit

clear

public void clear()
Resets the attributes found so that a new attribute search can be performed


visit

public java.lang.Object visit(org.opengis.filter.expression.PropertyName expression,
                              java.lang.Object data)
Specified by:
visit in interface org.opengis.filter.expression.ExpressionVisitor
Overrides:
visit in class DefaultFilterVisitor


Copyright © 1996-2010 Geotools. All Rights Reserved.