com.hp.hpl.jena.sparql.expr
Class ExprTransformSubstitute

java.lang.Object
  extended by com.hp.hpl.jena.sparql.expr.ExprTransformCopy
      extended by 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


Field Summary
 
Fields inherited from class com.hp.hpl.jena.sparql.expr.ExprTransformCopy
COPY_ALWAYS, COPY_ONLY_ON_CHANGE
 
Constructor Summary
ExprTransformSubstitute(Map<String,Expr> substitutions)
          Creates an advanced transform that uses the given map to make substitutions
ExprTransformSubstitute(Var find, Expr replace)
          Creates a simple transform that replaces any occurrence of the given variable with the given expression
 
Method Summary
 Expr transform(ExprVar exprVar)
           
 
Methods inherited from class com.hp.hpl.jena.sparql.expr.ExprTransformCopy
transform, transform, transform, transform, transform, transform, transform, transform
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 find
replace - 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
Method Detail

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