How does the constraints-tab work?


There´s a contrains-tab for every model in the UI and there´s a feature for adding shacl-.ttl as "part of the system database" (
I assumed, that I can view my added constrains (via file) in that tab, but I can´t... and I assumend, that writing statements there would add them as constrains to the db, but they´r added as normal data.
How does the constraints-tab work in Stardog Studio?

ps: I apologize for multiple questions today :wink:

best regards

No worries with multiple questions. What version of Studio are you running? In the workspace if you add a new tab and switch to the SHACL view you should have a three buttons at the top for "add data" "add constraints" and "get validation report".

Yes, that works.

But if I add constraints via "add constraints", they don´t show up in the "Models"-section / "Constraints"-tab. They only show up, if I add them as data.
Is there a way to see the constrains added to the system database in the "Constrains"-tab?

I´m using the latest version of stardog-studio and stardog.

What's happening here is Stardog supports constraints in both SHACL and Stardog ICV which is being deprecated. The worksheets tab despite being set as a "SHACL" type in the light blue menu accepts both ICV and SHACL. The "Add Data" button corresponds to SHACL and "Add Constraints" corresponds to ICV. ICV is added to the system database since it reuses the owl namespace and it would clash if it was added to the same database as your ontology. They're both valid RDF so it doesn't really know if you added SHACL but hit the button for ICV. Then when you go to Models/Constraints you will not see it since this only lists SHACL and you've added it as ICV and it's in the system db that you can't see. I hope this makes sense. Summary: try hitting the other button and see if that works.

1 Like

That makes sense. So what is recommended for working with constraints?