-
Notifications
You must be signed in to change notification settings - Fork 0
/
change-mapping.ttl
executable file
·95 lines (87 loc) · 2.68 KB
/
change-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
@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#>.
<#Change>
rml:logicalSource [
rml:source "/resources/changes.json";
rml:referenceFormulation ql:JSONPath;
rml:iterator "$"];
rr:subjectMap [
rr:class onto:Change;
rr:template "http://big-data-europe.eu/security/man-made-changes/Change/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:hasBeforeDate ];
rr:objectMap [
rr:datatype xsd:dateTime;
rml:reference "sourceDate";
];
];
rr:predicateObjectMap [
rr:predicateMap [ rr:constant onto:hasDate ];
rr:objectMap [
rr:datatype xsd:dateTime;
rml:reference "targetDate";
];
];
rr:predicateObjectMap [
rr:predicate onto:hasArea;
rr:objectMap [
rr:parentTriplesMap <#Area>;
];
#rr:template "http://big-data-europe.eu/security/man-made-changes/Area/id/{areas.id}"]].
].
<#Area>
rml:logicalSource [
rml:source "/resources/changes.json";
rml:referenceFormulation ql:JSONPath;
rml:iterator "$"];
rr:subjectMap [
rr:class onto:Area;
rr:class ogc:Feature;
rr:template "http://big-data-europe.eu/security/man-made-changes/Area/id/{$.area.id}"];
rr:predicateObjectMap [
rr:predicateMap [ rr:constant onto:hasId ];
rr:objectMap [
rr:datatype xsd:long;
rml:reference "$.area.id";
];
];
rr:predicateObjectMap [
rr:predicateMap [ rr:constant onto:hasName ];
rr:objectMap [
rr:datatype xsd:string;
rml:reference "$.area.name";
];
];
rr:predicateObjectMap [
rr:predicate ogc:hasGeometry;
rr:objectMap [
rr:template "http://big-data-europe.eu/security/man-made-changes/Geometry/id/{$.area.id}"]].
<#Geometry>
rml:logicalSource [
rml:source "/resources/changes.json";
rml:referenceFormulation ql:JSONPath;
rml:iterator "$"];
rr:subjectMap [
rr:class ogc:Geometry;
rr:template "http://big-data-europe.eu/security/man-made-changes/Geometry/id/{$.area.id}"];
rr:predicateObjectMap [
rr:predicate ogc:asWKT;
rr:objectMap [
rr:datatype ogc:wktLiteral;
rrx:function rrxf:asWKT;
rrx:argumentMap ([rml:reference "$.area.geometry"]) ];].