Package org.topbraid.shacl.arq.functions
Class SHACLSPARQLARQFunction
- java.lang.Object
-
- org.topbraid.shacl.arq.SHACLARQFunction
-
- org.topbraid.shacl.arq.functions.SHACLSPARQLARQFunction
-
- All Implemented Interfaces:
org.apache.jena.sparql.function.Function,org.apache.jena.sparql.function.FunctionFactory,DeclarativeFunctionFactory,OptionalArgsFunction
public class SHACLSPARQLARQFunction extends SHACLARQFunction
An ARQ function that is based on a sh:SPARQLFunction. There are two ways of declaring such functions: - as sh:Function (similar to SPIN functions) - from constraint components that point at sh:SPARQLAskValidators This class has two constructors for those two cases.- Author:
- Holger Knublauch
-
-
Field Summary
-
Fields inherited from class org.topbraid.shacl.arq.SHACLARQFunction
paramNames
-
-
Constructor Summary
Constructors Constructor Description SHACLSPARQLARQFunction(SHConstraintComponent component, org.apache.jena.rdf.model.Resource askValidator)Constructs a new SHACLSPARQLARQFunction based on a given sh:ConstraintComponent and a given validator (which must be a value of sh:nodeValidator, sh:propertyValidator etc.SHACLSPARQLARQFunction(SHSPARQLFunction shaclFunction)Constructs a new SHACLSPARQLARQFunction based on a given sh:Function.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuild(String uri, org.apache.jena.sparql.expr.ExprList args)org.apache.jena.sparql.function.Functioncreate(String uri)org.apache.jena.sparql.expr.NodeValueexecuteBody(org.apache.jena.query.Dataset dataset, org.apache.jena.rdf.model.Model defaultModel, org.apache.jena.query.QuerySolution bindings)org.apache.jena.query.QuerygetBodyQuery()Gets the Jena Query object for execution.protected StringgetQueryString()-
Methods inherited from class org.topbraid.shacl.arq.SHACLARQFunction
addParameters, exec, getParamNames, getSHACLFunction, isOptionalArg
-
-
-
-
Constructor Detail
-
SHACLSPARQLARQFunction
public SHACLSPARQLARQFunction(SHConstraintComponent component, org.apache.jena.rdf.model.Resource askValidator)
Constructs a new SHACLSPARQLARQFunction based on a given sh:ConstraintComponent and a given validator (which must be a value of sh:nodeValidator, sh:propertyValidator etc.- Parameters:
component- the constraint component (defining the sh:parameters)askValidator- the sh:SPARQLAskValidator resource
-
SHACLSPARQLARQFunction
public SHACLSPARQLARQFunction(SHSPARQLFunction shaclFunction)
Constructs a new SHACLSPARQLARQFunction based on a given sh:Function. The shaclFunction must be associated with the Model containing the triples of its definition.- Parameters:
shaclFunction- the SHACL function
-
-
Method Detail
-
build
public void build(String uri, org.apache.jena.sparql.expr.ExprList args)
- Specified by:
buildin interfaceorg.apache.jena.sparql.function.Function- Overrides:
buildin classSHACLARQFunction
-
create
public org.apache.jena.sparql.function.Function create(String uri)
- Specified by:
createin interfaceorg.apache.jena.sparql.function.FunctionFactory- Overrides:
createin classSHACLARQFunction
-
executeBody
public org.apache.jena.sparql.expr.NodeValue executeBody(org.apache.jena.query.Dataset dataset, org.apache.jena.rdf.model.Model defaultModel, org.apache.jena.query.QuerySolution bindings)- Specified by:
executeBodyin classSHACLARQFunction
-
getBodyQuery
public org.apache.jena.query.Query getBodyQuery()
Gets the Jena Query object for execution.- Returns:
- the Jena Query
-
getQueryString
protected String getQueryString()
- Specified by:
getQueryStringin classSHACLARQFunction
-
-