".meta" Implementation Status
Opened this issue · 4 comments
".meta" Implementation Status
The aim of this issue is for me to understand what is the status of the implementation of metadata ".meta" files both in the Solid Specification and in solid-file-client library.
ldp:Containers
As far as I understood, ldp:Containers
are linked with .meta files, which content is shown for example when requesting (GET
) on a Container. To get the link to the specific .meta file, it should be sufficient to inspect the Link Header in the response as written in [https://github.com/solid/solid-spec/blob/master/content-representation.md#metadata][https://github.com/solid/solid-spec/blob/master/content-representation.md#metadata].
This works, and I am able to see the .meta file in the response header, for example a get on public/
gives:
Link: <.acl>; rel="acl", <.meta>; rel="describedBy", <http://www.w3.org/ns/ldp#Container>; rel="type", <http://www.w3.org/ns/ldp#BasicContainer>; rel="type"
Now, if I try to access the .meta on public/.meta
file directly I get:
Can't find file requested: [object Object]
ldp:Resources
As far as I can see, for ldp:Resources
should be the same thing, for example a GET
on public/test.txt
returns:
Link: <img.png.acl>; rel="acl", <img.png.meta>; rel="describedBy", <http://www.w3.org/ns/ldp#Resource>; rel="type"
Nonetheless, the behaviour is the same, a request to img.png.meta gives 404.
Direct Access to .meta
Reading .meta files seems impossible, and I suppose is because they're not created yet. So I tried to create one (img.png.meta
), but I got:
Error SFCFetchError: SFCFetchError 415 https://pimsfsc.solidcommunity.net/public/img.png.meta
at assertResponseOk (webpack://SolidFileClient/./src/utils/errorUtils.js:93:11)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async writeFileContent (/home/admindin/PIMS.FSC/Experiment.TestSolidServerNode/src/app.ts:109:9)
at async mainMenu (/home/admindin/PIMS.FSC/Experiment.TestSolidServerNode/src/app.ts:39:13)
Error SFCFetchError
Error SFCFetchError 415 https://pimsfsc.solidcommunity.net/public/img.png.meta
I tried both with a simple payload like test
and with an RDF formatted content, but nothing: same error.
Is this because one cannot directly modify .meta files? What about RDF description of non-rdf resources, shouldn't it be exactly in .meta files?
Final Questions
- How can I directly read .meta files?
- Can I create .meta files?
- Can I do the same for both ldp:Containers and ldp:Resources?
- What is the correct way to descirbe non-rdf resources?
Thank you,
FS
@FilippoScaramuzza
thanks for your questions :
- to read the
/.meta
content you can either :- GET to the container (example https://pimsfsc.solidcommunity.net/ and click on source-pane/
- GET to the container/.meta (https://pimsfsc.solidcommunity.net/.meta)
- to create .meta file. Browser creation with the solidOS webApp is not possible SolidOS/source-pane#55. You need to use fetch directly or through a package like solid-file-client.
- .meta can be created on container :
containerName/.meta,
or any document resources exampleimg.png.meta
- .meta are of contentType
text/turtle
. They must have a content representation of text/turtle
- .meta can be created on container :
- yes see 2.
- do you want to have metadata has non rdf resources ? Then nothing is in solid
Hello @bourgeoa, thanks for the prompt reply.
1/2/3:
I wrote a simple script using solid-file-client
to write any arbitrary file at any arbitrary localtion. Anyway, the result is the following (note that the first tree lines are my program's output):
Write the file path of the file you want to upload: ~/Desktop/test.ttl
Write the resource expected location (e.g. public/example.png): public/img.png.meta
... uploading text/turtle; charset=utf-8 file ...
Error SFCFetchError: SFCFetchError 415 https://pimsfsc.solidcommunity.net/public/img.png.meta
at assertResponseOk (webpack://SolidFileClient/./src/utils/errorUtils.js:93:11)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async writeArbitraryBinary (/home/admindin/PIMS.FSC/Experiment.TestSolidServerNode/src/app.ts:136:9)
at async mainMenu (/home/admindin/PIMS.FSC/Experiment.TestSolidServerNode/src/app.ts:42:13)
Error SFCFetchError
Error SFCFetchError 415 https://pimsfsc.solidcommunity.net/public/img.png.meta
I know 415 Error should be 415 Unsupported Media Type
, so I made sure to upload it with the right content type as you suggested, but still the same problem.
Do you think there's something I am missing? As far as I understood it should be the same process of creating standard files, but with a check on the content type to be text/turtle. So I don't know what I am doing wrong.
4:
My apologies, I think there is a misanderstanding: I would like to write rdf metadata for non-rdf resources. I was asking that because since I'm having problems in creating .meta files I thought that the solid implementation I am using was somehow not adherent to the spec.
@FilippoScaramuzza
I did continue my research and it appears that until now (NSS@v5.7.8 the current https://solidcommunity.net implementation .meta are only allowed on container resources.
I think to remember (?) that the spec issue was with .meta.acl on document resources.
CSS allow to use .meta on document resource but not .meta.acl.
If the container /photos/ has a file /photos/image.png, then you can say in /photos/.meta <./image.png> rdfs:label "my pretty picture".
and then when you do a GET on /photos/ the label will be available there.