use of org.apache.jena.sparql.graph.NodeTransform in project jena by apache.
the class QueryTransformOps method transform.
/** Transform a query based on a mapping from {@link Var} variable to replacement {@link Node}. */
public static Query transform(Query query, Map<Var, ? extends Node> substitutions) {
ElementTransform eltrans = new ElementTransformSubst(substitutions);
NodeTransform nodeTransform = new NodeTransformSubst(substitutions);
ExprTransform exprTrans = new ExprTransformNodeElement(nodeTransform, eltrans);
return transform(query, eltrans, exprTrans);
}
use of org.apache.jena.sparql.graph.NodeTransform in project jena by apache.
the class UpdateTransformOps method transform.
/** Transform an {@link Update} based on a mapping from {@link Var} variable to replacement {@link Node}. */
public static Update transform(Update update, Map<Var, Node> substitutions) {
ElementTransform eltrans = new ElementTransformSubst(substitutions);
NodeTransform nodeTransform = new NodeTransformSubst(substitutions);
ExprTransform exprTrans = new ExprTransformNodeElement(nodeTransform, eltrans);
return transform(update, eltrans, exprTrans);
}
use of org.apache.jena.sparql.graph.NodeTransform in project jena by apache.
the class UpdateTransformOps method transform.
/** Transform an {@link UpdateRequest} based on a mapping from {@link Var} variable to replacement {@link Node}. */
public static UpdateRequest transform(UpdateRequest update, Map<Var, Node> substitutions) {
ElementTransform eltrans = new ElementTransformSubst(substitutions);
NodeTransform nodeTransform = new NodeTransformSubst(substitutions);
ExprTransform exprTrans = new ExprTransformNodeElement(nodeTransform, eltrans);
return transform(update, eltrans, exprTrans);
}
Aggregations