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

How to add multiple instances of the same class to the type index #32

Open
angelo-v opened this issue Mar 21, 2024 · 2 comments
Open

How to add multiple instances of the same class to the type index #32

angelo-v opened this issue Mar 21, 2024 · 2 comments

Comments

@angelo-v
Copy link

My understanding until today was, that there should only be one type registration per class, and I list all the instances under the solid:instance predicate, like this

<#id1711048996537> 
    solid:forClass <http://www.w3.org/2006/vcard/ns#AddressBook>;
    solid:instance ex:first-address-book, ex:second-address-book .

However I noticed, that the SolidOS contacts-pane creates a new type registration for each address book like this:

<#id1711048996537> solid:forClass <http://www.w3.org/2006/vcard/ns#AddressBook>;
        solid:instance ex:first-address-book .

<#id1711049030051> solid:forClass <http://www.w3.org/2006/vcard/ns#AddressBook>;
        solid:instance ex:second-address-book .

Which one is correct, or should either be allowed?

Also: Is it allowed to leave out the solid:TypeRegistration type as SolidOS does?

@jeff-zucker
Copy link
Member

Unless there's something I'm missing, I would say that either a list of instances or separate registrations per instance are both acceptable.

: Is it allowed to leave out the solid:TypeRegistration type as SolidOS does?

I assume you mean omitting something like :X a solid:TypeRegistration;. Normally it is good practice to include types, but since TypeRegistrations are the only type expected in the index, I'm not sure it makes a practical difference.

This question is also related to #29 .

@angelo-v
Copy link
Author

If all is allowed it adds more complexity to the clients reading from type index. It is much easier to just query for the one solid:TypeRegistration that matches the right forClass compared to having to consider multiple registrations.

Also I am not sure if it imposes security issues if anything that is not a TypeRegistrations makes statements about where to find things. But I guess this is not an issue as long as we only read from the trusted type index document

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

2 participants