Class TemplateLib

java.lang.Object
org.apache.jena.sparql.modify.TemplateLib

public class TemplateLib extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Iterator<Quad>
    calcQuads(List<Quad> quads, Iterator<Binding> bindings)
    Substitute into quad patterns
    static Iterator<org.apache.jena.graph.Triple>
    calcTriples(List<org.apache.jena.graph.Triple> triples, Iterator<Binding> bindings)
    Substitute into triple patterns
    static List<Quad>
    remapDefaultGraph(List<Quad> quads, org.apache.jena.graph.Node dftGraph)
    Map quads to a different graph if they are in the default graph.
    static org.apache.jena.graph.Triple
    subst(org.apache.jena.graph.Triple triple, Binding b, Map<org.apache.jena.graph.Node,org.apache.jena.graph.Node> bNodeMap)
    Substitute into a triple, with rewriting of bNodes
    static Quad
    subst(Quad quad, Binding b, Map<org.apache.jena.graph.Node,org.apache.jena.graph.Node> bNodeMap)
    Substitute into a quad, with rewriting of bNodes
    static Iterator<Quad>
    template(List<Quad> quads, org.apache.jena.graph.Node dftGraph, Iterator<Binding> bindings)
    Take a template, as a list of quad patterns, a default graph, and an iterator of bindings, and produce an iterator of quads that results from applying the template to the bindings.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TemplateLib

      public TemplateLib()
  • Method Details

    • template

      public static Iterator<Quad> template(List<Quad> quads, org.apache.jena.graph.Node dftGraph, Iterator<Binding> bindings)
      Take a template, as a list of quad patterns, a default graph, and an iterator of bindings, and produce an iterator of quads that results from applying the template to the bindings.
    • remapDefaultGraph

      public static List<Quad> remapDefaultGraph(List<Quad> quads, org.apache.jena.graph.Node dftGraph)
      Map quads to a different graph if they are in the default graph.
    • calcTriples

      public static Iterator<org.apache.jena.graph.Triple> calcTriples(List<org.apache.jena.graph.Triple> triples, Iterator<Binding> bindings)
      Substitute into triple patterns
    • calcQuads

      public static Iterator<Quad> calcQuads(List<Quad> quads, Iterator<Binding> bindings)
      Substitute into quad patterns
    • subst

      public static Quad subst(Quad quad, Binding b, Map<org.apache.jena.graph.Node,org.apache.jena.graph.Node> bNodeMap)
      Substitute into a quad, with rewriting of bNodes
    • subst

      public static org.apache.jena.graph.Triple subst(org.apache.jena.graph.Triple triple, Binding b, Map<org.apache.jena.graph.Node,org.apache.jena.graph.Node> bNodeMap)
      Substitute into a triple, with rewriting of bNodes