Class SPARQLSubstitutions
java.lang.Object
org.topbraid.shacl.validation.sparql.SPARQLSubstitutions
Collects various helper algorithms currently used by the SPARQL execution language.
- Author:
- Holger Knublauch
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddMessageVarNames(String labelTemplate, Set<String> results) static org.apache.jena.query.QueryExecutioncreateQueryExecution(org.apache.jena.query.Query query, org.apache.jena.query.Dataset dataset, org.apache.jena.query.QuerySolution bindings) static org.apache.jena.query.QuerysubstitutePaths(org.apache.jena.query.Query query, String pathString, org.apache.jena.rdf.model.Model model) static StringwithPrefixes(String str, org.apache.jena.rdf.model.Resource executable) Gets a parsable SPARQL string based on a fragment and prefix declarations.static org.apache.jena.rdf.model.LiteralwithSubstitutions(org.apache.jena.rdf.model.Literal template, org.apache.jena.query.QuerySolution bindings, Function<org.apache.jena.rdf.model.RDFNode, String> labelFunction)
-
Field Details
-
useGraphPrefixes
public static boolean useGraphPrefixes
-
-
Constructor Details
-
SPARQLSubstitutions
public SPARQLSubstitutions()
-
-
Method Details
-
addMessageVarNames
-
createQueryExecution
public static org.apache.jena.query.QueryExecution createQueryExecution(org.apache.jena.query.Query query, org.apache.jena.query.Dataset dataset, org.apache.jena.query.QuerySolution bindings) -
substitutePaths
public static org.apache.jena.query.Query substitutePaths(org.apache.jena.query.Query query, String pathString, org.apache.jena.rdf.model.Model model) -
withSubstitutions
-
withPrefixes
Gets a parsable SPARQL string based on a fragment and prefix declarations. Depending on the setting of the flag useGraphPrefixes, this either uses the prefixes from the Jena graph of the given executable, or strictly uses sh:prefixes.- Parameters:
str- the query fragment (e.g. starting with SELECT)executable- the sh:SPARQLExecutable potentially holding the sh:prefixes- Returns:
- the parsable SPARQL string
-