-
Notifications
You must be signed in to change notification settings - Fork 11
/
rml_con_creazione_ontologia.ttl
171 lines (146 loc) · 4.12 KB
/
rml_con_creazione_ontologia.ttl
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
@prefix : <http://www.example.org/ns/r2rml#> .
@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@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 ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix ex: <http://ex.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix cpv: <https://w3id.org/italia/onto/CPV/> .
@prefix clv: <https://w3id.org/italia/onto/CLV/> .
:Ontology
rml:logicalSource :ArtistSource;
rr:subjectMap [
rr:template "https://w3id.org/test/my-ontology/" ;
rr:class owl:Ontology
];
rr:predicateObjectMap [
rr:predicate rdfs:label ;
rr:objectMap [
rr:template "Exercise on knowledge graphs"
]
] .
:IDTriplesMap
rml:logicalSource :ArtistSource ;
rr:subjectMap [
rr:template "http://ex.com/id";
rr:class owl:DatatypeProperty
] ;
rr:predicateObjectMap [
rr:predicate rdfs:label;
rr:objectMap [
rr:constant "Identifier"
]
] .
:PersonClassTriplesMap
rml:logicalSource :ArtistSource ;
rr:subjectMap [
rr:template "https://w3id.org/italia/onto/CPV/Person";
rr:class owl:Class
] ;
rr:predicateObjectMap [
rr:predicate rdfs:label;
rr:objectMap [
rr:constant "Person"
]
] .
:PlaceClassTriplesMap
rml:logicalSource :ArtistSource ;
rr:subjectMap [
rr:template "https://w3id.org/italia/onto/CLV/Place";
rr:class owl:Class
] ;
rr:predicateObjectMap [
rr:predicate rdfs:label;
rr:objectMap [
rr:constant "Place"
]
] .
:BirthPlaceClassTriplesMap
rml:logicalSource :ArtistSource ;
rr:subjectMap [
rr:template "https://w3id.org/italia/onto/CLV/hasBirthPlace";
rr:class owl:ObjectProperty
] ;
rr:predicateObjectMap [
rr:predicate rdfs:label;
rr:objectMap [
rr:constant "has birth place"
]
] .
:DeathPlaceClassTriplesMap
rml:logicalSource :ArtistSource ;
rr:subjectMap [
rr:template "https://w3id.org/italia/onto/CLV/hasDeathPlace";
rr:class owl:ObjectProperty
] ;
rr:predicateObjectMap [
rr:predicate rdfs:label;
rr:objectMap [
rr:constant "has death place"
]
] .
:ArtistTriplesMap
rml:logicalSource :ArtistSource ;
rr:subjectMap [
rr:template "http://stlab.istc.cnr.it/{ID}";
# rr:class cpv:Person
] ;
rr:predicateObjectMap [
rr:predicate rdf:type;
rr:objectMap [
rr:constant cpv:Person
]
] ;
rr:predicateObjectMap [
rr:predicate rdfs:label;
rr:objectMap [
rml:reference "NAME"
]
] ;
rr:predicateObjectMap [
rr:predicate ex:id;
rr:objectMap [
rr:template "{ID}: {NAME}"
]
] ;
rr:predicateObjectMap [
rr:predicate clv:hasBirthPlace;
rr:objectMap [
rr:parentTriplesMap :BirthPlaceTriplesMap ;
rr:joinCondition [
rr:child "BIRTH_PLACE" ;
rr:parent "CODE"
]
]
] ;
rr:predicateObjectMap [
rr:predicate clv:hasDeathPlace;
rr:objectMap [
rr:parentTriplesMap :BirthPlaceTriplesMap ;
rr:joinCondition [
rr:child "DEATH_PLACE" ;
rr:parent "CODE"
]
]
] .
:BirthPlaceTriplesMap
rml:logicalSource :PlaceSource ;
rr:subjectMap [
rr:template "http://stlab.istc.cnr.it/{CODE}";
rr:class clv:Place
] ;
rr:predicateObjectMap [
rr:predicate rdfs:label;
rr:objectMap [
rml:reference "PLACE"
]
] .
:ArtistSource rml:source "./examples/artists/Artist.csv" ;
rml:referenceFormulation ql:CSV ;
rml:iterator ql:row .
:PlaceSource
rml:source "./examples/artists/Place.csv" ;
rml:referenceFormulation ql:CSV ;
rml:iterator ql:row .