-
Notifications
You must be signed in to change notification settings - Fork 8
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
Adds a feature of dimension anotations #202
Conversation
🦋 Changeset detectedLatest commit: a3575ad The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
meta:annotationContext | ||
[ | ||
sh:path <year> ; | ||
sh:minInclusive <https://ld.admin.ch/time/year/2020> ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why two lower bounds?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a test cases which should fail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, I see, to check they are not accepted :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to make this even more accurate but I seem to have hit a limitation of shat SHACL can do when there are multiple properties with same value. I failed to make a validation to catch for example
sh:minInclusive <https://ld.admin.ch/time/year/2020>
sh:minExclusive <https://ld.admin.ch/time/year/2020>
In case of temporal dimensions, the constraint values are expected to be literals with datatypes `xsd:date`, | ||
`xsd:dateTime` or `xsd:gYear`, or the IRIs of [temporal entities](https://lindas.admin.ch/governance/core-entities/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could not find a simple enough way to include this in the validation shape
meta:annotationContext | ||
[ | ||
sh:path <year> ; | ||
sh:minInclusive <https://ld.admin.ch/time/year/2020> ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to make this even more accurate but I seem to have hit a limitation of shat SHACL can do when there are multiple properties with same value. I failed to make a validation to catch for example
sh:minInclusive <https://ld.admin.ch/time/year/2020>
sh:minExclusive <https://ld.admin.ch/time/year/2020>
[ | ||
sh:property | ||
[ | ||
sh:path [ sh:inversePath meta:annotationContext ] ; | ||
sh:minCount 1 | ||
] | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not define a class for the annotation context so this is needed to distinguish them from actual key dimension because sh:path/^sh:path
will find both. Would not have been needed if we used a different property to refer to the dimension in annotation context.
This will add annotations, as required to achieve the functionality of targets or limits.
cc @kronmar