org.geotools.filter.visitor
Class DefaultExpressionVisitor
Object
DefaultExpressionVisitor
- All Implemented Interfaces:
- ExpressionVisitor
public abstract class DefaultExpressionVisitor
- extends Object
- implements ExpressionVisitor
Abstract implementation of ExpressionVisitor that simply walks the data structure.
This class implements the full ExpressionVisitor interface and will visit every Filter member
of an Expression object. This class performs no actions and is not intended to be used directly,
instead
extend it and overide the methods for the Expression type you are interested in. Remember to call the
super method if you want to ensure that the entire expression tree is still visited.
FilterVisitor allProperties = new DefaultExpressionVisitor(){
public Object visit( PropertyName expr, Object data ) {
Set set = (Set) data;
set.addAll(expr.getPropertyName());
return set;
}
};
Set set = (Set) allProperties.accept(allFids, new HashSet());
- Author:
- Jody
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultExpressionVisitor
public DefaultExpressionVisitor()
visit
public Object visit(NilExpression expression,
Object data)
- Description copied from interface:
ExpressionVisitor
- Used to visit a Expression.NIL, also called for
null
where an
expression is expected.
This is particularly useful when doing data transformations, as an example when
using a StyleSymbolizer Expression.NIL can be used to represent the default
stroke color.
- Specified by:
visit
in interface ExpressionVisitor
- Returns:
- implementation specific
visit
public Object visit(Add expression,
Object data)
- Specified by:
visit
in interface ExpressionVisitor
visit
public Object visit(Divide expression,
Object data)
- Specified by:
visit
in interface ExpressionVisitor
visit
public Object visit(Function expression,
Object data)
- Specified by:
visit
in interface ExpressionVisitor
visit
public Object visit(Literal expression,
Object data)
- Specified by:
visit
in interface ExpressionVisitor
visit
public Object visit(Multiply expression,
Object data)
- Specified by:
visit
in interface ExpressionVisitor
visit
public Object visit(PropertyName expression,
Object data)
- Specified by:
visit
in interface ExpressionVisitor
visit
public Object visit(Subtract expression,
Object data)
- Specified by:
visit
in interface ExpressionVisitor
Copyright © 1996-2014 Geotools. All Rights Reserved.