org.geotools.filter
Class FilterAttributeExtractor

Object
  extended by DefaultFilterVisitor
      extended by FilterAttributeExtractor
All Implemented Interfaces:
ExpressionVisitor, 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
Module:

Field Summary
protected  Set attributeNames
          Last set visited
protected  SimpleFeatureType featureType
          feature type to evaluate against
 
Constructor Summary
FilterAttributeExtractor()
          Just extract the property names; don't check against a feature type.
FilterAttributeExtractor(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
 String[] getAttributeNames()
          DOCUMENT ME!
 Set getAttributeNameSet()
          DOCUMENT ME!
 Object visit(PropertyName expression, Object data)
           
 
Methods inherited from class 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 Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

attributeNames

protected Set attributeNames
Last set visited


featureType

protected 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(SimpleFeatureType featureType)
Use the provided feature type as a sanity check when extracting property names.

Parameters:
featureType -
Method Detail

getAttributeNameSet

public Set getAttributeNameSet()
DOCUMENT ME!

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

getAttributeNames

public 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 Object visit(PropertyName expression,
                    Object data)
Specified by:
visit in interface ExpressionVisitor
Overrides:
visit in class DefaultFilterVisitor


Copyright © 1996-2009 Geotools. All Rights Reserved.