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 for a route standard #3

Merged
merged 2 commits into from
Feb 28, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 50 additions & 2 deletions main/introduction.bs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,55 @@ that reads or writes data from one or more [=data pods=].

## Data model ## {#dataModel}

To be done.
A **route** must contain a name, optionally it can have a description.
Its composed by at least one GeoCoordinate and may or not have a list of comments and media elements.

Issue: Define data model
The **GeoCoordinates** must have latitude and longitude. They can have as optional properties a name, altitude and a physical address.

A **UserComment** must contain the text of the comment, the time it was published and the author, being the last one a IRI to a pod profile shape.

And finally, an **Image** or a **Video** must have an IRI to te resource, another IRI to the pod profile of the author and the time it was published.

<pre><code>
PREFIX : <http://example.org/>
PREFIX schema: <http://schema.org/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

# Node Constraint
:Route {
# Triple constraint
schema:name xsd:string ;
schema:description xsd:string? ;
schema:containsGeoPoint IRI @:GeoCoordinates+;
schema:hasComments IRI @:UserComment*;
schema:hasMediaAttached [IRI @:Image IRI @:Video]*;
}

:GeoCoordinates {
schema:name xsd:string? ;
schema:address xsd:string? ;
schema:elevation xsd:integer? ;
schema:latitude xsd:float ;
schema:longitude xsd:float ;
schema:position xsd:integer ;
}

:UserComment {
schema:text xsd:string;
schema:publishedDate xsd:datetime;
schema:author URI @:PodProfile;
}

:Image {
schema:contentUrl IRI;
schema:publishedDate xsd:datetime;
schema:author URI @:PodProfile;
}

:Video {
schema:contentUrl IRI;
schema:publishedDate xsd:datetime;
schema:author URI @:PodProfile;
}
</code></pre>