Package org.topbraid.jenax.functions
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 Summary
Fields Modifier and Type Field Description static org.apache.jena.rdf.model.PropertySPIN_ABSTRACT
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DeclarativeFunctionFactorycreate(org.apache.jena.rdf.model.Resource function)If this factory is responsible for the provided function Resource then it must create a FunctionFactory which can then be registered.static DeclarativeFunctionDriversget()voidregister(org.apache.jena.rdf.model.Property predicate, DeclarativeFunctionDriver driver)Registers a new DeclarativeFunctionDriver for a given key predicate.static voidset(DeclarativeFunctionDrivers value)
-
-
-
Method Detail
-
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:DeclarativeFunctionDriverIf this factory is responsible for the provided function Resource then it must create a FunctionFactory which can then be registered.- Specified by:
createin interfaceDeclarativeFunctionDriver- 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 predicatedriver- the driver to register
-
-