Package org.topbraid.shacl.templates
Class Templates
java.lang.Object
org.topbraid.shacl.templates.Templates
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.jena.rdf.model.Modelconstruct(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.QueryExecutionselect(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 Details
-
Templates
public Templates()
-
-
Method Details
-
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 runbindings- the initial bindings for the CONSTRUCT queriesdataset- 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 runbindings- the initial bindings for the SELECT querydataset- the Dataset to query over- Returns:
- a QueryExecution
-