Hi Alex,
to install SHACL functions, load the graph containing their definitions
(including the required sub-graphs via owl:imports) and call
// Make sure all sh:Functions are registered
SHACLFunctions.registerFunctions(shapesModel);
See ValidationUtil.validateModel, which does this. Once called, the
functions are added to Jena's functions registry and can be called like
any other SPARQL function, from any SPARQL query.
Regards
Holger
On 7/10/2017 14:36, Alex To wrote:
Hi, I have been struggle with how to make custom SHACL functions and
use it in my SPARQL queries.
I have an application based on Jena. I can write custom functions that
extend FunctionBaseXXX and register the functions and then execute the
functions successfully as described here
https://jena.apache.org/documentation/query/writing_functions.html
I am new to SHACL but if I understand it correctly, I can also write
function in SHACL and TopBraid API can make it available in my SPARQL
queries as well?
What steps do I have to do to achieve this? At a high level, I think I
have to do the following
1. Define SHACL functions as triples
2. Import these triples into my Jena dataset ????
3. Somehow register these SHACL functions with FunctionRegistry ?? how
do I do that with TopBraid SHACL API ??
The thing that I can't figure out is how to make Jena aware that I
have such SHACL functions and where should I store those functions?
Thank you
Best Regards
--
You received this message because you are subscribed to the Google
Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "TopBraid
Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.