Class Templates


  • public class Templates
    extends Object
    Support for executing SHACL Query Templates, for now dash:SPARQLConstructTemplates and dash:SPARQLSelectTemplates. See http://datashapes.org/templates.html for background.
    Author:
    Holger Knublauch
    • Constructor Summary

      Constructors 
      Constructor Description
      Templates()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.apache.jena.rdf.model.Model construct​(org.apache.jena.rdf.model.Resource template, org.apache.jena.query.QuerySolutionMap bindings, org.apache.jena.query.Dataset dataset)
      Takes an instance of dash:SPARQLConstructTemplate and parameter bindings and returns a Model with the triples that result from the execution of all CONSTRUCT queries in the template using the given parameter bindings.
      static org.apache.jena.query.QueryExecution select​(org.apache.jena.rdf.model.Resource template, org.apache.jena.query.QuerySolutionMap bindings, org.apache.jena.query.Dataset dataset)
      Takes an instance of dash:SPARQLSelectTemplate and parameter bindings and returns a QueryExecution object for the sh:select query in the template using the given parameter bindings.
    • Constructor Detail

      • Templates

        public Templates()
    • Method Detail

      • construct

        public static org.apache.jena.rdf.model.Model construct​(org.apache.jena.rdf.model.Resource template,
                                                                org.apache.jena.query.QuerySolutionMap bindings,
                                                                org.apache.jena.query.Dataset dataset)
        Takes an instance of dash:SPARQLConstructTemplate and parameter bindings and returns a Model with the triples that result from the execution of all CONSTRUCT queries in the template using the given parameter bindings.
        Parameters:
        template - the template defining the sh:construct queries to run
        bindings - the initial bindings for the CONSTRUCT queries
        dataset - the Dataset to query over
        Returns:
        a Model with the constructed triples
      • select

        public static org.apache.jena.query.QueryExecution select​(org.apache.jena.rdf.model.Resource template,
                                                                  org.apache.jena.query.QuerySolutionMap bindings,
                                                                  org.apache.jena.query.Dataset dataset)
        Takes an instance of dash:SPARQLSelectTemplate and parameter bindings and returns a QueryExecution object for the sh:select query in the template using the given parameter bindings.
        Parameters:
        template - the template defining the sh:select query to run
        bindings - the initial bindings for the SELECT query
        dataset - the Dataset to query over
        Returns:
        a QueryExecution