-
Notifications
You must be signed in to change notification settings - Fork 9
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
Dimension relation validations #199
Conversation
🦋 Changeset detectedLatest commit: 7cb9da8 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 |
[ | ||
sh:path | ||
( | ||
meta:relatesTo | ||
[ sh:inversePath sh:path ] | ||
[ sh:inversePath sh:property ] | ||
) ; | ||
sh:minCount 1 ; | ||
sh:class cube:Constraint ; | ||
sh:message "value of meta:relatesTo must be a cube dimension" ; | ||
] ; |
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.
With SHACL-SPARQL we would be able to check that the two dimensions actually belong to the same cube. As above, we merely verify that they the related dimension is use in a cube, not necessarily the same cube. That would potentially cause false-positive results if a graph contained multiple cubes. But since we typically only validate cubes individually, we should be covered
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.
Seems like a reasonable restriction. But I have an additional sh:property
here:
[
sh:path
(
meta:relatesTo
[ sh:inversePath sh:path ]
) ;
sh:class cube:MeasureDimension ;
sh:message "value of meta:relatesTo must point to measure dimension " ;
]
The dimension which is related to should be a cube:MeasureDimension
. I can't see a reasonable case, where that would not be the case.
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.
@Rdataflow @l00mi WDYT?
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.
LGTM
|
||
Improve validation of `meta:dimensionRelation`: | ||
|
||
1. Check that upper/lower bound has at most one `dcterms:type` |
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.
@kronmar I'm a little creative here since this was not really discussed. WDYT?
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.
Seems like reasonable checks
I have not other ideas what can be validated about upper/lower limit. Ideas welcome @kronmar @Rdataflow |
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.
One small addition for :DimensionRelation
altough open for discussion if such restriction would be overkill.
Rest looks good to me!
|
||
Improve validation of `meta:dimensionRelation`: | ||
|
||
1. Check that upper/lower bound has at most one `dcterms:type` |
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.
Seems like reasonable checks
[ | ||
sh:path | ||
( | ||
meta:relatesTo | ||
[ sh:inversePath sh:path ] | ||
[ sh:inversePath sh:property ] | ||
) ; | ||
sh:minCount 1 ; | ||
sh:class cube:Constraint ; | ||
sh:message "value of meta:relatesTo must be a cube dimension" ; | ||
] ; |
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.
Seems like a reasonable restriction. But I have an additional sh:property
here:
[
sh:path
(
meta:relatesTo
[ sh:inversePath sh:path ]
) ;
sh:class cube:MeasureDimension ;
sh:message "value of meta:relatesTo must point to measure dimension " ;
]
The dimension which is related to should be a cube:MeasureDimension
. I can't see a reasonable case, where that would not be the case.
@Kronmar-Bafu could you check again, I would like to see this merged. |
@ktk Sorry, was on vacation. Looks good to me. |
The git graph got a little ot of hand: Squash merge when approved.
cc @kronmar
re https://gitlab.ldbar.ch/bafu/visualize/-/issues/668