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
  • Constructor Details

    • 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 Details

    • build

      public void build(String uri, org.apache.jena.sparql.expr.ExprList args)
      Specified by:
      build in interface org.apache.jena.sparql.function.Function
      Overrides:
      build in class SHACLARQFunction
    • create

      public org.apache.jena.sparql.function.Function create(String uri)
      Specified by:
      create in interface org.apache.jena.sparql.function.FunctionFactory
      Overrides:
      create in class SHACLARQFunction
    • 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:
      executeBody in class SHACLARQFunction
    • 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:
      getQueryString in class SHACLARQFunction