SHACL validation against a Dataset

16 views
Skip to first unread message

Davan CHIEM DAO

unread,
Jun 12, 2024, 9:24:25 AMJun 12
to TopBraid Suite Users
[SHACL API]

Hi,
I am researching how different SHACL engines perform validation on a RDF dataset.
My main question is: 'Is it possible to specify the whole dataset as "data graph"?'

I already tried a few things without much success, the closest I got to what I what to achieve is: 

ValidationEngine validationEngine = new ValidationEngineFactory().create(dataSet, shapesUri, shapesGraph, null);
Resource report = validationEngine.validateAll(); However, this only performs validation against the default graph and some constraints such as sh:property are not checked.

Thanks,
Chiem Dao Davan

Holger Knublauch

unread,
Jun 12, 2024, 9:27:59 AMJun 12
to topbrai...@googlegroups.com
Hello Chiem Dao Davan,

validation only works with Models and Graphs, not on whole Datasets. However, you can construct a single Model that is the union of all graphs when you create a MultiUnion graph from all graphs in the dataset, then wrap the MultiUnion into a Model using ModelFactory.

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/352c14f3-b6ff-4311-866b-aa8f4629b59an%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages