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
56 changes: 28 additions & 28 deletions main/gpx.bs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## GPX Routes ## {#gpx}

[[GPX]] is a popular XML format that could be used to represent routes. There are two possibilities: to convert the XML format to Turtle or
to embed the XML file as an RDF literal.
[[GPX]] is a popular XML format that could be used to represent routes. There are two possibilities: to convert the XML format to Turtle or
to embed the XML file as an RDF literal.

### GPX Routes converted to Turtle ### {#gpxTurtle}

GPX routes can be represented in Turtle using the following Shape Expression:
GPX routes can be represented in Turtle using the following Shape Expression:

<xmp highlight="turtle">
prefix : <https://www.w3.org/ns/pim/gpx#>
Expand All @@ -14,24 +14,24 @@ prefix gpx: <https://www.w3.org/ns/pim/gpx#>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>


# This document contains a ShEx representation of the XML Schema defined for GPX
# This document contains a ShEx representation of the XML Schema defined for GPX
# The original schema URI is <http://www.topografix.com/GPX/1/1>

start = @:gpxType

# GPX documents contain a metadata header, followed by waypoints, routes, and tracks.
# GPX documents contain a metadata header, followed by waypoints, routes, and tracks.
# You can add your own elements to the extensions section of the GPX document
:gpxType {
gpx:creator xsd:string ? ;
gpx:version xsd:string ? ;
gpx:metadata @:metadataType ? ;
gpx:version xsd:string ? ;
gpx:metadata @:metadataType ? ;
gpx:wpt @:wptType * ;
gpx:rte @:rteType * ;
gpx:trk @:trkType * ;
gpx:extensions @:extensionsType ?
}
}

# Information about the GPX file, author, and copyright restrictions goes in the metadata section.
# Information about the GPX file, author, and copyright restrictions goes in the metadata section.
# Providing rich, meaningful information about your GPX files allows others to search for and use your GPS data.
:metadataType {
gpx:name xsd:string ? ;
Expand Down Expand Up @@ -101,19 +101,19 @@ start = @:gpxType
gpx:trkseg @:trksegType *
}

# Allow any elements from a namespace other than this schema's namespace
# Allow any elements from a namespace other than this schema's namespace
:extensionsType {
}

# A Track Segment holds a list of Track Points which are logically connected in order.
# To represent a single GPS track where GPS reception was lost, or the GPS receiver was turned off,
# A Track Segment holds a list of Track Points which are logically connected in order.
# To represent a single GPS track where GPS reception was lost, or the GPS receiver was turned off,
# start a new Track Segment for each continuous span of track data.
:trksegType {
gpx:trkpts @:wptTypeList * ;
gpx:extensions @:extensionsType ?
gpx:extensions @:extensionsType ?
}

# Information about the copyright holder and any license governing use of this file.
# Information about the copyright holder and any license governing use of this file.
# By linking to an appropriate license, you may place your data into the public domain or grant additional usage rights.
:copyrightType {
gpx:author xsd:string ;
Expand All @@ -125,20 +125,20 @@ start = @:gpxType
:linkType {
gpx:href xsd:anyURI ;
gpx:text xsd:string ? ;
gpx:type xsd:string ?
gpx:type xsd:string ?
}

# An email address. Broken into two parts (id and domain) to help prevent email harvesting.
:emailType {
gpx:id xsd:string ;
gpx:domain xsd:string ;
gpx:domain xsd:string ;
}

# A person or organization.
:personType {
gpx:name xsd:string ? ;
gpx:email @:emailType ;
gpx:link @:linkType
gpx:link @:linkType
}

# A geographic point with optional elevation and time. Available for use by other schemas.
Expand All @@ -160,7 +160,7 @@ start = @:gpxType
gpx:minlat @:latitudeType ;
gpx:minlon @:longitudeType ;
gpx:maxlat @:latitudeType ;
gpx:maxlon @:longitudeType
gpx:maxlon @:longitudeType
}

# The latitude of the point. Decimal degrees, WGS84 datum
Expand All @@ -184,15 +184,15 @@ start = @:gpxType
As an example a VIADE route represented using GPX as Turtle could be:

<xmp highlight="turtle">
prefix : <http://example.org/>
prefix : <http://example.org/>
prefix viade: <http://arquisoft.github.io/viadeSpec/>
prefix schema: <http://schema.org/>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix gpx: <https://www.w3.org/ns/pim/gpx#>

