Class 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 Detail

      • SPIN_ABSTRACT

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

      • 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