Generate errors for undeclared properties

34 views
Skip to first unread message

Jessica Cleary-Kemp

unread,
Nov 5, 2025, 3:28:47 PM (7 days ago) Nov 5
to TopBraid Suite Users
Hi team,

Is there a simple way (either in the UI or via a SHACL constraint) to generate an error in Problems & Suggestions whenever a concept has any undeclared property associated with it? e.g., of a use case: we accidentally use the predicate namespace:locationOf with a subject "Halifax" the company, not "Halifax" the city. This will not currently show up in Problems & Suggestions because it simply ends up as an undeclared property and is ignored.

Any help is appreciated! 

Holger Knublauch

unread,
Nov 5, 2025, 7:43:19 PM (7 days ago) Nov 5
to topbrai...@googlegroups.com
Hi Jessica,

in SHACL there is sh:closed and its (better) variation https://datashapes.org/constraints.html#ClosedByTypesConstraintComponent that should help here. If you want to control which properties can be used at skos:Concepts just add

skos:Concept dash:closedByTypes true .

PastedGraphic-2.png

and you should get:

PastedGraphic-1.png

FWIW SHACL 1.2 will include this constraint using sh:closed sh:ByTypes, see


HTH
Holger


This email may contain material that is confidential, privileged, or for the sole use of the intended recipient.  Any review, disclosure, reliance, or distribution by others or forwarding without express permission is strictly prohibited.  If you are not the intended recipient, please contact the sender and delete all copies, including attachments.


--
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 visit https://groups.google.com/d/msgid/topbraid-users/c2ca03ee-881f-4020-9f2b-e6c57a87ab27n%40googlegroups.com.

Jessica Cleary-Kemp

unread,
Nov 6, 2025, 6:23:24 PM (6 days ago) Nov 6
to topbrai...@googlegroups.com
This worked, thank you! The problems and suggestions report does seem to be taking longer now. Is that inevitable after adding this constraint?

You received this message because you are subscribed to a topic in the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/topbraid-users/nyiwtwNLghQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to topbraid-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/topbraid-users/46EB7ADA-78B2-44C1-A493-FCACE057DC1A%40topquadrant.com.

Holger Knublauch

unread,
Nov 6, 2025, 6:27:19 PM (6 days ago) Nov 6
to topbrai...@googlegroups.com

On Nov 7, 2025, at 09:23, Jessica Cleary-Kemp <jessica...@bold.com> wrote:

This worked, thank you! The problems and suggestions report does seem to be taking longer now. Is that inevitable after adding this constraint?

Yes, this is a rather expensive operation because it needs to walk through all property shapes for the classes and superclasses. How bad is the performance impact? Maybe I can add some caches to avoid repeated computation.

Holger



On Wed, Nov 5, 2025 at 6:43 PM Holger Knublauch <hol...@topquadrant.com> wrote:
Hi Jessica,

in SHACL there is sh:closed and its (better) variation https://datashapes.org/constraints.html#ClosedByTypesConstraintComponent that should help here. If you want to control which properties can be used at skos:Concepts just add

skos:Concept dash:closedByTypes true .

<PastedGraphic-2.png>

and you should get:

Jessica Cleary-Kemp

unread,
Nov 7, 2025, 10:20:22 AM (5 days ago) Nov 7
to topbrai...@googlegroups.com
I couldn't quantify the performance impact exactly, but it's definitely noticeable. I would say it's added minutes, as an estimate.

If there is anything you can do to help minimize the impact that would be amazing! Please let me know if I should open a support ticket instead.

Holger Knublauch

unread,
Nov 7, 2025, 6:23:20 PM (5 days ago) Nov 7
to topbrai...@googlegroups.com

On Nov 8, 2025, at 01:20, Jessica Cleary-Kemp <jessica...@bold.com> wrote:

I couldn't quantify the performance impact exactly, but it's definitely noticeable. I would say it's added minutes, as an estimate.

If there is anything you can do to help minimize the impact that would be amazing! Please let me know if I should open a support ticket instead.

Yes please, a support ticket will be a better place to narrow this down. For the ticket, please include the ontology that you have tried for now.

Holger


Jessica Cleary-Kemp

unread,
Nov 10, 2025, 12:07:44 PM (2 days ago) Nov 10
to TopBraid Suite Users
Reply all
Reply to author
Forward
0 new messages