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

Define footprints for Viade folder structure #27

Open
labra opened this issue Mar 24, 2020 · 3 comments
Open

Define footprints for Viade folder structure #27

labra opened this issue Mar 24, 2020 · 3 comments

Comments

@labra
Copy link
Contributor

labra commented Mar 24, 2020

Given that there is some interest in definig a common structure for the viade folders, maybe we could consider defining the structure using footprints. Here is a blog post the justifies the need for footprints and shapes.

There is a draft introduction to footprints here and a formal specification here.

@UO264345
Copy link

Following the suggestions of @luispc1998 and @christianpe98 in #4, I've created a possible structure for our folders (in JSON-LD and Turtle formats):

{   "@context": {
        "ldp": "http://www.w3.org/ns/ldp#",
        "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
        "foot": "http://www.w3.org/ns/footprints#",
        "solid": "http://www.w3.org/ns/solid/terms#",
    
        "type": { "@id": "foot:type", "@type": "@id" },
        "contents": "foot:contents",
        "uriTemplate": "foot:uriTemplate",
        "shape": { "@id": "foot:shape", "@type": "@id" }
    },
    "@id":"#root",        "type":"ldp:BasicContainer", "contents":[
    {           "@id":"#viade",     "type":"ldp:BasicContainer", "contents":[
        {       "@id":"#routes",    "type":"ldp:BasicContainer", "contents":[
            {   "@id":"#route",     "type":"ldp:Resource",          "uriTemplate":"{routeName}",            "shape":"ViadeSpec#Route"
            }]
        },{     "@id":"#comments",  "type":"ldp:BasicContainer", "contents":[
            {   "@id":"#comment",   "type":"ldp:Resource",          "uriTemplate":"comment-{NoComment}",    "shape":"ViadeSpec#UserComment"
            }]
        },{     "@id":"#resources", "type":"ldp:BasicContainer", "contents":[
            {   "@id":"#image",     "type":"ldp:BinaryResource",    "uriTemplate":"ref-{imageName}",        "shape":"ViadeSpec#Image"
            },{ "@id":"#video",     "type":"ldp:BinaryResource",    "uriTemplate":"ref-{videoName}",        "shape":"ViadeSpec#Video"
            }]
        },{     "@id":"#inbox",     "type":"ldp:inbox", "contents": [
            {   "@id":"#notif",     "type":"solid:notification"
            }]
        }]
    }]
}
@prefix foot: <http://www.w3.org/ns/footprints#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ldp: <http://www.w3.org/ns/ldp#> .
@prefix solid: <http://www.w3.org/ns/solid/terms#> .

<#root> a ldp:BasicContainer ;
    foot:contents <#viade> .

<#viade> a ldp:BasicContainer ;
    foot:contents <#routes> .

<#routes> a ldp:BasicContainer ;
    foot:contents <#route> .

<#route> a ldp:Resource ;
    foot:uriTemplate "{routeName}" ;
    foot:shape "ViadeSpec#Route" .

<#comments> a ldp:BasicContainer ;
    foot:contents <#comment> .

<#comment> a ldp:Resource ;
    foot:uriTemplate "comment-{NoComment}" ;
    foot:shape "ViadeSpec#UserComment" .

<#resources> a ldp:BasicContainer ;
    foot:contents <#image> ;
    foot:contents <#video> .

<#image> a ldp:BinaryResource ;
    foot:uriTemplate "ref-{imageName}" ;
    foot:shape "ViadeSpec#Image" .

<#video> a ldp:BinaryResource ;
    foot:uriTemplate "ref-{videoName}" ;
    foot:shape "ViadeSpec#Video" .

<#inbox> a ldp:inbox ;
    foot:contents <#notif> .

<#notif> a solid:notification .

I'm taking into account that there exists a ViadeSpec shape; the #root subject is the root of the POD, but this can be changed. Also, there may be errors, so if there's any point them out, please.

@christianpe98
Copy link

Hello Andres!! thank you very much for taking everything into consideration. Right now we are discussing how to share the routes(#34 ), where to store the URIs of the shared routes and all that... So I think it would be better to set up the package structure without the inbox folder inside viade and in the future update the package structure when we have decided how to share the routes.

@UO264345
Copy link

UO264345 commented Apr 1, 2020

For sure! I'll keep it on hold until further notice. Just so we have the footprints without taking into account the inbox folder, in case anyone wants them, here they are:

{   "@context": {
        "ldp": "http://www.w3.org/ns/ldp#",
        "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
        "foot": "http://www.w3.org/ns/footprints#",
    
        "type": { "@id": "foot:type", "@type": "@id" },
        "contents": "foot:contents",
        "uriTemplate": "foot:uriTemplate",
        "shape": { "@id": "foot:shape", "@type": "@id" }
    },
    "@id":"#root",        "type":"ldp:BasicContainer", "contents":[
    {           "@id":"#viade",     "type":"ldp:BasicContainer", "contents":[
        {       "@id":"#routes",    "type":"ldp:BasicContainer", "contents":[
            {   "@id":"#route",     "type":"ldp:Resource",          "uriTemplate":"{routeName}",            "shape":"ViadeSpec#Route"
            }]
        },{     "@id":"#comments",  "type":"ldp:BasicContainer", "contents":[
            {   "@id":"#comment",   "type":"ldp:Resource",          "uriTemplate":"comment-{NoComment}",    "shape":"ViadeSpec#UserComment"
            }]
        },{     "@id":"#resources", "type":"ldp:BasicContainer", "contents":[
            {   "@id":"#image",     "type":"ldp:BinaryResource",    "uriTemplate":"ref-{imageName}",        "shape":"ViadeSpec#Image"
            },{ "@id":"#video",     "type":"ldp:BinaryResource",    "uriTemplate":"ref-{videoName}",        "shape":"ViadeSpec#Video"
            }]
        }]
    }]
}
@prefix foot: <http://www.w3.org/ns/footprints#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ldp: <http://www.w3.org/ns/ldp#> .

<#root> a ldp:BasicContainer ;
    foot:contents <#viade> .

<#viade> a ldp:BasicContainer ;
    foot:contents <#routes> .

<#routes> a ldp:BasicContainer ;
    foot:contents <#route> .

<#route> a ldp:Resource ;
    foot:uriTemplate "{routeName}" ;
    foot:shape "ViadeSpec#Route" .

<#comments> a ldp:BasicContainer ;
    foot:contents <#comment> .

<#comment> a ldp:Resource ;
    foot:uriTemplate "comment-{NoComment}" ;
    foot:shape "ViadeSpec#UserComment" .

<#resources> a ldp:BasicContainer ;
    foot:contents <#image> ;
    foot:contents <#video> .

<#image> a ldp:BinaryResource ;
    foot:uriTemplate "ref-{imageName}" ;
    foot:shape "ViadeSpec#Image" .

<#video> a ldp:BinaryResource ;
    foot:uriTemplate "ref-{videoName}" ;
    foot:shape "ViadeSpec#Video" .

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