What is a .meta on NSS?


#1

Is .meta discussed in any spec? I haven’t seen it. One can’t do a GET on them. Are they even files in NSS, or are they something else? Do they get created automatically when a new resource is POSTed or PUT? Or are they created on-the-fly when needed?

I am asking in relation to recursiveCopy - should it be copying .meta files from the source to the destination?


#2

Here is the spec I found about it: https://github.com/solid/solid-spec/blob/master/content-representation.md#metadata

And there are some issues regarding it too: https://github.com/solid/solid-spec/search?q=.meta&type=Issues

But I am not sure if that answers your question. I believe it should be copied, as it contains relevant and specific information about this resource:

“The metadata (extra RDF triples such as types, titles, comments, and so on) about non-RDF resources (e.g. containers, images, binaries, etc.) will be stored in a corresponding meta resource.”

I don’t think this information is automatically created by the server (except for some defaults maybe), so I would copy it too if possible.


#3

Ah great, thanks for the link to the spec. Here’s the rub though - since I can’t do a GET on them, how can I copy them? :slightly_smiling_face:


#4

For example:

const auth = require('solid-auth-cli')
const file = 'https://jeffz.solid.community/public/likes.ttl.meta'

async function run(){
    await auth.login()
    await auth.fetch(file,{
        method:"PUT",
        body:"<> a <#test>.",
        contentType:"text/turtle"
    }).catch(e=>{console.log("Error : "+e)})
    let response = await auth.fetch(file).catch(e=>{console.log("Error : "+e)})
    console.log(response.status +" "+ response.statusText)
    console.log(await response.text())
}
run()
/* output :                                                                               
404 Not Found                                                                             
Trying to access metadata file as regular file                                            
*/

#5

I don’t know if copying is possible. I think this issue would answer it, but hasn’t been updated in the last two weeks: https://github.com/solid/solid-spec/issues/168


#6

This https://github.com/solid/solid-spec/issues/10 seems to give some clue how .ACL and .meta are accessible through HEADER with the same mechanism using IANA ontology to find the URI (acl or describedBy) and then if it exist you can copy it.

When copying from one pod to an other you must find in the destination HEADER the destination link that can be different from the source (depending from the implementation mechanism)


#7

Yes I can easily read the header. The problem is that a GET does not work.


#8

I can access .meta and .acl with solid-ide in the same way through the Url, but only if it exists and then edit them.
.meta and .acl works in the same way.

  • if the ressource do not exist it returns 404 error.
  • if exist you should be able to copy it

From trials, errors and access to the filesystem :

  • .meta ressource are automatically created when creating a folder with solid-ide then you can edit it with the about UI databrowser.
  • I did not find a way to create .meta for file ressources

nota : when creating a folder with the databrowser UI .meta are not created. What are the differences ???


#9

It appears that for folder .meta content appears in the turtle representation of the folder :

@prefix : <#>.
@prefix tes: <>.
@prefix ldp: <http://www.w3.org/ns/ldp#>.
@prefix terms: <http://purl.org/dc/terms/>.
@prefix XML: <http://www.w3.org/2001/XMLSchema#>.
@prefix st: <http://www.w3.org/ns/posix/stat#>.

tes:
    a ldp:BasicContainer, ldp:Container, :test;                **as you can see here with .meta content "<> a <#test>."**
    terms:modified "2019-05-24T08:27:31Z"^^XML:dateTime;
    st:mtime 1558686451.259;
    st:size 4096.

#10

Hmm, that is very interesting about putting the .meta in the folder’s turtle file. What produced that? a PUT on folder.meta?


#11

I suppose that is what the about edit function from the databrowser UI does.