[data-shapes] Use Case: Find all the Shapes depended upon by a Profile (#622)

nicholascar has just created a new issue for https://github.com/w3c/data-shapes:

== Use Case: Find all the Shapes depended upon by a Profile ==
Within a Graph, we may wish to find all the Shapes that a Profile depends on.

### Context

I have a database containing lots of Shapes that are defined in Profiles (instances of `owl:Ontology`) with lots of Shapes reuse between Profiles and I want to know about Shape dependency so I can work out the effects of Shapes' change on Profiles, Profile similarity Profile --> Profile dependency.

This scenario exists in a couple of projects of mine already where we have built up lots of Profiles using Shapes for large, diverse, Knowledge Graphs.

### Postconditions

1. The Actor will need to be able to differentiate between Profiles that define Shapes and Profiles that just reuse them so they can work out what Profiles are able to change what Shapes
2. The Actor must be able to find Shapes defined by no Profile, or Shapes defined without knowledge of any containing Profile, if they are depended upon by their Profile(s) of interest
3. 

### Solution

Link Shapes to the Profiles that define them with `rdfs:isDefinedBy`

Link Shapes to Profiles that use them but do not define them with `rdfs:member`

### Testing Example

Overview:

```mermaid
---
title: Node
---
flowchart LR
    id
```

Data:

```turtle
# Profiles
ex:ont-m
  a owl:Ontology ;
.

ex:ont-n
  a owl:Ontology ;
.

ex:ont-o
  a owl:Ontology ;
.

# Shapes
ex:shape-1
    a sh:NodeShape ;
    rdfs:isDefinedBy ex:ont-m ;
.

ex:shape-2
    a sh:NodeShape ;
    rdfs:isDefinedBy ex:ont-m ;
.

```

Please view or discuss this issue at https://github.com/w3c/data-shapes/issues/622 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 24 October 2025 05:49:46 UTC