forked from zazuko/gitpod-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWishlist.r2rml.ttl
77 lines (65 loc) · 1.52 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
PREFIX rr: <http://www.w3.org/ns/r2rml#>
PREFIX acl: <http://www.w3.org/ns/auth/acl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX schema: <http://schema.org/>
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
PREFIX wbo: <https://schema.wikibus.org/>
<#WishlistItem>
a rr:TriplesMap;
rr:logicalTable [ rr:sqlQuery """select
Id,
rtrim([User]) as [User],
SourceId,
IIF(Done = '1', 'Complete', 'Incomplete') as Status
from Sources.Wishlist""" ];
rr:subjectMap [
rr:template "wishlist/{User}/{SourceId}";
rr:graphMap [
rr:template "wishlist/{User}/{SourceId}"
]
];
rr:predicateObjectMap [
rr:predicate rdf:type;
rr:objectMap [
rr:template "api/WishlistItem"
]
];
rr:predicateObjectMap [
rr:predicate wbo:source;
rr:objectMap [
rr:template "brochure/{SourceId}"
]
];
rr:predicateObjectMap [
rr:predicate schema:status;
rr:objectMap [
rr:template "https://schema.wikibus.org/wishlist-status/{Status}"
]
];
rr:predicateObjectMap [
rr:predicate acl:owner;
rr:objectMap [
rr:template "user/{User}"
]
].
<#WishlistUser>
a rr:TriplesMap;
rr:logicalTable [ rr:sqlQuery """select
Id,
rtrim([User]) as [User],
SourceId,
IIF(Done = '1', 'Complete', 'Incomplete') as Status
from Sources.Wishlist""" ];
rr:subjectMap [
rr:template "user/{User}";
rr:class vcard:Individual;
rr:graphMap [
rr:template "user/{User}"
]
];
rr:predicateObjectMap [
rr:predicate vcard:hasUID;
rr:objectMap [
rr:column "User"
]
].