Class TemplateLib


  • public class TemplateLib
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      TemplateLib()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Iterator<Quad> calcQuads​(java.util.List<Quad> quads, java.util.Iterator<Binding> bindings)
      Substitute into quad patterns
      static java.util.Iterator<Triple> calcTriples​(java.util.List<Triple> triples, java.util.Iterator<Binding> bindings)
      Substitute into triple patterns
      static java.util.List<Quad> remapDefaultGraph​(java.util.List<Quad> quads, Node dftGraph)
      Map quads to a different graph if they are in the default graph.
      static Triple subst​(Triple triple, Binding b, java.util.Map<Node,​Node> bNodeMap)
      Substitute into a triple, with rewriting of bNodes
      static Quad subst​(Quad quad, Binding b, java.util.Map<Node,​Node> bNodeMap)
      Substitute into a quad, with rewriting of bNodes
      static java.util.Iterator<Quad> template​(java.util.List<Quad> quads, Node dftGraph, java.util.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 Detail

      • TemplateLib

        public TemplateLib()
    • Method Detail

      • template

        public static java.util.Iterator<Quad> template​(java.util.List<Quad> quads,
                                                        Node dftGraph,
                                                        java.util.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 java.util.List<Quad> remapDefaultGraph​(java.util.List<Quad> quads,
                                                             Node dftGraph)
        Map quads to a different graph if they are in the default graph.
      • calcTriples

        public static java.util.Iterator<Triple> calcTriples​(java.util.List<Triple> triples,
                                                             java.util.Iterator<Binding> bindings)
        Substitute into triple patterns
      • calcQuads

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

        public static Quad subst​(Quad quad,
                                 Binding b,
                                 java.util.Map<Node,​Node> bNodeMap)
        Substitute into a quad, with rewriting of bNodes
      • subst

        public static Triple subst​(Triple triple,
                                   Binding b,
                                   java.util.Map<Node,​Node> bNodeMap)
        Substitute into a triple, with rewriting of bNodes