assemblee-virtuelle / semapps

A toolbox to create semantic web applications
https://semapps.org
Apache License 2.0
87 stars 8 forks source link

Allow hashes in URIs #1253

Closed srosset81 closed 2 months ago

srosset81 commented 2 months ago

Resources are supposed to be identifiable with hashes (like https://mypod.store/alice#me), but SemApps never supported that until now.

To support it, we would need to adapt the ldp.resource.get action to look for hash resources sharing the same main URI. If a hash resource is found, we would need to display it like this in Turtle:

<https://srosset.inrupt.net/profile/card>
  a foaf:PersonalProfileDocument;
  foaf:maker <https://srosset.inrupt.net/profile/card#me>; 
  foaf:primaryTopic <https://srosset.inrupt.net/profile/card#me>.

<https://srosset.inrupt.net/profile/card#me>
    a schema:Person, foaf:Person;
    foaf:name "Sébastien".

And like this in JSON-LD:

{
    "@context": { },
    "@graph": [
        {
            "@id": "https://srosset.inrupt.net/profile/card",
            "@type": "foaf:PersonalProfileDocument",
            "foaf:maker": {
                "@id": "https://srosset.inrupt.net/profile/card#me"
            },
            "foaf:primaryTopic": {
                "@id": "https://srosset.inrupt.net/profile/card#me"
            }
        },
        {
            "@id": "https://srosset.inrupt.net/profile/card#me",
            "@type": [
                "schema:Person",
                "foaf:Person"
            ],
            "foaf:name": "Sébastien"
        }
    ]
}

WAC permissions are applied for the whole resource.

Left issues

srosset81 commented 2 months ago

Closing as https://github.com/assemblee-virtuelle/semapps/issues/1265 will solve this problem.