Skip to content
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

Would it be possible to have a direct link between the shape tree and its description? #72

Open
justinwb opened this issue Nov 4, 2021 · 3 comments

Comments

@justinwb
Copy link
Contributor

justinwb commented Nov 4, 2021

Would it be possible to have a direct link between the shape tree and its description? Here it seems that we have a link between a document that includes multiple shape tree definitions to descriptions which feels like weird indirection.

Response from @justinwb:

Note that the shape tree description links directly to the shape tree via st:describes. The benefit of having the descriptions link to the shape vs. the other way around, is that we can expand those more freely without having to directly modify the composition of the shape trees definitions themselves.

Originally posted by @elf-pavlik in #71 (comment)

@justinwb justinwb changed the title Would it be possible to have a direct link between the shape tree and its description? Here it seems that we have a link between a document that includes multiple shape tree definitions to descriptions which feels like weird indirection. Would it be possible to have a direct link between the shape tree and its description? Nov 4, 2021
@srosset81
Copy link

srosset81 commented Dec 9, 2024

I agree with @elf-pavlik that the current spec make it really hard to simply find a description for a given shapetree.

For example if I want to find the english label for a pm:Project shapetree:

  • First, I need to go through all st:Description resources, wherever they may be, and find the ones that are related to the pm:Project shapetree (via the st:describes predicate). I will get one st:Description per available language.
  • Then, I need to load all st:DescriptionSet related to these st:Description (via the st:inDescriptionSet predicate) until I find the one related to the english language.

Depending on the way data are stored, this may mean going through dozens of resources... just to get a single description! IMO this breaks the whole interest of linked data, where you can find more information about something just by following related links.

Imagine if the whole web worked with inverse links like you do here! 😄

Note that the shape tree description links directly to the shape tree via st:describes. The benefit of having the descriptions link to the shape vs. the other way around, is that we can expand those more freely without having to directly modify the composition of the shape trees definitions themselves.

What is wrong with modifying the shapetree definition if a new language is added ?

@elf-pavlik
Copy link
Contributor

Imagine if the whole web worked with inverse links like you do here! 😄

My approach is to always have backlinks for those inverse links. Since directions of predicates are pretty arbitrary, I treat subjects and objects equally.

For example https://github.com/janeirodigital/sai-js/blob/main/packages/css-storage-fixture/dev/shapetrees/trees/Project%24.ttl#L32-L51

Since shape definitions support inverse relations https://shex.io/shex-primer/#inverse-properties
I want to use it to specify when backlinks have to be included.

@srosset81
Copy link

srosset81 commented Jan 21, 2025

For example https://github.com/janeirodigital/sai-js/blob/main/packages/css-storage-fixture/dev/shapetrees/trees/Project%24.ttl#L32-L51

So, if I understand well, you copy these lines...

solidtrees:desc-en\#Project
  shapetrees:inDescriptionSet solidtrees:desc-en ;
  shapetrees:describes solidtrees:Project .

solidtrees:desc-en
  shapetrees:usesLanguage "en"^^xsd:language .

... from this file to this file ?

If so, this means you need to keep a synchronization of data between files. Which for me is a bad practice, because there should only be a single source of truth. From my perspective, the whole point of linked data is to avoid making copies of the same data ! (otherwise why would we bother with URIs ?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants