Package org.geotools.appschema.jdbc
Class NamespaceAwareAttributeRenameVisitor
- Object
-
- DuplicatingFilterVisitor
-
- NamespaceAwareAttributeRenameVisitor
-
- All Implemented Interfaces:
ExpressionVisitor
,FilterVisitor
public class NamespaceAwareAttributeRenameVisitor extends DuplicatingFilterVisitor
Renames the specified attribute to a new target name, preserving the namespace context.- Author:
- Stefano Costa, GeoSolutions
-
-
Field Summary
-
Fields inherited from class DuplicatingFilterVisitor
ff
-
-
Constructor Summary
Constructors Constructor Description NamespaceAwareAttributeRenameVisitor(String sourceProperty, String targetProperty)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
visit(PropertyName expression, Object extraData)
Creates a copy of the inputPropertyName
expression with renamed attributes.Expression
visit(NestedAttributeExpression expression, Object extraData)
Creates a copy of the inputNestedAttributeExpression
with renamed attributes.-
Methods inherited from class DuplicatingFilterVisitor
getFactory, 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, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitNullFilter
-
-
-
-
Method Detail
-
visit
public Expression visit(NestedAttributeExpression expression, Object extraData)
Creates a copy of the inputNestedAttributeExpression
with renamed attributes.- Parameters:
expression
- the expression to visitextraData
- if an instance ofFilterFactory
is passed, it is used to build the returned expression- Returns:
- a new
NestedAttributeExpression
expression with renamed attributes
-
visit
public Object visit(PropertyName expression, Object extraData)
Creates a copy of the inputPropertyName
expression with renamed attributes.- Specified by:
visit
in interfaceExpressionVisitor
- Overrides:
visit
in classDuplicatingFilterVisitor
- Parameters:
expression
- the expression to visitextraData
- if an instance ofFilterFactory
is passed, it is used to build the returned expression- Returns:
- a new
PropertyName
expression with renamed attributes
-
-