Class FunctionBinder
java.lang.Object
org.aksw.jenax.arq.functionbinder.FunctionBinder
Convenience class to create Jena bindings for Java functions
and to register them at Jena's default FunctionRegistry.
- Author:
- raven
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FunctionGeneratorprotected Supplier<org.apache.jena.sparql.function.FunctionRegistry> -
Constructor Summary
ConstructorsConstructorDescriptionFunctionBinder(Supplier<org.apache.jena.sparql.function.FunctionRegistry> functionRegistrySupplier) FunctionBinder(FunctionGenerator functionGenerator) FunctionBinder(FunctionGenerator functionGenerator, Supplier<org.apache.jena.sparql.function.FunctionRegistry> functionRegistrySupplier) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.jena.sparql.function.FunctionFactoryorg.apache.jena.sparql.function.FunctionFactorystatic org.apache.jena.sparql.function.FunctiongetFunction(Method method) Lookup a function for a given method in the default registry.static org.apache.jena.sparql.function.FunctiongetFunction(org.apache.jena.sparql.function.FunctionRegistry registry, Method method) Read a (static) method's @Iri annotation and use it to lookup a function in the given registry At present there is no direct mapping of methods to FuncionFactories (without having to read the @Iri annotation)voidvoidConvenience method to register a function at Jena's default registryvoidConvenience method to register a function at Jena's default registryvoidvoidRegister a method with multiple aliasesvoidvoidvoidConvenience method that hides checked exceptions from Class.getMethodvoidvoidvoidregisterAll(boolean lazy, Class<?> clz) Register all static methods with @Iri annotationsvoidregisterAll(boolean lazy, Class<?> clz, Object invocationTarget) Register all methods of the class with the given invocationTarget.voidregisterAll(Class<?> clz) voidregisterAll(Class<?> clz, Object invocationTarget)
-
Field Details
-
functionRegistrySupplier
-
functionGenerator
-
-
Constructor Details
-
FunctionBinder
public FunctionBinder() -
FunctionBinder
public FunctionBinder(Supplier<org.apache.jena.sparql.function.FunctionRegistry> functionRegistrySupplier) -
FunctionBinder
-
FunctionBinder
public FunctionBinder(FunctionGenerator functionGenerator, Supplier<org.apache.jena.sparql.function.FunctionRegistry> functionRegistrySupplier)
-
-
Method Details
-
getFunctionGenerator
-
register
-
register
-
register
-
register
-
registerAll
-
registerAll
-
register
Convenience method to register a function at Jena's default registry -
register
public void register(boolean lazy, List<String> functionIris, Method method, Object invocationTarget) Register a method with multiple aliases -
register
-
register
-
register
Convenience method to register a function at Jena's default registry -
register
Convenience method that hides checked exceptions from Class.getMethod -
registerAll
Register all static methods with @Iri annotations -
registerAll
Register all methods of the class with the given invocationTarget. If the invocation target is null then all static methods will be registered. Otherwise, if the invocation target is non-null then all non-static methods will be registered.- Parameters:
clz-invocationTarget-
-
factory
-
factory
-
getFunction
Lookup a function for a given method in the default registry. UsesgetFunction(FunctionRegistry, Method). -
getFunction
public static org.apache.jena.sparql.function.Function getFunction(org.apache.jena.sparql.function.FunctionRegistry registry, Method method) Read a (static) method's @Iri annotation and use it to lookup a function in the given registry At present there is no direct mapping of methods to FuncionFactories (without having to read the @Iri annotation)
-