generated from zazuko/xrm-r2rml-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Wishlist.r2rml.ttl
117 lines (108 loc) · 2.79 KB
/
Wishlist.r2rml.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
PREFIX rr: <http://www.w3.org/ns/r2rml#>
PREFIX hydra: <http://www.w3.org/ns/hydra/core#>
PREFIX wba: <https://wikibus.org/api#>
PREFIX wbo: <https://wikibus.org/ontology#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
<#Wishlist>
rr:logicalTable [ rr:sqlQuery """select Id, rtrim([User]) as [User], SourceId, Done from Sources.Wishlist""" ];
rr:subjectMap [
rr:template "wishlist/{User}/{SourceId}" ;
rr:graphMap [ rr:template "wishlist/{User}/{SourceId}" ] ;
rr:class wbo:WishlistItem ;
rr:class hydra:Resource ;
];
rr:predicateObjectMap [
rr:predicate wbo:source ;
rr:objectMap [
rr:template "brochure/{SourceId}" ;
];
];
rr:predicateObjectMap [
rr:predicate wbo:done ;
rr:objectMap [
rr:column "Done" ;
rr:datatype xsd:boolean ;
];
];
rr:predicateObjectMap [
rr:predicate wbo:user ;
rr:objectMap [
rr:template "https://users.wikibus.org/user/{User}" ;
];
]
.
<#WishlistCollections>
rr:logicalTable [ rr:sqlQuery """select Id, rtrim([User]) as [User], SourceId, Done from Sources.Wishlist""" ];
rr:subjectMap [
rr:template "wishlist/{User}" ;
rr:class wba:WishlistCollection ;
rr:class hydra:Collection ;
rr:graphMap [
rr:template "wishlist/{User}"
]
];
rr:predicateObjectMap [
rr:predicate wbo:user ;
rr:objectMap [
rr:template "https://users.wikibus.org/user/{User}" ;
];
];
rr:predicateObjectMap [
rr:predicate hydra:manages ;
rr:objectMap [
rr:template "wishlist-{User}-manages-type" ;
rr:termType rr:BlankNode ;
];
];
rr:predicateObjectMap [
rr:predicate hydra:manages ;
rr:objectMap [
rr:template "wishlist-{User}-manages-user" ;
rr:termType rr:BlankNode ;
];
]
.
<#WishlistCollectionsManagesType>
rr:logicalTable [ rr:sqlQuery """select Id, rtrim([User]) as [User], SourceId, Done from Sources.Wishlist""" ];
rr:subjectMap [
rr:template "wishlist-{User}-manages-type" ;
rr:termType rr:BlankNode ;
rr:graphMap [
rr:template "wishlist/{User}"
]
];
rr:predicateObjectMap [
rr:predicate hydra:property ;
rr:objectMap [
rr:constant <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ;
];
];
rr:predicateObjectMap [
rr:predicate hydra:object ;
rr:objectMap [
rr:constant <https://wikibus.org/ontology#WishlistItem> ;
];
]
.
<#WishlistCollectionsManagesUser>
rr:logicalTable [ rr:sqlQuery """select Id, rtrim([User]) as [User], SourceId, Done from Sources.Wishlist""" ];
rr:subjectMap [
rr:template "wishlist-{User}-manages-user" ;
rr:termType rr:BlankNode ;
rr:graphMap [
rr:template "wishlist/{User}"
]
];
rr:predicateObjectMap [
rr:predicate hydra:object ;
rr:objectMap [
rr:template "https://users.wikibus.org/user/{User}" ;
];
];
rr:predicateObjectMap [
rr:predicate hydra:property ;
rr:objectMap [
rr:constant <https://wikibus.org/ontology#user> ;
];
]
.