forked from catalyst-fp7/ontology
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.trig
313 lines (243 loc) · 10.9 KB
/
example.trig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix trig: <http://www.w3.org/2004/03/trix/rdfg-1/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix sioc: <http://rdfs.org/sioc/ns#> .
@prefix oa: <http://www.openannotation.org/ns/> .
@prefix idea: <http://purl.org/catalyst/idea#> .
@prefix ibis: <http://purl.org/catalyst/ibis#> .
@prefix catalyst: <http://purl.org/catalyst/core#> .
@prefix assembl: <http://purl.org/assembl/core#> .
@prefix version: <http://purl.org/catalyst/version#> .
@prefix vote: <http://purl.org/catalyst/vote#> .
@prefix eg_site: <http://www.assembl.net/> .
@prefix eg_d1: <http://www.assembl.net/discussion/1/> .
# A site, with a forum and a user.
<http://www.assembl.net/> a catalyst:Site ;
sioc:space_of <http://www.assembl.net/discussion/1/>;
sioc:host_of eg_d1:forum.
<http://www.assembl.net/> catalyst:user_graph <http://www.assembl.net/users/>.
<http://www.assembl.net/users/> = {
eg_site:agent_benoitg a foaf:Person;
foaf:familyName "Grégoire";
foaf:firstName "Benoît".
eg_site:agent_maparent a foaf:Person;
foaf:familyName "Marc-Antoine";
foaf:firstName "Parent".
eg_site:user_maparent a sioc:UserAccount;
sioc:account_of eg_site:agent_maparent;
sioc:email "[email protected]".
eg_site:user_benoitg a sioc:UserAccount;
sioc:account_of eg_site:agent_benoitg;
sioc:email "[email protected]".
}
<http://www.assembl.net/discussion/1/> a catalyst:Conversation, trig:Graph.
# To a non-catalyst-aware tool, this is a sioc:Container and sioc:Space.
# The history graph
# History
<http://www.assembl.net/discussion/1/archive> = {
eg_d1:event1
a version:Create;
version:what eg_d1:message_1;
version:who eg_d1:account_262d2e2ecb6696c0bfdc482ac6273b5b88c56ed2;
version:revision "0"^^xsd:integer;
version:when "2013-11-01T09:00:04"^^xsd:dateTime;
version:snapshot [
a sioc:Post, version:ObjectSnapshot ;
dcterms:created "2013-11-01T09:00:04"^^xsd:dateTime;
dcterms:title "Climate change is a problem"@en;
sioc:content """Let's do something draft placeholder"""@en;
sioc:has_creator eg_d1:account_262d2e2ecb6696c0bfdc482ac6273b5b88c56ed2;
sioc:has_container eg_d1:forum;
version:snapshot_of eg_d1:message_1
].
eg_d1:event2
a version:Update;
version:what eg_d1:message_1;
version:who eg_d1:account_262d2e2ecb6696c0bfdc482ac6273b5b88c56ed2;
version:revision "1"^^xsd:integer;
version:when "2013-11-01T09:12:15"^^xsd:dateTime;
version:updated_value [
a rdf:Statement;
rdf:subject eg_d1:message_1;
rdf:predicate dcterms:title;
rdf:object "Climate change is a real problem"@en
];
version:updated_value [
a rdf:Statement;
rdf:subject eg_d1:message_1;
rdf:predicate sioc:content;
rdf:object "We need to reduce CO2 levels."@en
].
eg_d1:event3
a version:ReadStatusChange;
version:who eg_d1:account_6e5902d716fa578590a0b987c6e82a0249688e36;
version:what eg_d1:message_1;
version:revision "2"^^xsd:integer;
version:when "2013-11-02T11:00:01"^^xsd:dateTime.
eg_d1:event4
a version:Delete;
version:who eg_d1:account_262d2e2ecb6696c0bfdc482ac6273b5b88c56ed2;
version:what eg_d1:message_1;
version:revision "3"^^xsd:integer;
version:when "2013-11-03T11:00:01"^^xsd:dateTime;
version:tombstone [
a sioc:Post, version:Tombstone ;
dcterms:created "2013-11-01T09:00:04"^^xsd:dateTime;
dcterms:title "Climate change is a real problem"@en;
sioc:content """We need to reduce CO2 levels."""@en;
sioc:has_creator eg_d1:account_262d2e2ecb6696c0bfdc482ac6273b5b88c56ed2;
sioc:has_container eg_d1:forum;
version:snapshot_of eg_d1:message_1
].
}
# This is the main graph
<http://www.assembl.net/discussion/1/> = {
<http://www.assembl.net/discussion/1/>
dcterms:hasPart eg_d1:forum;
catalyst:participants eg_d1:d1_participants;
catalyst:uses_source eg_d1:mailingList1;
catalyst:history_graph <http://www.assembl.net/discussion/1/archive>;
catalyst:primaryMap <http://www.assembl.net/discussion/1/>.
eg_d1:forum a sioc:Forum ;
dcterms:isPartOf <http://www.assembl.net/discussion/1/> .
eg_d1:d1_participants a catalyst:Participants;
sioc:has_member eg_d1:account_6e5902d716fa578590a0b987c6e82a0249688e36,
eg_d1:account_262d2e2ecb6696c0bfdc482ac6273b5b88c56ed2.
eg_d1:person_c371ca84d91eb13f3ea610855d417db0a13dd082 a foaf:Person.
eg_d1:account_6e5902d716fa578590a0b987c6e82a0249688e36 a sioc:UserAccount;
sioc:account_of eg_d1:person_c371ca84d91eb13f3ea610855d417db0a13dd082.
eg_d1:person_c371ca84d91eb13f3ea610855d417db0a13dd082 a foaf:Person.
eg_d1:account_262d2e2ecb6696c0bfdc482ac6273b5b88c56ed2 a sioc:UserAccount;
sioc:account_of eg_d1:person_c371ca84d91eb13f3ea610855d417db0a13dd082.
eg_d1:d1_member a sioc:Role;
sioc:has_scope <http://www.assembl.net/discussion/1/> .
eg_d1:d1_mailingList1 a assembl:MailingList, sioc:Space.
# A post
eg_d1:message_1 a sioc:Post ;
dcterms:created "2013-11-01T09:00:04"^^xsd:dateTime;
dcterms:title "Climate change is a real problem"@en;
sioc:content """We need to reduce CO2 levels."""@en;
sioc:has_creator eg_d1:account_262d2e2ecb6696c0bfdc482ac6273b5b88c56ed2;
sioc:addressed_to "[email protected]";
sioc:has_container eg_d1:forum;
assembl:has_origin eg_d1:d1_mailingList1.
eg_d1:message_2 a sioc:Post ;
dcterms:title "Telecommuting might help"@en;
sioc:has_creator eg_d1:account_6e5902d716fa578590a0b987c6e82a0249688e36;
sioc:addressed_to eg_d1:account_262d2e2ecb6696c0bfdc482ac6273b5b88c56ed2;
sioc:has_container eg_d1:forum;
assembl:has_origin eg_d1:d1_mailingList1;
sioc:reply_of eg_d1:message_1.
# Annotating a whole web page without subparts: URL as target.
eg_d1:annotations_1 a oa:Annotation;
oa:hasTarget <http://example.com/some/web/page.html>;
oa:hasBody eg_site:annotation_1_target.
## It is good manners to give extra information about the target.
<http://example.com/some/web/page.html> dcterms:format "text/html";
dcterms:language "eng".
## In our case, the body is always a subgraph
eg_site:annotation_1_target a trig:Graph.
## expressing the relationship between the target and the idea happens in a subgraph (at the end of the file)
# Annotating text from a Web page: Using a ID selector
## From http://www.openannotation.org/spec/core/specific.html#Selectors
eg_d1:annotations_2 a oa:Annotation;
oa:hasTarget eg_d1:extracts_2;
oa:hasBody eg_site:annotation_2_target.
## The target being a subpart, it is ""
eg_d1:extracts_2 a oa:SpecificResource;
oa:hasSource <http://example.com/some/web/page.html>;
oa:hasSelector [
a oa:FragmentSelector;
dcterms:conformsTo <http://tools.ietf.org/rfc/rfc3236>;
rdf:value "#some_idref"
].
eg_site:annotation_2_target a trig:Graph.
# Annotating text from a Web page: Using a XPointer selector
eg_d1:annotations_3 a oa:Annotation;
oa:hasTarget eg_d1:extracts_3;
oa:hasBody eg_site:annotation_3_target.
eg_d1:extracts_3 a oa:SpecificResource;
oa:hasSource <http://example.com/some/other/web/page.html>;
oa:hasSelector [
a oa:FragmentSelector;
dcterms:conformsTo <http://tools.ietf.org/rfc/rfc3023>;
rdf:value "#xpointer(start-point(string-range(//BODY/DIV[1]/DIV[1]/DIV[2]/DIV[2]/DIV[2]/DIV[3]/text()[11],'',26))/range-to(string-range(//BODY/DIV[1]/DIV[1]/DIV[2]/DIV[2]/DIV[2]/DIV[3]/text()[11],'',41)))"
].
eg_site:annotation_3_target a trig:Graph.
# Annotating text from a snippet: Using a text position selector inside a message object
eg_d1:annotations_4 a oa:Annotation;
oa:hasTarget eg_d1:extracts_4;
oa:hasBody eg_site:annotation_4_target.
eg_d1:extracts_4 a oa:SpecificResource;
oa:hasSource eg_d1:message_1;
oa:hasSelector [
a oa:TextPositionSelector;
oa:start "18"^^xsd:integer;
oa:end "28"^^xsd:integer;
oa:exact "CO2 levels"@en
].
eg_site:annotation_4_target a trig:Graph.
# NOTE : We may also add the triple directly to the graph, even if that is not in the
# Note 2: We could have the following rule:
# sioc:embeds_knowledge owl:propertyChainAxiom ([owl:inverse-of oa:hasSource] [owl:inverse-of oa:hasTarget] oa:hasBody)
# and deduce eg_d1:message_1 sioc:embeds_knowledge eg_site:annotation_4_target.
# A few ideas.
eg_d1:idea_1 a ibis:Issue;
dcterms:title "Stop climate change"@en;
dcterms:description "A longer description "@en;
sioc:has_creator eg_d1:account_262d2e2ecb6696c0bfdc482ac6273b5b88c56ed2;
dcterms:created "2013-11-02T14:20:04"^^xsd:dateTime;
dcterms:modified "2014-01-02T11:32:17"^^xsd:dateTime;
sioc:has_container <http://www.assembl.net/discussion/1/>.
eg_d1:idea_2 a ibis:Position;
dcterms:title "We should telecommute"@en;
sioc:has_container <http://www.assembl.net/discussion/1/>.
eg_d1:idealink_2_1 a ibis:PositionRespondsToIssue;
ibis:response_position eg_d1:idea_2;
ibis:response_issue eg_d1:idea_1;
sioc:has_container <http://www.assembl.net/discussion/1/>.
eg_d1:idea_3 a ibis:Argument;
dcterms:title """Personal transport is a big part
of fuel consumption."""@en;
sioc:has_container <http://www.assembl.net/discussion/1/>.
eg_d1:idealink_3_2 a ibis:ArgumentSupportsIdea;
ibis:argument_arguing eg_d1:idea_3;
idea:target_idea eg_d1:idea_2;
sioc:has_container <http://www.assembl.net/discussion/1/>.
# Vote
eg_d1:vote1 a vote:BinaryVote;
vote:voter eg_d1:account_6e5902d716fa578590a0b987c6e82a0249688e36;
dcterms:created "2013-11-02T14:20:04"^^xsd:dateTime;
vote:subject eg_d1:idea_3;
vote:positive "true"^^xsd:boolean.
eg_d1:vote_range a vote:LickertRange;
vote:min "1"^^xsd:integer;
vote:max "10"^^xsd:integer.
eg_d1:vote2 a vote:LickertVote;
vote:voter eg_d1:account_6e5902d716fa578590a0b987c6e82a0249688e36;
vote:subject eg_d1:idea_3;
vote:lickert_in_range eg_d1:vote_range;
vote:lickert_value "8"^^xsd:integer.
eg_d1:vote3 a vote:OrderingVote;
vote:voter eg_d1:account_6e5902d716fa578590a0b987c6e82a0249688e36;
vote:ordered_ideas [ a rdf:Seq;
rdf:_1 eg_d1:idea3;
rdf:_2 eg_d1:idea5;
rdf:_3 eg_d1:idea4 ].
}
eg_site:annotation_1_target = {
<http://example.com/some/web/page.html> catalyst:expressesIdea eg_d1:idea_1.
}
eg_site:annotation_2_target = {
eg_d1:extracts_2 catalyst:expressesIdea eg_d1:idea_1.
}
eg_site:annotation_3_target = {
eg_d1:extracts_3 catalyst:expressesIdea eg_d1:idea_1.
}
eg_site:annotation_4_target = {
eg_d1:extracts_4 catalyst:expressesIdea eg_d1:idea_1.
}