Web Service to convert OWL axioms to SHACL constraints

82 views
Skip to first unread message

Rebecca Jackson

unread,
Nov 28, 2023, 9:28:23 AM11/28/23
to TopBraid Suite Users
Hello,

I am working on an automated process to import an ontology into EDG and I would like this to be done entirely using the web service endpoints. So far, I can do the following:
1. Import the TTL using service/{asset}/tbs/importRDFFile
2. Execute SHACL inferences using /service/{asset}/tbs/executeRules

I also need to automatically perform the transformation "Convert OWL Axioms to SHACL Constraints", but I do not see an existing web service endpoint for this action. Is this something that can be configured using ADS?

Thanks!
Rebecca

Holger Knublauch

unread,
Nov 28, 2023, 11:33:58 AM11/28/23
to topbrai...@googlegroups.com
Hi Rebecca,

there is no "official" API for the OWL2SHACL converter, but you can invoke the same web service that also the manual feature is using from ADS scripts:

graph.swp('ontologyprojects:OWL2SHACLPage', {
projectGraph: graph.namedNode('urn:x-evn-master:aaaaa'),
graphs: 'urn:x-evn-master:aaaaa',
replace: false,
})

(Replace the aaaaa with the Ontology that contains the OWL triples after RDF file import).

To fully automate this, you could probably wrap this into a dash:Service including the file upload, but this depends on your use case.

If I may ask, how many files do you need to convert and does this happen repeatedly?

HTH
Holger



--
The topics of this mailing list include TopBraid EDG and related technologies such as SHACL.
To post to this group, send email to topbrai...@googlegroups.com
---
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 topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/def2adcb-513f-4b56-b972-5fd7df4aa685n%40googlegroups.com.

Rebecca Jackson

unread,
Nov 28, 2023, 2:01:18 PM11/28/23
to TopBraid Suite Users
Thank you! I will try this out - this is a useful starting point.
It is only one file but yes, it will happen repeatedly. Probably only once per month, though. We have an automated process that generates the TTL for our ontology file, and as part of this pipeline we are also importing it to EDG to use for data curation workflows.

Reply all
Reply to author
Forward
0 new messages