:exampleRoute a viade:Route ;
schema:name "A nice walk" ;
viade:gpx [
viade:gpx [
gpx:creator "Oregon 400t" ;
gpx:version "1.1";
gpx:metadata [ gpx:link [ gpx:href "http://www.garmin.com" ;
Expand All @@ -206,34 +206,34 @@ prefix gpx: <https://www.w3.org/ns/pim/gpx#>
gpx:lon -122.326897 ;
gpx:time "2009-10-17T18:37:26Z"^^xsd:dateTime
] ]
[ gpx:trkpt [
[ gpx:trkpt [
gpx:ele 4.94 ;
gpx:lat 47.644548 ;
gpx:lon -122.326897 ;
gpx:time "2009-10-17T18:37:31Z"^^xsd:dateTime
] ]
[ gpx:trkpt [
[ gpx:trkpt [
gpx:ele 6.87 ;
gpx:lat 47.644548 ;
gpx:lon -122.326897 ;
gpx:time "2009-10-17T18:37:34Z"^^xsd:dateTime
] ]
) ]
]
]
]
.
.
</xmp>



### GPX routes embedded as literals ### {#GPXRoutesAsLiterals}

It is also possible to represent the routes embedding the XML content as an RDF literal.
It is also possible to represent the routes embedding the XML content as an RDF literal.

The following example contains a GPX route embedded as an RDF literal.

<xmp highlight="turtle">
prefix : <http://example.org/>
prefix : <http://example.org/>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix viade: <http://arquisoft.github.io/viadeSpec/>
prefix schema: <http://schema.org/>
Expand Down Expand Up @@ -269,10 +269,10 @@ prefix gpx: <https://www.w3.org/ns/pim/gpx#>
</trk>
</gpx>"""^^rdf:XMLLiteral ;
]
.
.
</xmp>

### GPX to RDF converters ### {#gpx2RDF}

It is possible to convert from GPX files in XML to RDF files in RDF/XML using the
It is possible to convert from GPX files in XML to RDF files in RDF/XML using the
following [XSLT file](https://github.com/Arquisoft/viadeSpec/blob/master/converters/gpx2rdf.xslt)
2 changes: 2 additions & 0 deletions main/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ any feedback, comments, or questions you might have.
<pre class=include>path: dataModel.bs</pre>
<pre class=include>path: gpx.bs</pre>

<pre class=include>path: jsonldProposal/podManagement.bs</pre>

34 changes: 34 additions & 0 deletions main/jsonldProposal/commentExample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"@context": {
"@version": 1.1,
"comments": {
"@container": "@list",
"@id": "viade:comments"
},
"dateCreated": {
"@id": "viade:dateCreated",
"@type": "xsd:date"
},
"text": {
"@id": "viade:text",
"@type": "xsd:string"
},
"viade": "http://arquisoft.github.io/viadeSpec/",
"xsd": "http://www.w3.org/2001/XMLSchema#"
},
"comments": [
{
"text": "This is just a example !!",
"dateCreated": "2004-04-12"
},
{
"text": "This is just a example 3425!!",
"dateCreated": "2005-04-12"
},
{
"text": "This is just a example 2 !!",
"dateCreated": "2006-04-12"
}
]

}
147 changes: 147 additions & 0 deletions main/jsonldProposal/jsonldExample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
{
"@context": {
"@version": 1.1,
"comments": {
"@id": "viade:comments",
"@type": "@id"
},
"description": {
"@id": "schema:description",
"@type": "xsd:string"
},
"media": {
"@container": "@list",
"@id": "viade:media"
},
"name": {
"@id": "schema:name",
"@type": "xsd:string"
},
"points": {
"@container": "@list",
"@id": "viade:points"
},
"latitude": {
"@id": "schema:latitude",
"@type": "xsd:double"
},
"longitude": {
"@id": "schema:longitude",
"@type": "xsd:double"
},
"elevation": {
"@id": "schema:elevation",
"@type": "xsd:double"
},
"author":{
"@id": "schema:author",
"@type": "@id"
},
"date": {
"@id": "schema:DateTime",
"@type": "xsd:dateTime"
},
"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#"
},
"name": "Route test 1",
"author": "https://luispresacollada.solid.community/profile/card#me",
"description": "This is a test to see the output of the JsonLDConversor",
"comments": "http://inrupt.luispc1998/viade/comments/routeComments/commentExample.json",
"date": "2020-02-25T18:50:22Z",
"media": [
{
"@id": "http://inrupt.luispc1998/viade/resources/da34fas749sa3h883j.jpg",
"name": "MyFoto"
},
{
"@id": "http://inrupt.angelixus/viade/resources/pt92as74234a3h5xb3j.mp4",
"name": "MyVideo"
},
{
"@id": "http://inrupt.raupemol/viade/resources/da34zas4213sa7b542.png",
"name": "OtherFoto"
},
{
"@id": "http://inrupt.luispc1998/viade/resources/da345432jtsa7b542e.mp4",
"name": "OtherVideo"
}
],
"waypoints" : [
{
"name": "Name for the waypoint",
"description": "Description of the waypoint",
"latitude": 45.123,
"longitude": 34.121,
"elevation": 34
},
{
"name": "Computer Science School",
"description": "Become a good engineer with us",
"latitude": 45.123,
"longitude": 34.121,
"elevation": 34
}

],
"points": [
{
"latitude": 45.123,
"longitude": 34.121,
"elevation": 34
},
{
"latitude": 46.123,
"longitude": 34.121,
"elevation": 36
},
{
"latitude": 47.123,
"longitude": 34,
"elevation": 39
},
{
"latitude": 48.123,
"longitude": 32.121,
"elevation": 40
},
{
"latitude": 49.123,
"longitude": 34.121,
"elevation": 43
},
{
"latitude": 40.123,
"longitude": 32.121,
"elevation": 46
},
{
"latitude": 50.123,
"longitude": 33.121,
"elevation": 50
},
{
"latitude": 53.123,
"longitude": 34.121,
"elevation": 55
},
{
"latitude": 54.123,
"longitude": 34.121,
"elevation": 56
},
{
"latitude": 55.123,
"longitude": 35.121,
"elevation": 50
},
{
"latitude": 55.123,
"longitude": 34.121,
"elevation": 45
}
]
}
Loading