Skip to content

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

Open
wants to merge 5 commits into
base: gh-pages
Choose a base branch
from

Conversation

HolgerKnublauch
Copy link
Contributor

Co-authored-by: Thomas Bergwinkl 
@TallTed TallTed changed the title Issue 172: Support for sh:closed sh:ByTypes Issue 172: Support for sh:closed sh:ByTypes Jun 11, 2025
Comment on lines +5861 to +5876
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 {
    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
    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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<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>

Copy link
Contributor Author

@HolgerKnublauch HolgerKnublauch Jun 12, 2025

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?

Co-authored-by: Ted Thibodeau Jr 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add something similar to dash:closedByTypes
3 participants