Skip to content

Commit 1279d89

Browse files
Follow order of tools in UI
1 parent 71f703d commit 1279d89

1 file changed

Lines changed: 74 additions & 36 deletions

File tree

Documentation/conventions.md

Lines changed: 74 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
# Data Shapes
2-
## Prefixes used:
1+
# Data Conventions used by the databrowser
2+
This document describes how the databrowser stores your data as triples in RDF documents on your pod.
3+
As most Solid pods will have at least some data on them that was edited through the databrowser,
4+
these conventions are a good place to start when you develop third-party apps. In the future, we'll
5+
see how this document can grow into a bigger participatory wiki of data shape conventions for Solid.
6+
7+
For short-hand, we will use the following namespace prefixes here:
8+
39
* @prefix ab: <http://www.w3.org/ns/pim/ab#>.
410
* @prefix acl: <http://www.w3.org/ns/auth/acl#>.
511
* @prefix dc: <http://purl.org/dc/elements/1.1/>.
@@ -13,32 +19,13 @@
1319
* @prefix schema: <http://schema.org/>.
1420
* @prefix sioc: <http://rdfs.org/sioc/ns#>.
1521
* @prefix solid: <http://www.w3.org/ns/solid/terms#>.
22+
* @prefix sioc: <http://rdfs.org/sioc/ns#>.
23+
* @prefix stat <http://www.w3.org/ns/posix/stat#>.
1624
* @prefix ui: <http://www.w3.org/ns/ui#>.
1725
* @prefix vcard: <http://www.w3.org/2006/vcard/ns#>.
1826
* @prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
1927

20-
## Addressbook
21-
22-
You can create an addressbook containing persons and groups, by adding triples to RDF documents on your pod.
23-
To create an addressbook, create a document for it, e.g. /address-book/index.ttl, and add the following triples to that document:
24-
* </address-book/index.ttl#this> a vcard:AddressBook
25-
* </address-book/index.ttl#this> dc:title "New address Book"
26-
* </address-book/index.ttl#this> acl:owner </profile/card#me>
27-
28-
You can create separate documents for the people index and for the groups index, as long as you link to those from the main /address-book/index.ttl document in the following ways:
29-
* </address-book/index.ttl#this> vcard:nameEmailIndex </address-book/peopleIndex.ttl>
30-
* </address-book/index.ttl#this> vcard:groupIndex </address-book/groupIndex.ttl>
31-
32-
To indicate that a person /johnDoe.ttl with full name "John Doe" is in addressbook /address-book/index.ttl, add the following triples:
33-
* </johnDoe.ttl#this> vcard:inAddressBook /address-book/index.ttl#this (NB: needs to be in /address-book/peopleIndex.ttl)
34-
* </johnDoe.ttl#this> a vcard:Individual
35-
* </johnDoe.ttl#this> vcard:fn "John Doe"
36-
37-
To indicate that addressbook /address-book/index.ttl has a group called "Colleagues", add the following triples:
38-
39-
* </address-book/index.ttl#this> vcard:includesGroup /address-book/colleagues.ttl#this (NB: needs to be in /address-book/groupIndex.ttl)
40-
* </address-book/colleagues.ttl#this> a vcard:Group
41-
* </address-book/colleagues.ttl#this> vcard:fn "Colleagues"
28+
One of the most important RDF documents on your pod is your profile, which is the document that people get when they dereference your webid. We'll look at that first. After that, we'll look at each of the tools that can be created with the databrowser's + button: Addressbook, Notepad, Chat, LongChat, Meeting, Event, Link, Document, Folder, and Source.
4229

4330
## Profile
4431
### Profile document
@@ -65,21 +52,29 @@ To publish some of your generic preferences to apps, use:
6552
* </profile/card#me> solid:publicTypeIndex </settings/publicTypeIndex.ttl>
6653
* </profile/card#me> solid:privateTypeIndex </settings/privateTypeIndex.ttl>
6754

68-
# Chat
69-
To create a chat conversation, create a document, e.g. /chat.ttl, and add the following triples to it:
70-
* </chat.ttl#this> a mee:LongChat
71-
* </chat.ttl#this> dc:author </profile/card#me>
72-
* </chat.ttl#this> dc:created "2018-07-06T21:36:04Z"^^XML:dateTime
73-
* </chat.ttl#this> dc:title "Chat channel"
55+
## Addressbook
56+
You can create an addressbook containing persons and groups, by adding triples to RDF documents on your pod.
57+
To create an addressbook, create a document for it, e.g. /address-book/index.ttl, and add the following triples to that document:
58+
* </address-book/index.ttl#this> a vcard:AddressBook
59+
* </address-book/index.ttl#this> dc:title "New address Book"
60+
* </address-book/index.ttl#this> acl:owner </profile/card#me>
7461

