-
Notifications
You must be signed in to change notification settings - Fork 20
/
university-no-pk.obda
111 lines (89 loc) · 3.43 KB
/
university-no-pk.obda
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
[PrefixDeclaration]
: http://example.org/voc#
ex: http://example.org/
owl: http://www.w3.org/2002/07/owl#
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
xml: http://www.w3.org/XML/1998/namespace
xsd: http://www.w3.org/2001/XMLSchema#
foaf: http://xmlns.com/foaf/0.1/
rdfs: http://www.w3.org/2000/01/rdf-schema#
[SourceDeclaration]
sourceUri university
connectionUrl jdbc:h2:tcp://localhost/../university-no-pk
username sa
password
driverClass org.h2.Driver
[MappingDeclaration] @collection [[
mappingId uni1-student
target ex:uni1/student/{s_id} a :Student ; foaf:firstName {first_name}^^xsd:string ; foaf:lastName {last_name}^^xsd:string .
source SELECT * FROM "uni1"."student"
mappingId uni1-academic
target ex:uni1/academic/{a_id} a :FacultyMember ; foaf:firstName {first_name}^^xsd:string ; foaf:lastName {last_name}^^xsd:string .
source SELECT * FROM "uni1"."academic"
mappingId uni1-fullProfessor
target ex:uni1/academic/{a_id} a :FullProfessor .
source SELECT * FROM "uni1"."academic"
WHERE "position" = 1
mappingId uni1-AssociateProfessor
target ex:uni1/academic/{a_id} a :AssociateProfessor .
source SELECT * FROM "uni1"."academic"
WHERE "position" = 2
mappingId uni1-PostDoc
target ex:uni1/academic/{a_id} a :PostDoc .
source SELECT * FROM "uni1"."academic"
WHERE "position" = 9
mappingId uni1-externalTeacher
target ex:uni1/academic/{a_id} a :ExternalTeacher .
source SELECT * FROM "uni1"."academic"
WHERE "position" = 8
mappingId uni1-teaching
target ex:uni1/academic/{a_id} :teaches ex:uni1/course/{c_id} .
source SELECT * FROM "uni1"."teaching"
mappingId uni1-course
target ex:uni1/course/{c_id} a :Course ; :title {title} ; :isGivenAt ex:uni1/university .
source SELECT * FROM "uni1"."course"
mappingId uni1-registration
target ex:uni1/student/{s_id} :attends ex:uni1/course/{c_id} .
source SELECT *
FROM "uni1"."course-registration"
mappingId uni2-person
target ex:uni2/person/{pid} a foaf:Person ; foaf:firstName {fname}^^xsd:string ; foaf:lastName {lname}^^xsd:string .
source SELECT * FROM "uni2"."person"
mappingId uni2-undergraduate
target ex:uni2/person/{pid} a :UndergraduateStudent .
source SELECT * FROM "uni2"."person"
WHERE "status" = 1
mappingId uni2-graduate
target ex:uni2/person/{pid} a :GraduateStudent .
source SELECT * FROM "uni2"."person"
WHERE "status" = 2
mappingId uni2-fullProfessor
target ex:uni2/person/{pid} a :FullProfessor .
source SELECT * FROM "uni2"."person"
WHERE "status" = 7
mappingId uni2-associate-prof
target ex:uni2/person/{pid} a :AssociateProfessor .
source SELECT * FROM "uni2"."person"
WHERE "status" = 8
mappingId uni2-course
target ex:uni2/course/{cid} a :Course ; :title {topic}^^xsd:string ; :isGivenAt ex:uni2/university .
source SELECT * FROM "uni2"."course"
mappingId uni2-lecturer
target ex:uni2/person/{lecturer} :givesLecture ex:uni2/course/{cid} .
source SELECT * FROM "uni2"."course"
mappingId uni2-assistantProfessor
target ex:uni2/person/{pid} a :AssistantProfessor .
source SELECT * FROM "uni2"."person"
WHERE "status" = 9
mappingId uni2-postDoc
target ex:uni2/person/{pid} a :PostDoc .
source SELECT * FROM "uni2"."person"
WHERE "status" = 3
mappingId uni2-lab-teacher
target ex:uni2/person/{lab_teacher} :givesLab ex:uni2/course/{cid} .
source SELECT * FROM "uni2"."course"
mappingId uni2-registration
target ex:uni2/person/{pid} :attends ex:uni2/course/{cid} .
source SELECT *
FROM "uni2"."registration"
]]