-
Notifications
You must be signed in to change notification settings - Fork 30
Issue 172: Support for sh:closed sh:ByTypes
#399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: gh-pages
Are you sure you want to change the base?
Conversation
Co-authored-by: Thomas Bergwinkl <[email protected]>
sh:closed sh:ByTypes
<code> | ||
function collectProperties(S)<br /> | ||
add all IRI properties that can be reached from S via the SPARQL path<br /> | ||
sh:property/sh:path<br /> | ||
if S is a SHACL instance of rdfs:Class in the shapes graph {<br /> | ||
for each triple in the shapes graph matching (S rdfs:subClassOf ?o)<br /> | ||
collectProperties(?o)<br /> | ||
for each triple in the shapes graph matching (?s sh:targetClass S)<br /> | ||
collectProperties(?s)<br /> | ||
}<br/> | ||
if S is a SHACL instance of sh:NodeShape in the shapes graph<br /> | ||
for each triple in the shapes graph matching (S sh:node ?o)<br /> | ||
collectProperties(?o)<br /> | ||
<br /> | ||
for each rdf:type T of the value node in the data graph<br /> | ||
collectProperties(T)<br /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<code> | |
function collectProperties(S)<br /> | |
add all IRI properties that can be reached from S via the SPARQL path<br /> | |
sh:property/sh:path<br /> | |
if S is a SHACL instance of rdfs:Class in the shapes graph {<br /> | |
for each triple in the shapes graph matching (S rdfs:subClassOf ?o)<br /> | |
collectProperties(?o)<br /> | |
for each triple in the shapes graph matching (?s sh:targetClass S)<br /> | |
collectProperties(?s)<br /> | |
}<br/> | |
if S is a SHACL instance of sh:NodeShape in the shapes graph<br /> | |
for each triple in the shapes graph matching (S sh:node ?o)<br /> | |
collectProperties(?o)<br /> | |
<br /> | |
for each rdf:type T of the value node in the data graph<br /> | |
collectProperties(T)<br /> | |
<code> | |
<pre>function collectProperties(S) | |
add all IRI properties that can be reached from S via the SPARQL path | |
sh:property/sh:path | |
if S is a SHACL instance of rdfs:Class in the shapes graph, then { | |
for each triple in the shapes graph matching (S rdfs:subClassOf ?o) | |
collectProperties(?o) | |
for each triple in the shapes graph matching (?s sh:targetClass S) | |
collectProperties(?s) | |
} | |
if S is a SHACL instance of sh:NodeShape in the shapes graph, then | |
for each triple in the shapes graph matching (S sh:node ?o) | |
collectProperties(?o) | |
for each rdf:type T of the value node in the data graph | |
collectProperties(T)</pre> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pre was adding syntax highlighting in unsuitable places in my testing. Have you tried to render your change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried out the suggested changes, and indeed some unwanted highlighting was added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do my editing in GitHub's web interface, so I can't see my changes rendered until they're merged into a PR and PR-Preview is invoked.
I guess there's some CSS used on other <pre>
blocks to prevent the unwanted syntax highlighting. Changing from the manual formatting to the <pre>
isn't vital; if I find the CSS incantation I'll try to apply it later.
Co-authored-by: Ted Thibodeau Jr <[email protected]>
a rdfs:Class, sh:NodeShape ; | ||
sh:property [ sh:path ex:rootClassProperty1 ] ; | ||
sh:closed sh:ByTypes ; | ||
sh:ignoredProperties ( rdf:type ) ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this line going to be universally necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see in test 4's ex:RootClass
shape that rdf:type
isn't ignored.
Closes #172