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

Proposal of POD Management #21

Merged
merged 12 commits into from
Apr 16, 2020
115 changes: 115 additions & 0 deletions main/jsonldExample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
{
"@context": {
"@version": 1.1,
"comments": {
"@container": "@list",
"@id": "viade:comments"
},
"description": {
"@id": "schema:description",
"@type": "xs:string"
},
"media": {
"@container": "@list",
"@id": "viade:media"
},
"name": {
"@id": "schema:name",
"@type": "xs:string"
},
"points": {
"@container": "@list",
"@id": "viade:points"
},
"latitude": {
"@id": "schema:latitude",
"@type": "xs:double"
},
"longitude": {
"@id": "schema:longitude",
"@type": "xs:double"
},

"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "http://schema.org/",
"viade": "http://arquisoft.github.io/viadeSpec/",
"xsd": "http://www.w3.org/2001/XMLSchema#"
},
"comments": [
{
"@id": "http://inrupt.luispc1998/routeComments/comment1.txt"
},
{
"@id": "http://inrupt.angelixus/routeComments/comment2.txt"
},
{
"@id": "http://inrupt.raupemol/routeComments/comment3.txt"
},
{
"@id": "http://inrupt.luispc1998/routeComments/comment4.txt"
}
],
"description": "This is a test to see the output of the JsonLDConversor",
"media": [
{
"@id": "http://inrupt.luispc1998/routeMedia/image/imagen.jpg"
},
{
"@id": "http://inrupt.angelixus/routeMedia/image/video.mp4"
},
{
"@id": "http://inrupt.raupemol/routeMedia/video/foto.png"
},
{
"@id": "http://inrupt.luispc1998/routeMedia/video/video3.mp4"
}
],
"name": "Route test 1",
"points": [
{
"latitude": 45.123,
"longitude": 34.121
},
{
"latitude": 46.123,
"longitude": 34.121
},
{
"latitude": 47.123,
"longitude": 34.121
},
{
"latitude": 48.123,
"longitude": 32.121
},
{
"latitude": 49.123,
"longitude": 34.121
},
{
"latitude": 40.123,
"longitude": 32.121
},
{
"latitude": 50.123,
"longitude": 33.121
},
{
"latitude": 53.123,
"longitude": 34.121
},
{
"latitude": 54.123,
"longitude": 34.121
},
{
"latitude": 55.123,
"longitude": 35.121
},
{
"latitude": 55.123,
"longitude": 34.121
}
]
}
68 changes: 68 additions & 0 deletions main/podManagement.bs
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
Pod Management {#intro}
=====================

It is crucial for the interoperability that we handle the POD data in the same way. Here is a proposal of what we can do. Note that this pretends to be an
starting point to the complete specification, and so it is open to discussion.

## File format ##
For the file format we can use JSON-LD, we have used JSON along the degree and we are very familiar with it,
it won't be a problem to handle that in the application, in fact Javascript facilitates that task with the built-in object "JSON".


### File example ###
What comes next is an example of the **minimum** data that should be stored in the pod with the JSON-LD. More data could be added by our apps,
but at least this should be there.

_If the minimun data is wanted to be modified, for instance adding "Elevation" to the points, which would be something
quite common, then follow the repo rules to propose a change._

In the example provided, a route has name, description, points, comments and resources. Those two are references, since they may be in other PODs.

The example (if any error is seen in the context, please point it out):

_If it cannot be seen in the include please check it manually because afterwards there will be mentions about it._
<pre class="include">path: jsonldExample.json</pre>

## Directory hierarchy in the POD ##
Not only we need to state what information should be in the pod, but also where it is located.

We proposed a "viade" folder in the root of the pod, and inside it three folders: routes, comments, resources. This could be more visual.

<pre>

viade/

routes/

example.jsonld
example2.jsonld

comments/

comment1.txt
comment2.txt

resources/

foto.jpg
image.png
video.mp4

</pre>

### Comments and resources ###
These two are thought to be in the pod of the user that truly owns them, therefore, a user will have in its pod comments and resources that will
be referenced from other routes (it is a graph, the file will be in many places)

We are considering two different folders even though they are just references because the way we would treat them, we may even not display those two groups
at the same time.

## How to share ##
The simplest idea for this seems to handle the permissions of the route files and when sharing a route give the "reciever" permissions to read the route file.

## What should be done about GPX? #
A gpx file can contain several elements "trk" which are the ones that match our concept of "Route", that is a path, a sequence of points. Inside this label we can have
several "tkrseg", which stand as sequences of oredered points (trkpt). Our duty will be to take all the tkrpt and put them inside the "viade:points" property of the example json.

The gpx trk label can have a name and a description so it could be direct translation. Or we may want the user to introduce that data, that's an app design decision.