Class Substitute


public class Substitute extends Object
Substitution in SPARQL algebra.

See also QueryTransformOps and UpdateTransformOps which operate on SPARQL syntax.

inject(org.apache.jena.sparql.algebra.Op, org.apache.jena.sparql.engine.binding.Binding) provides the substitution, while leaving a variable present, used by LATERAL.

  • Constructor Details

    • Substitute

      public Substitute()
  • Method Details

    • inject

      public static Op inject(Op opInput, Binding binding)
      Inject takes an Op to transform using a {Binding binding}. The transformation assumes the Ope structure is legal for the operation. The transformation is to wrap each place a variable is used (BGP, GRAPH, Path and some equivalent operations) with a BIND to restrict the vartibale to a specific value while still retaining the variable (e.g for FILETERs).

           (?s :p 123)
           (?s :q ?a)
      with binding ?s = :x becomes
       (assign (?s :x)
            (:x :p 123)
            (:x :q ?a)
    • substitute

      public static Op substitute(Op op, Binding binding)
    • substitute

      public static Op substitute(Op op, Var var, org.apache.jena.graph.Node node)
    • substitute

      public static BasicPattern substitute(BasicPattern bgp, Binding binding)
    • substitute

      public static org.apache.jena.graph.Triple substitute(org.apache.jena.graph.Triple triple, Binding binding)
    • substitute

      public static TriplePath substitute(TriplePath triplePath, Binding binding)
    • substitute

      public static Quad substitute(Quad quad, Binding binding)
    • substitute

      public static org.apache.jena.graph.Node substitute(org.apache.jena.graph.Node n, Binding binding)
    • substitute

      public static PropFuncArg substitute(PropFuncArg propFuncArg, Binding binding)
    • substitute

      public static Expr substitute(Expr expr, Binding binding)
    • substitute

      public static ExprList substitute(ExprList exprList, Binding binding)