-
Notifications
You must be signed in to change notification settings - Fork 0
/
event-mapping.ttl
executable file
·128 lines (113 loc) · 3.3 KB
/
event-mapping.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
118
119
120
121
122
123
124
125
126
127
128
@prefix rr: <http://www.w3.org/ns/r2rml#>.
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@base <http://geotriples.eu/base> .
@prefix rrx: <http://www.w3.org/ns/r2rml-ext#>.
@prefix rrxf: <http://www.w3.org/ns/r2rml-ext/functions/def/>.
@prefix ogc: <http://www.opengis.net/ont/geosparql#>.
@prefix schema: <http://schema.org/>.
@prefix onto: <http://big-data-europe.eu/security/man-made-changes/ontology#>.
<#NewsEvent>
rml:logicalSource [
rml:source "/resources/events.json";
rml:referenceFormulation ql:JSONPath;
rml:iterator "$"];
rr:subjectMap [
rr:class onto:NewsEvent;
rr:template "http://big-data-europe.eu/security/man-made-changes/NewsEvent/id/{id}"];
rr:predicateObjectMap [
rr:predicateMap [ rr:constant onto:hasId ];
rr:objectMap [
rr:datatype xsd:string;
rml:reference "id";
];
];
rr:predicateObjectMap [
rr:predicateMap [ rr:constant onto:hasTitle ];
rr:objectMap [
rr:datatype xsd:string;
rml:reference "title";
];
];
rr:predicateObjectMap [
rr:predicateMap [ rr:constant onto:hasDate ];
rr:objectMap [
rr:datatype xsd:dateTime;
rml:reference "eventDate";
];
];
rr:predicateObjectMap [
rr:predicate onto:hasArea;
rr:objectMap [
rr:parentTriplesMap <#Area>;
];
];
rr:predicateObjectMap [
rr:predicate onto:hasPoolparty;
rr:objectMap [
rr:parentTriplesMap <#Poolparty>;
];
].
<#Area>
rml:logicalSource [
rml:source "/resources/events.json";
rml:referenceFormulation ql:JSONPath;
rml:iterator "$.areas"];
rr:subjectMap [
rr:class onto:Area;
rr:class ogc:Feature;
rr:template "http://big-data-europe.eu/security/man-made-changes/Area/id/{id}"];
rr:predicateObjectMap [
rr:predicateMap [ rr:constant onto:hasId ];
rr:objectMap [
rr:datatype xsd:long;
rml:reference "id";
];
];
rr:predicateObjectMap [
rr:predicateMap [ rr:constant onto:hasName ];
rr:objectMap [
rr:datatype xsd:string;
rml:reference "name";
];
];
rr:predicateObjectMap [
rr:predicate ogc:hasGeometry;
rr:objectMap [
rr:template "http://big-data-europe.eu/security/man-made-changes/Geometry/id/{id}"]].
<#Poolparty>
rml:logicalSource [
rml:source "/resources/events.json";
rml:referenceFormulation ql:JSONPath;
rml:iterator "$.poolparties"];
rr:subjectMap [
rr:class onto:PoolPartyPair;
rr:template "http://big-data-europe.eu/security/man-made-changes/PoolParty/Thesaurus/{pairid}"];
rr:predicateObjectMap [
rr:predicateMap [ rr:constant onto:hasThesaurusId ];
rr:objectMap [
rr:datatype xsd:string;
rml:reference "thesaurus_uuid";
];
];
rr:predicateObjectMap [
rr:predicateMap [ rr:constant onto:hasConceptURI ];
rr:objectMap [
rml:reference "concept_uri";
];
].
<#Geometry>
rml:logicalSource [
rml:source "/resources/events.json";
rml:referenceFormulation ql:JSONPath;
rml:iterator "$.areas"];
rr:subjectMap [
rr:class ogc:Geometry;
rr:template "http://big-data-europe.eu/security/man-made-changes/Geometry/id/{id}"];
rr:predicateObjectMap [
rr:predicate ogc:asWKT;
rr:objectMap [
rr:datatype ogc:wktLiteral;
rrx:function rrxf:asWKT;
rrx:argumentMap ([rml:reference "geometry"]) ];].