-
Notifications
You must be signed in to change notification settings - Fork 5
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 #321 : Add blank nodes to attribute definition #324
Conversation
@ofilangi if you want to check the code. |
This implementation seems good . This is great to manage attribute with blank node |
Agreed on the OPTIONAL cost. (Though the only new lines are these two) :
But it's the only way to manage retro-compatibility. |
no needed....there no triplet under this optional request...should be quickly if askomics has been deployed in a old way.... |
Fixes #321
This is an overhaul of the way to describe "attributes"
As explained in the linked issue, the current way of translating to TTL leads to a mix-up if the same attribute name is used between different entities, but with a different type). This means Askomics will not know which type belong to each entity, leading to a possibly wrong query field type (integer instead of string for instance). It is especially an issue if one attribute is specified as a 'Category' for one entity, since all entities will display this attribute as a category.
This PR is a proposal to write attributes using blank nodes, making sure there are no mix-up between entities. This blank node will be linked to the attribute uri with the askomics:uri predicate.
Namely, an attribute will be written as follows: (ex: Expression attribute of the DifferentialExpression entity)
To maintain retrocompatibility with existing datasets, the SPARQL query listing relations has been slightly modified to return both new and old relations.
(There is no way to convert automatically the old datasets, since the information is lost. The files needs to be re-integrated. )
The new SPARQL query is:
Both old-style and new-style relations will work for now.
Since the new request is slightly cleaner, it was also updated for relations (from #268)