How to Document Properties and Cardinalities Defined in SHACL Shapes?
See original GitHub issueHi there
First of all: nice tool!
I have the following use case: I define SHACL Shapes to define a subset of schema.org types (classes) and properties (following https://datashapes.org/schema).
What I get looks like this:
In the addition to the SHACL shapes, I added a few RDF(S) definitions to the graph:
{
Shapes (ThingShape, CreativeWorkShape) ...
},
{
"@id": "schema:Thing",
"@type": "rdfs:Class"
},
{
"@id": "schema:name",
"@type": "rdf:Property",
"schema:domainIncludes": {
"@id": "schema:Thing"
},
"schema:rangeIncludes": {
"@id": "xsd:string"
}
},
{
"@id": "schema:CreativeWork",
"@type": "rdfs:Class",
"rdfs:subClassOf": {
"@id": "schema:Thing"
}
}
Then I do: ontospy gendocs graph.json
, then option 2 (Html multi page)
Question: Is there a way to display the properties, their ranges and cardinalities that are defined in the SHACL shapes along with the class?
So far, the properties only show up if they are defined along with schema:domainIncludes
(which is somehow redundant because this is also stated in the shapes).
Ontospy already recognises the relation between the shape and its target class so I wonder if it could include more information from the shape.
Thanks a lot!
Issue Analytics
- State:
- Created 2 years ago
- Comments:23 (6 by maintainers)
Top GitHub Comments
Hi Tobias, thanks for contributing. I’m happy to discuss more, in the new year.
FYI right now there is already an active PR that is intended to add various functionalities for SHACL processing. That might address some of your requirements - so feel free to take a look and comment if you like.
In general, I’d rather finish up integrating that code, before adding more SHACL support.
@ajnelson-nist Thanks for your message.
Yes, that sounds very systematical and allows us to do one step at a time, not getting wound up in SHACL’s complexity from the beginning.
In September, we could try working on this and split the tasks a bit once we are sure about the basic setup.
Have a good summer!