Search in sources :

Example 1 with NodeTransform

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);
}
Also used : NodeTransform(org.apache.jena.sparql.graph.NodeTransform) ExprTransform(org.apache.jena.sparql.expr.ExprTransform)

Example 2 with NodeTransform

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);
}
Also used : NodeTransform(org.apache.jena.sparql.graph.NodeTransform) ExprTransform(org.apache.jena.sparql.expr.ExprTransform)

Example 3 with NodeTransform

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);
}
Also used : NodeTransform(org.apache.jena.sparql.graph.NodeTransform) ExprTransform(org.apache.jena.sparql.expr.ExprTransform)

Aggregations

ExprTransform (org.apache.jena.sparql.expr.ExprTransform)3 NodeTransform (org.apache.jena.sparql.graph.NodeTransform)3