75-
To add a message in the chat conversation, for instance where you say "hi", generate a timestamp like 1555487418787 and add the following triples to /chat.ttl:
76-
* </chat.ttl#Msg1555487418787> dct:created "2019-04-17T07:50:18Z"^^XML:dateTime
77-
* </chat.ttl#Msg1555487418787> sioc:content "hi"
78-
* </chat.ttl#Msg1555487418787> foaf:maker </profile/card#me>
62+
You can create separate documents for the people index and for the groups index, as long as you link to those from the main /address-book/index.ttl document in the following ways:
63+
* </address-book/index.ttl#this> vcard:nameEmailIndex </address-book/peopleIndex.ttl>
64+
* </address-book/index.ttl#this> vcard:groupIndex </address-book/groupIndex.ttl>
7965

80-
Note that for historical reasons, for the chat conversation as a whole, we use `dc:created` and `dc:author`, whereas for the individual chat messages we use `dct:created` and `foaf:maker`.
66+
To indicate that a person /johnDoe.ttl with full name "John Doe" is in addressbook /address-book/index.ttl, add the following triples:
67+
* </johnDoe.ttl#this> vcard:inAddressBook /address-book/index.ttl#this (NB: needs to be in /address-book/peopleIndex.ttl)
68+
* </johnDoe.ttl#this> a vcard:Individual
69+
* </johnDoe.ttl#this> vcard:fn "John Doe"
70+
71+
To indicate that addressbook /address-book/index.ttl has a group called "Colleagues", add the following triples:
8172

82-
# Notepad
73+
* </address-book/index.ttl#this> vcard:includesGroup /address-book/colleagues.ttl#this (NB: needs to be in /address-book/groupIndex.ttl)
74+
* </address-book/colleagues.ttl#this> a vcard:Group
75+
* </address-book/colleagues.ttl#this> vcard:fn "Colleagues"
76+
77+
## Notepad
8378
To create a new notepad at /notepad.ttl, add the following triples into it:
8479
* </notepad.ttl#this> a pim:Notepad
8580
* </notepad.ttl#this> dc:author </profile/card#me>
@@ -128,3 +123,46 @@ Note that the first line still is the only line in the document, apart from the
128123
* </notepad.ttl#id1555489499814> dc:author </profile/card#me>
129124
* </notepad.ttl#id1555489499814> dc:content "second line"
130125
* </notepad.ttl#id1555489499814> pim:next :</notepad.ttl#this>
126+
127+
## Chat
128+
To create a chat conversation, create a document, e.g. /chat.ttl, and add the following triples to it:
129+
* </chat.ttl#this> a mee:LongChat
130+
* </chat.ttl#this> dc:author </profile/card#me>
131+
* </chat.ttl#this> dc:created "2018-07-06T21:36:04Z"^^XML:dateTime
132+
* </chat.ttl#this> dc:title "Chat channel"
133+
134+
To add a message in the chat conversation, for instance where you say "hi", generate a timestamp like 1555487418787 and add the following triples to /chat.ttl:
135+
* </chat.ttl#Msg1555487418787> dct:created "2019-04-17T07:50:18Z"^^XML:dateTime
136+
* </chat.ttl#Msg1555487418787> sioc:content "hi"
137+
* </chat.ttl#Msg1555487418787> foaf:maker </profile/card#me>
138+
139+
Note that for historical reasons, for the chat conversation as a whole, we use `dc:created` and `dc:author`, whereas for the individual chat messages we use `dct:created` and `foaf:maker`.
140+
141+
## LongChat
142+
// TODO
143+
144+
## Meeting
145+
// TODO
146+
147+
## Event
148+
// TODO
149+
150+
## Link
151+
// TODO
152+
153+
## Document
154+
// TODO
155+
156+
## Folder
157+
When you add a 'Folder' tool, the databrowser creates a new LDP container. As an example, here are the triples that describe an LDP container '/foo/' with subcontainer '/foo/sub/' and member document '/foo/bar.ttl':
158+
* </foo/> a ldp:BasicContainer
159+
* </foo/> a ldp:Container
160+
* </foo/> a ldp:Resource
161+
* </foo/> dct:modified "2019-04-17T08:42:16Z"^^XML:dateTime
162+
* </foo/> stat:mtime 1555490536.16
163+
* </foo/> stat:size 4096
164+
* </foo/> ldp:contains </foo/sub/>
165+
* </foo/> ldp:contains </foo/bar.ttl>
166+
167+
## Source
168+
When you add a 'Source' tool to a container, it creates an empty document as an LDP resource. The content type will be guessed from the extension, for instance source.ttl will be a Turtle document, source.txt will be text/plain, etc.

0 commit comments

Comments
 (0)