Class DeclarativeFunctionDrivers

java.lang.Object
org.topbraid.jenax.functions.DeclarativeFunctionDrivers
All Implemented Interfaces:
DeclarativeFunctionDriver

public class DeclarativeFunctionDrivers extends Object implements DeclarativeFunctionDriver
The singleton that creates ARQ FunctionFactories from (SHACL, SPIN) function declarations. Can be used by applications to install a different singleton with support for different kinds of functions, such as SHACL-JS or Script-based functions.
Author:
Holger Knublauch
  • Field Details

    • SPIN_ABSTRACT

      public static final org.apache.jena.rdf.model.Property SPIN_ABSTRACT
  • Method Details

    • get

      public static DeclarativeFunctionDrivers get()
    • set

      public static void set(DeclarativeFunctionDrivers value)
    • create

      public DeclarativeFunctionFactory create(org.apache.jena.rdf.model.Resource function)
      Description copied from interface: DeclarativeFunctionDriver
      If this factory is responsible for the provided function Resource then it must create a FunctionFactory which can then be registered.
      Specified by:
      create in interface DeclarativeFunctionDriver
      Parameters:
      function - the function's declaration resource
      Returns:
      the FunctionFactory or null if this is not responsible
    • register

      public void register(org.apache.jena.rdf.model.Property predicate, DeclarativeFunctionDriver driver)
      Registers a new DeclarativeFunctionDriver for a given key predicate. For example, SPARQLMotion functions are recognized via sm:body. Any previous entry will be overwritten.
      Parameters:
      predicate - the key predicate
      driver - the driver to register