-
Notifications
You must be signed in to change notification settings - Fork 14
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
Fix generated SHACL to allow subclasses to satisfy constraints #74
Comments
Confirming the issue. With an example test data file: @prefix core: <https://spdx.org/rdf/v3/Core/> .
@prefix ex: <http://zvr.invalid/rdf/> .
ex:someOrganization a core:Organization .
ex:someCreationInfo a core:CreationInfo .
ex:someCreationInfo core:createdBy ex:someOrganization . checking the PySHACL validation with
|
So the problem is not in the |
The corresponding SHACL part of the generated model is: core:CreationInfo a sh:NodeShape ;
sh:property [ sh:class core:Agent ;
sh:minCount 1 ;
sh:name "createdBy" ;
sh:path core:createdBy ],
... |
This refers to the old parser output, no longer relevant. Nevertheless, I leave this open to remind me to check this on the new generated output, just in case. |
The model that is produced by the spec parser is not allowing sub classes to satisfy the requirements of a property.
For example,
core:CreationInfo.createdBy
should allowcore:Agent
or any subclass derived from it (e.g.core:Organization
), but instead it only allows an exactcore:Agent
This is a problem with both the generated TTL and JSON-LD model file.
The text was updated successfully, but these errors were encountered: