-
Notifications
You must be signed in to change notification settings - Fork 0
/
essense.rml.ttl
84 lines (75 loc) · 2.3 KB
/
essense.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
79
80
81
82
83
84
@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 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#> .
# API key in HTTP header
<#WotWebAPISecurity> a wotsec:APIKeySecurityScheme;
wotsec:in "header";
wotsec:name "apikey";
.
# Access description for HTTP Web API with JSON as data format
<#WoTWebAPISource> a td:PropertyAffordance;
td:hasForm [
hctl:hasTarget "http://example.org/trashcans";
hctl:forContentType "application/json";
hctl:hasOperationType td:readproperty ;
htv:methodName "GET";
htv:headers ([
htv:fieldName "User-Agent";
htv:fieldValue "Mapping processor";
]);
];
.
# Link security with access description
<#WoTWebAPI> a td:Thing ;
td:hasSecurityConfiguration <#WoTWebAPISecurity>;
td:hasPropertyAffordance <#WoTWebAPISource>;
.
# 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 [ a rml:LogicalSource;
rml:source <#WoTWebAPI>;
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/trashcan/{id}"
];
rr:predicateObjectMap [
rr:predicate ex:fillingLevel;
rr:objectMap [
rml:reference "fillingLevel.value";
];
];
rr:predicateObjectMap [
rr:predicate rdf:type;
rr:objectMap [
rr:constant ex:Trashcan;
];
];
.