The Knowledge Graph Conference Icon
The Knowledge Graph Conference
  • 🏠Home
  • 📅Events
  • 👤Members
  • 🔵Announcements
  • 🔵Ask
  • 🔵Ask The Ontologists
  • 🔵Events
  • 🔵Jobs
  • 🔵Promotions
  • 🔵Share
Powered by Tightknit
Ask The Ontologists
Ask The Ontologists

Using SHACL to Create Constraints for skos:ConceptScheme Instances

Avatar of Katariina K.Katariina K.
·May 25, 2022 07:47 AM

I guess this is a question for the SHACL shark Veronika Heimsbakk but can I use SHACL to create a constraint for a property having as an object instances from a particular skos:ConceptScheme?

3 comments

· Sorted by Oldest
  • Avatar of Katariina K.
    Katariina K.
    ·

    Ok, I figured it out – that was fun. Can share the result here: I need to create a NodeShape to see if the node:

  • Avatar of Katariina K.
    Katariina K.
    ·
    sh:property [
            sh:path ( [ sh:zeroOrMorePath skos:broader ] skos:topConceptOf ) ;
            sh:hasValue ex:ExampleConceptScheme ;
        ] ;
  • Avatar of Veronika Heimsbakk
    Veronika Heimsbakk
    ·

    Saw this just now! 😅 sh:hasValue expect that particular value, while if you use sh:class, the SHACL engine expects any instance of the class pointed to by sh:class. But seems like you found your solution! ❤️