-
Notifications
You must be signed in to change notification settings - Fork 2
/
init_seismic.trig
245 lines (219 loc) · 9.23 KB
/
init_seismic.trig
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
@prefix : <http://w3id.org/semcon/ns/ontology#> .
@prefix scr: <http://w3id.org/semcon/resource/> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix w3c-format: <http://www.w3.org/ns/formats/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix svpr: <http://www.specialprivacy.eu/vocabs/processing#> .
@prefix svpu: <http://www.specialprivacy.eu/vocabs/purposes#> .
@prefix svd: <http://www.specialprivacy.eu/vocabs/data#> .
@prefix svdu: <http://www.specialprivacy.eu/vocabs/duration#> .
@prefix svl: <http://www.specialprivacy.eu/vocabs/locations#> .
@prefix svr: <http://www.specialprivacy.eu/vocabs/recipients#> .
@prefix spl: <http://www.specialprivacy.eu/langs/usage-policy#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
# for data model
@prefix scs: <http://w3id.org/semcon/ns/seismic#> .
@prefix geo: <http://www.opengis.net/ont/geosparql#> .
@prefix wgs: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
# for mapping
@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 carml: <http://carml.taxonic.com/carml/> .
@prefix dcterm: <http://purl.org/dc/terms/> .
@prefix func: <http://semantics.id/ns/function#> .
@prefix param: <http://semantics.id/ns/parameter#> .
@prefix fnml: <http://semweb.mmlab.be/ns/fnml#> .
@prefix fno: <http://semweb.datasciencelab.be/ns/function#> .
#################################################################
# NAMED GRAPH ==> :BaseConfigurations
#################################################################
:BaseConfiguration {
:ContainerConfigurationInstance rdf:type :ContainerConfiguration ;
# generic - dublin core
dc:title "Seismic Data" ;
dc:description """
seismic data provided by ZAMG under http://geoweb.zamg.ac.at/static/event/lastday.json
""" ;
dc:creator [
rdf:type foaf:Organisation ;
foaf:name "ZAMG" ;
foaf:mbox <mailto:[email protected]> ;
] ;
:hasDataConfiguration :DataConfigurationInstance .
# :hasDataLayer scr:LayerSemantic ; # NON-EDITABLE - assigned
:DataConfigurationInstance rdf:type :DataConfiguration ;
# :isDataModelExist true ; # NON-EDITABLE - assigned
# :isDataConstraintExist true ; # NON-EDITABLE - assigned
# :isDataMappingExist false ; # NON-EDITABLE - assigned
# :isUsagePolicyExist true ; # NON-EDITABLE - assigned
# data - classifications
:hasTag "zamg", "seismic" ;
# data format - inspired from void
:hasNativeSyntax <http://w3id.org/semcon/ns/ontology#JSON> ;
:hasDataLocationDescription "Earthquakes in Austria and worldwide provided by ZAMG through Semantic Containers";
:hasDataLocation <http://localhost:3000/api/data/>;
# example data in plain string
:hasExampleData """
""" .
}
#################################################################
# NAMED GRAPH ==> :UsagePolicies
#################################################################
:UsagePolicy {
<http://w3id.org/semcon/ns/ontology#ContainerPolicy> a <http://www.w3.org/2002/07/owl#Class>;
<http://www.w3.org/2002/07/owl#equivalentClass> [
a <http://www.w3.org/2002/07/owl#Class>;
<http://www.w3.org/2002/07/owl#intersectionOf> ([
a <http://www.w3.org/2002/07/owl#Restriction>;
<http://www.w3.org/2002/07/owl#onProperty> <http://www.specialprivacy.eu/langs/usage-policy#hasData>;
<http://www.w3.org/2002/07/owl#someValuesFrom> [<http://www.w3.org/2002/07/owl#unionOf> (<http://www.specialprivacy.eu/vocabs/data#EarthObservation>)]
] [
a <http://www.w3.org/2002/07/owl#Restriction>;
<http://www.w3.org/2002/07/owl#onProperty> <http://www.specialprivacy.eu/langs/usage-policy#hasRecipient>;
<http://www.w3.org/2002/07/owl#someValuesFrom> <http://www.specialprivacy.eu/langs/usage-policy#AnyRecipient>
] [
a <http://www.w3.org/2002/07/owl#Restriction>;
<http://www.w3.org/2002/07/owl#onProperty> <http://www.specialprivacy.eu/langs/usage-policy#hasPurpose>;
<http://www.w3.org/2002/07/owl#someValuesFrom> <http://www.specialprivacy.eu/langs/usage-policy#AnyPurpose>
] [
a <http://www.w3.org/2002/07/owl#Restriction>;
<http://www.w3.org/2002/07/owl#onProperty> <http://www.specialprivacy.eu/langs/usage-policy#hasProcessing>;
<http://www.w3.org/2002/07/owl#someValuesFrom> <http://www.specialprivacy.eu/langs/usage-policy#AnyProcessing>
] [
a <http://www.w3.org/2002/07/owl#Restriction>;
<http://www.w3.org/2002/07/owl#onProperty> <http://www.specialprivacy.eu/langs/usage-policy#hasStorage>;
<http://www.w3.org/2002/07/owl#someValuesFrom> [<http://www.w3.org/2002/07/owl#intersectionOf> ([
a <http://www.w3.org/2002/07/owl#Restriction>;
<http://www.w3.org/2002/07/owl#onProperty> <http://www.specialprivacy.eu/langs/usage-policy#hasLocation>;
<http://www.w3.org/2002/07/owl#someValuesFrom> <http://www.specialprivacy.eu/langs/usage-policy#AnyLocation>
] [
a <http://www.w3.org/2002/07/owl#Restriction>;
<http://www.w3.org/2002/07/owl#onProperty> <http://www.specialprivacy.eu/langs/usage-policy#hasDuration>;
<http://www.w3.org/2002/07/owl#someValuesFrom> <http://www.specialprivacy.eu/vocabs/duration#StatedPurpose>
])]
])
] .
}
#################################################################
# NAMED GRAPH ==> :DataModels
#################################################################
:DataModel {
}
#################################################################
# NAMED GRAPH ==> :DataConstraints
#################################################################
:DataConstraint {
}
#################################################################
# NAMED GRAPH ==> :DataMappings (Future)
#################################################################
:DataMapping {
<#SeismicMapping>
rml:logicalSource [
rml:source [
a carml:Stream;
];
rml:referenceFormulation ql:JSONPath;
rml:iterator "$.provision.content.[*]" ;
];
rr:subjectMap [
rr:template "http://w3id.org/semcon/seismic/{sourceId}" ;
];
rr:predicateObjectMap [
rr:predicate rdf:type;
rr:objectMap [ rr:template "http://w3id.org/semcon/ns/seismic#SeismicActivity" ];
];
rr:predicateObjectMap [
rr:predicate scs:lastUpdate;
rr:objectMap <#getTime> ;
];
rr:predicateObjectMap [
rr:predicate scs:magnitude;
rr:objectMap [
rml:reference "magnitude" ;
rr:datatype xsd:float ;
];
];
rr:predicateObjectMap [
rr:predicate scs:magnitudeType;
rr:objectMap [
rml:reference "magnitudeType" ;
];
];
rr:predicateObjectMap [
rr:predicate scs:auth;
rr:objectMap [
rml:reference "auth" ;
rr:datatype xsd:string ;
];
];
rr:predicateObjectMap [
rr:predicate scs:sourceId;
rr:objectMap [
rml:reference "sourceId" ;
rr:datatype xsd:string ;
];
];
rr:predicateObjectMap [
rr:predicate wgs:alt ;
rr:objectMap [ rml:reference "alt" ; ];
rr:datatype xsd:float ;
];
# rr:predicateObjectMap [
# rr:predicate wgs:lat ;
# rr:objectMap [ rml:reference "lat" ; ];
# rr:datatype xsd:float ;
# ];
#
# rr:predicateObjectMap [
# rr:predicate wgs:long ;
# rr:objectMap [ rml:reference "long" ; ];
# rr:datatype xsd:float ;
# ];
rr:predicateObjectMap [
rr:predicate geo:asWKT ;
rr:objectMap [
carml:multiTemplate "Point({lat} {long})" ;
rr:datatype geo:wktLiteral ;
];
];
.
<#getTime>
rr:termType rr:Literal ;
rr:datatype xsd:dateTime;
fnml:functionValue [
rr:subjectMap [
rr:template "http://w3id.org/semcon/seismic/{lastUpdate}";
];
rr:predicateObjectMap [
rr:predicate fno:executes ;
rr:object func:timeConversion ;
];
rr:predicateObjectMap [
rr:predicate param:time ;
rr:objectMap [
rml:reference "lastUpdate" ;
rr:datatype xsd:string ;
];
];
rr:predicateObjectMap [
rr:predicate param:timeFormat ;
rr:objectMap [
rr:template "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" ;
rr:datatype xsd:string ;
];
];
];
.
}
#################################################################
# NAMED GRAPH ==> :UserFunctions - Hydra function definitions (Future)
#################################################################
:UserFunction {
}