com.hp.hpl.jena.sparql.expr
Class ExprTransformSubstitute
java.lang.Object
com.hp.hpl.jena.sparql.expr.ExprTransformCopy
com.hp.hpl.jena.sparql.expr.ExprTransformSubstitute
- All Implemented Interfaces:
- ExprTransform
public class ExprTransformSubstitute
- extends ExprTransformCopy
An expression transformer that substitutes another expression in place of variables
Primarily introduced in order to support the new UserDefinedFunction capabilities
ExprTransformSubstitute
public ExprTransformSubstitute(Var find,
Expr replace)
- Creates a simple transform that replaces any occurrence of the given variable with the given expression
- Parameters:
find - Variable to findreplace - Expression to replace with
ExprTransformSubstitute
public ExprTransformSubstitute(Map<String,Expr> substitutions)
- Creates an advanced transform that uses the given map to make substitutions
- Parameters:
substitutions - Substitutions from variables to expressions
transform
public Expr transform(ExprVar exprVar)
- Specified by:
transform in interface ExprTransform- Overrides:
transform in class ExprTransformCopy
Licenced under the Apache License, Version 2.0