-
Notifications
You must be signed in to change notification settings - Fork 0
/
daiquiri.rml.ttl
78 lines (69 loc) · 2.19 KB
/
daiquiri.rml.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
@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix td: <https://www.w3.org/2019/wot/td#> .
@prefix wotsec: <https://www.w3.org/2019/wot/security#> .
@prefix htv: <http://www.w3.org/2011/http#> .
@prefix hctl: <https://www.w3.org/2019/wot/hypermedia#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix rmlt: <http://semweb.mmlab.be/ns/rml-target#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix mqv: <http://www.example.org/mqtt-binding#> .
@prefix ex: <http://example.org/ns/#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix formats: <https://www.w3.org/ns/formats/> .
@prefix void: <http://rdfs.org/ns/void#> .
@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
# Username/password security in body
<#WoTMQTTSecurity> a wotsec:BasicSecurityScheme;
wotsec:in "body";
.
# Access description for MQTT queue with JSON as data format
<#WoTMQTTSource> a td:PropertyAffordance;
td:hasForm [ hctl:hasTarget "mqtt://example.com/mqtt";
hctl:forContentType "application/json";
hctl:hasOperationType td:readproperty ;
mqv:controlPacketValue "SUBSCRIBE"; ];
.
# Link security with access description
<#WoTMQTT> a td:Thing ;
td:hasSecurityConfiguration <#WoTMQTTSecurity>;
td:hasPropertyAffordance <#WoTMQTTSource>;
.
# Targets
<#RDFDumpTarget> a void:Dataset;
void:dataDump <file:///data/dump.nq>;
.
<#SPARQLUPDATETarget> a sd:Service;
sd:endpoint <http://example.com/sparql-update>;
sd:supportedLanguage sd:SPARQL11Update;
.
# RML TriplesMaps
<#TriplesMap> a rr:TriplesMap;
rml:logicalSource [
rml:source <#WoTMQTT>;
rml:referenceFormulation ql:JSONPath;
rml:iterator "$";
];
rml:logicalTarget [ a rmlt:LogicalTarget;
rmlt:target <#RDFDumpTarget>;
rmlt:serialization formats:N-Quads;
];
rml:logicalTarget [ a rmlt:LogicalTarget;
rmlt:target <#SPARQLUPDATETarget>;
];
rr:subjectMap [
rr:template "http://example.org/athlete/{id}"
];
rr:predicateObjectMap [
rr:predicate ex:speed;
rr:objectMap [
rml:reference "speed";
];
];
rr:predicateObjectMap [
rr:predicate rdf:type;
rr:objectMap [
rr:constant ex:Athlete;
];
];
.