-
Notifications
You must be signed in to change notification settings - Fork 1
/
example_mapping.rml
100 lines (100 loc) · 2.6 KB
/
example_mapping.rml
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
@prefix rr: <http://www.w3.org/ns/r2rml#>.
@prefix rml: <http://semweb.mmlab.be/ns/rml#>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix ex: <http://example.com/resource/>.
@prefix ql: <http://semweb.mmlab.be/ns/ql#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix csvw: <http://www.w3.org/ns/csvw#>.
ex:File
rdf:type rml:source ;
rml:source ex:FileSource ;
rml:referenceFormulation ql:CSV .
ex:FileSource a csvw:Table;
csvw:url "/soccer/tables/all_world_cup_players.csv" ;
csvw:dialect [
a csvw:Dialect;
csvw:delimiter ",";
csvw:null "";
] .
ex:Mapping0
rdf:type rr:TriplesMap ;
rml:logicalSource ex:File ;
rr:subjectMap [
rr:class <http://schema.org/Player> ;
rr:template "http://schema.org/Player{rowNumber}" ;
];
rr:predicateObjectMap [
rr:predicate <http://schema.org/name> ;
rr:objectMap [
rml:reference "FullName";
rr:datatype <http://www.w3.org/2001/XMLSchema#string>
]
] ;
rr:predicateObjectMap [
rr:predicate <http://schema.org/isCaptain> ;
rr:objectMap [
rml:reference "IsCaptain";
rr:datatype <http://www.w3.org/2001/XMLSchema#string>
]
] ;
rr:predicateObjectMap [
rr:predicate <http://schema.org/playPosition> ;
rr:objectMap [
rml:reference "Position";
rr:datatype <http://www.w3.org/2001/XMLSchema#string>
]
] ;
rr:predicateObjectMap [
rr:predicate <http://schema.org/birthDate> ;
rr:objectMap [
rml:reference "DateOfBirth";
rr:datatype <http://www.w3.org/2001/XMLSchema#string>
]
] ;
rr:predicateObjectMap [
rr:predicate <http://schema.org/tag> ;
rr:objectMap [
rml:reference "Number";
rr:datatype <http://www.w3.org/2001/XMLSchema#string>
]
] ;
rr:predicateObjectMap [
rr:predicate <http://schema.org/inClub> ;
rr:objectMap [
rr:template "http://schema.org/SportsClub{rowNumber}";
]
] ;
rr:predicateObjectMap [
rr:predicate <http://schema.org/inNationalTeam> ;
rr:objectMap [
rr:template "http://schema.org/SportsTeam{rowNumber}";
]
] .
ex:Mapping1
rdf:type rr:TriplesMap ;
rml:logicalSource ex:File ;
rr:subjectMap [
rr:class <http://schema.org/SportsTeam> ;
rr:template "http://schema.org/SportsTeam{rowNumber}" ;
];
rr:predicateObjectMap [
rr:predicate <http://schema.org/name> ;
rr:objectMap [
rml:reference "Team";
rr:datatype <http://www.w3.org/2001/XMLSchema#string>
]
] .
ex:Mapping2
rdf:type rr:TriplesMap ;
rml:logicalSource ex:File ;
rr:subjectMap [
rr:class <http://schema.org/SportsClub> ;
rr:template "http://schema.org/SportsClub{rowNumber}" ;
];
rr:predicateObjectMap [
rr:predicate <http://schema.org/name> ;
rr:objectMap [
rml:reference "Club";
rr:datatype <http://www.w3.org/2001/XMLSchema#string>
]
] .