-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Labels
improvementExisting functionality that can be improvedExisting functionality that can be improved
Description
In SHACL we can re-use node shapes by basing a sh:NodeShape on one or more other node shapes, with the help of sh:node.
For example:
@prefix ex: <http://example.org/ns#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
ex:BaseShape1 a sh:NodeShape ;
sh:targetClass ex:Base ;
sh:property [
sh:path ex:baseProperty1 ;
sh:minCount 1 ;
] .
ex:BaseShape2 a sh:NodeShape ;
sh:targetClass ex:Base ;
sh:property [
sh:path ex:baseProperty2 ;
sh:minCount 1 ;
] .
ex:ExtendedShape a sh:NodeShape ;
sh:targetClass ex:Extended ;
sh:node ex:BaseShape1 ;
sh:node ex:BaseShape2 ;
sh:property [
sh:path ex:extraProperty ;
sh:minCount 1 ;
] .(a similar thing can be done with sh:property and sh:PropertyShape)
However, in the FDP, the SHACL above does not work.
Instead, we need to add base shapes via the extends property in the JSON body that is posted to the FDP API. This is rendered in the client using a dropdown:
Not sure why schema-extension is implemented this way (maybe just to enable the use of a dropdown in the client), but the fact that the SHACL above does not work in the FDP is inconvenient. The extension mechanism is quite obscure.
Extending shapes via sh:node should also be supported.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
improvementExisting functionality that can be improvedExisting functionality that can be improved