-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPrimerExampleTurtle.owl
293 lines (251 loc) · 8.25 KB
/
PrimerExampleTurtle.owl
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
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix owl2: <http://www.w3.org/2006/12/owl2#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix f: <http://example.com/owl/families#> .
@prefix g: <http://example.com/owl2/families#> .
<http://example.com/owl/families> rdf:type owl:Ontology ;
owl:imports <http://example.com/owl2/families> .
###########################################
# Object properties
###########################################
f:hasAncestor rdf:type owl:ObjectProperty ,
owl:TransitiveProperty ,
owl2:IrreflexiveProperty .
f:hasChild rdf:type owl:ObjectProperty ;
rdfs:subPropertyOf f:hasAncestor ;
rdfs:domain f:Person ;
rdfs:range f:Person ;
owl:equivalentProperty g:child .
_:x0 rdf:type owl:Restriction ;
owl:onProperty f:hasGender ;
owl:hasValue f:female .
_:x1 rdf:type owl:Class ;
owl:intersectionOf (f:Person _:x0) .
f:hasDaughter rdf:type owl:ObjectProperty ;
rdfs:range _:x1 ,
f:Person ;
rdfs:domain f:Person ;
rdfs:subPropertyOf f:hasChild ;
rdfs:domain f:Parent ;
owl2:disjointObjectProperties f:hasSon .
f:hasGender rdf:type owl:ObjectProperty .
f:hasHusband rdf:type owl:ObjectProperty ;
owl:inverseOf f:hasWife .
f:hasSon rdf:type owl:ObjectProperty .
_:x3 rdf:type owl:Restriction ;
owl:onProperty f:hasGender ;
owl:hasValue f:male .
_:x4 rdf:type owl:Class ;
owl:intersectionOf (f:Person _:x3) .
f:hasSon rdfs:range _:x4 ;
rdfs:subPropertyOf f:hasChild ;
rdfs:range f:Person ;
rdfs:domain f:Person ,
f:Parent .
f:hasSpouse rdf:type owl:ObjectProperty ,
owl:SymmetricProperty ,
owl2:IrreflexiveProperty .
f:hasWife rdf:type owl:ObjectProperty ,
owl:InverseFunctionalProperty ,
owl:FunctionalProperty ,
owl2:AsymmetricProperty ,
owl2:IrreflexiveProperty ;
rdfs:domain f:Person ;
rdfs:range f:Person ;
rdfs:subPropertyOf f:loves ;
rdfs:range f:Woman ;
rdfs:subPropertyOf f:hasSpouse ;
rdfs:domain f:Man .
f:loves rdf:type owl:ObjectProperty ;
rdfs:domain f:Person .
###########################################
# Data properties
###########################################
f:hasAge rdf:type owl:DatatypeProperty ,
owl:FunctionalProperty ;
rdfs:domain f:Person ;
rdfs:range xsd:integer ;
owl:equivalentProperty g:age .
###########################################
# Classes
###########################################
f:Adult rdf:type owl:Class .
_:x5 rdf:type owl2:DataRange ;
owl2:onDataRange xsd:integer ;
owl2:minInclusive "21"^^xsd:int .
_:x6 rdf:type owl:Restriction ;
owl:onProperty f:hasAge ;
owl:someValuesFrom _:x5 .
_:x7 rdf:type owl:Class ;
owl:intersectionOf (f:Person _:x6) .
f:Adult owl:equivalentClass _:x7 ,
g:Grownup .
f:Child rdf:type owl:Class .
_:x8 rdf:type owl2:DataRange ;
owl2:onDataRange xsd:integer ;
owl2:minInclusive "21"^^xsd:int .
_:x9 rdf:type owl:Restriction ;
owl:onProperty f:hasAge ;
owl:someValuesFrom _:x8 .
_:x10 rdf:type owl:Class ;
owl:complementOf _:x9 .
_:x11 rdf:type owl:Class ;
owl:intersectionOf (f:Person _:x10) .
f:Child owl:equivalentClass _:x11 .
f:CivilMarriage rdf:type owl:Class .
f:Man rdf:type owl:Class ;
rdfs:subClassOf f:Parent .
_:x12 rdf:type owl:Restriction ;
owl:onProperty f:hasGender ;
owl:hasValue f:male .
_:x13 rdf:type owl:Class ;
owl:intersectionOf (f:Person _:x12) .
f:Man owl:equivalentClass _:x13 .
f:Marriage rdf:type owl:Class .
_:x14 rdf:type owl:Class ;
owl:unionOf (f:CivilMarriage f:ReligiousMarriage) .
f:Marriage owl:equivalentClass _:x14 .
f:Narcissist rdf:type owl:Class .
_:x15 rdf:type owl2:SelfRestriction ;
owl:onProperty f:loves .
_:x16 rdf:type owl:Class ;
owl:intersectionOf (_:x15 f:Person) .
f:Narcissist owl:equivalentClass _:x16 .
f:Parent rdf:type owl:Class ;
rdfs:subClassOf f:Parent .
_:x17 rdf:type owl:Restriction ;
owl:onProperty f:hasChild ;
owl2:onClass f:Person ;
owl:minCardinalityQ "1"^^xsd:nonNegativeInteger .
_:x18 rdf:type owl:Class ;
owl:intersectionOf (f:Person _:x17) .
f:Parent owl:equivalentClass _:x18 .
f:Person rdf:type owl:Class .
_:x19 rdf:type owl:Class ;
owl:oneOf (f:female f:male) .
_:x20 rdf:type owl:Restriction ;
owl:onProperty f:hasGender ;
owl:allValuesFrom _:x19 .
_:x21 rdf:type owl:Restriction ;
owl:onProperty f:hasGender ;
owl:cardinality "1"^^xsd:nonNegativeInteger .
_:x22 rdf:type owl:Restriction ;
owl:onProperty f:hasAge ;
owl:cardinality "1"^^xsd:nonNegativeInteger .
_:x23 rdf:type owl:Class ;
owl:intersectionOf (_:x20 _:x21 _:x22) .
f:Person rdfs:subClassOf _:x23 .
f:ReligiousMarriage rdf:type owl:Class ;
owl:disjointWith f:CivilMarriage .
f:Teenager rdf:type owl:Class .
_:x24 rdf:type owl2:DataRange ;
owl2:minInclusive "13"^^xsd:int ;
owl2:maxExclusive "20"^^xsd:int ;
owl2:onDataRange xsd:integer .
_:x25 rdf:type owl:Restriction ;
owl:onProperty f:hasAge ;
owl:someValuesFrom _:x24 .
_:x26 rdf:type owl:Class ;
owl:intersectionOf (f:Person _:x25) .
f:Teenager owl:equivalentClass _:x26 .
f:Woman rdf:type owl:Class ;
rdfs:subClassOf f:Parent .
_:x27 rdf:type owl:Restriction ;
owl:onProperty f:hasGender ;
owl:hasValue f:female .
_:x28 rdf:type owl:Class ;
owl:intersectionOf (f:Person _:x27) .
f:Woman owl:equivalentClass _:x28 .
f:YoungChild rdf:type owl:Class .
_:x29 rdf:type owl:Class ;
owl:unionOf (f:Adult f:Teenager) .
_:x30 rdf:type owl:Class ;
owl:complementOf _:x29 .
_:x31 rdf:type owl:Class ;
owl:intersectionOf (f:Person _:x30) .
f:YoungChild owl:equivalentClass _:x31 .
###########################################
# Individuals
###########################################
# Bill
_:x32 rdf:type owl:Class ;
owl:complementOf f:Narcissist .
f:Bill rdf:type _:x32 ;
f:hasAge "13"^^xsd:integer ;
f:hasGender f:male .
# Ellen
_:x33 rdf:type owl2:DataRange ;
owl2:minInclusive "15"^^xsd:int ;
owl2:onDataRange xsd:integer ;
owl2:maxInclusive "21"^^xsd:int .
_:x34 rdf:type owl:Restriction ;
owl:onProperty f:hasAge ;
owl:someValuesFrom _:x33 .
f:Ellen rdf:type _:x34 .
# Emily
_:x35 rdf:type owl2:DataRange ;
owl:oneOf ("39"^^xsd:integer "49"^^xsd:integer) .
_:x36 rdf:type owl:Restriction ;
owl:onProperty f:hasAge ;
owl:someValuesFrom _:x35 .
f:Emily rdf:type _:x36 .
# Jack
_:x37 rdf:type owl2:NegativeDataPropertyAssertion ;
rdf:subject f:Jack ;
rdf:predicate f:hasAge ;
rdf:object "53"^^xsd:integer .
# Jeff
_:x38 rdf:type owl:Restriction ;
owl:onProperty f:hasChild ;
owl:cardinality "2"^^xsd:nonNegativeInteger .
f:Jeff rdf:type _:x38 ;
f:hasAge "77"^^xsd:integer ;
f:hasChild f:Ellen ;
f:hasWife f:Emily ;
f:loves f:Jeff ;
f:hasChild f:Jack .
# John
f:John rdf:type f:Person ;
f:hasDaughter f:Susan ;
f:hasGender f:male ;
f:hasWife f:Mary ;
f:hasSon f:Bill ;
f:hasAge "33"^^xsd:integer ;
owl:sameAs f:Jack .
# Mary
f:Mary f:hasAge "31"^^xsd:integer ;
f:hasGender f:female ;
f:hasSon f:Bill ;
f:hasDaughter f:Susan .
# Susan
f:Susan f:hasAge "8"^^xsd:integer ;
f:hasGender f:female .
f:female owl:sameAs g:feminine .
f:male owl:sameAs g:masculine .
###########################################
# General axioms
###########################################
_:x39 rdf:type owl:AllDifferent;
owl:distinctMembers (f:John f:Mary f:Bill f:Susan).
_:x40 rdf:type owl:AllDifferent;
owl:distinctMembers (f:Jeff f:Emily f:Jack f:Ellen f:Susan) .
_:x41 rdf:type owl:AllDifferent;
owl:distinctMembers (f:male f:female) .
# The following representation passes validation, but does not conform to the Turtle specification.
#(f:hasSpouse f:hasSon) rdfs:subPropertyOf f:hasSon .
_:x42 rdf:first f:hasSon ;
rdf:rest rdf:nil .
_:x43 rdf:type rdf:List ;
rdf:first f:hasSpouse ;
rdf:rest _:x42 ;
rdfs:subPropertyOf f:hasSon .
# The following representation passes validation, but does not conform to the Turtle specification.
#(f:hasSpouse f:hasDaughter) rdfs:subPropertyOf f:hasDaughter .
_:x44 rdf:first f:hasDaughter ;
rdf:rest rdf:nil .
_:x45 rdf:type rdf:List ;
rdf:first f:hasSpouse ;
rdf:rest _:x44 ;
rdfs:subPropertyOf f:hasDaughter .