Last active
November 2, 2021 09:44
-
-
Save jaw111/885c8615dfe642342c3ad5d8b015df85 to your computer and use it in GitHub Desktop.
Example rule to infer skos:member for skos:OrderedCollection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@base <https://example.com/> . | |
@prefix skos: <http://www.w3.org/2004/02/skos/core#>. | |
<collection1> a skos:OrderedCollection ; | |
skos:memberList ( <member1> <member2> <member3> ) . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. | |
@prefix sh: <http://www.w3.org/ns/shacl#>. | |
@prefix skos: <http://www.w3.org/2004/02/skos/core#>. | |
[] a sh:NodeShape ; | |
sh:targetClass skos:OrderedCollection ; | |
sh:rule [ | |
a sh:TripleRule ; | |
sh:subject sh:this ; | |
sh:predicate skos:member ; | |
sh:object [ | |
# SPARQL Property path: skos:memberList/rdf:rest*/rdf:first | |
sh:path ( skos:memberList [ sh:zeroOrMorePath rdf:rest ] rdf:first ) | |
] | |
] . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment