Showing
4 changed files
with
439 additions
and
0 deletions
This diff could not be displayed because it is too large.
1 | +SELECT DISTINCT ?RDLDesignation ?RDLDefinition ?EntityType ?RDLSuperclass ?ERHLocalname ?ERHOntology | ||
2 | +WHERE { | ||
3 | + ?s pca-rdl:hasDesignation ?RDLDesignation . | ||
4 | + ?s pca-rdl:hasDefinition ?RDLDefinition . | ||
5 | + ?s rdf:type ?p2 . | ||
6 | + BIND (afn:localname(?p2) AS ?EntityType ) | ||
7 | + OPTIONAL { | ||
8 | + ?spec ISO-15926-2_2003:hasSubclass ?s . | ||
9 | + ?spec ISO-15926-2_2003:hasSuperclass ?sup . | ||
10 | + ?sup pca-rdl:hasDesignation ?RDLSuperclass . | ||
11 | + } | ||
12 | + | ||
13 | + ?erh owl:sameAs ?s . | ||
14 | + BIND (afn:localname(?erh) AS ?ERHLocalname ) | ||
15 | + BIND (afn:namespace(?erh) AS ?ERHOntology ) | ||
16 | +} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +# baseURI: http://www.reportinghub.no/refdata/transform/class2rd | ||
2 | +# imports: http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003 | ||
3 | +# imports: http://rds.posccaesar.org/2008/06/OWL/RDL-annotations | ||
4 | +# imports: http://spinrdf.org/spin | ||
5 | +# imports: http://www.reportinghub.no/ep/schema/1.0/drilling | ||
6 | + | ||
7 | +@prefix : <http://www.reportinghub.no/refdata/transform/class2rd#> . | ||
8 | +@prefix ISO-15926-2_2003: <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#> . | ||
9 | +@prefix RDL-annotations: <http://rds.posccaesar.org/2008/06/OWL/RDL-annotations#> . | ||
10 | +@prefix afn: <http://jena.hpl.hp.com/ARQ/function#> . | ||
11 | +@prefix drilling: <http://www.reportinghub.no/ep/schema/1.0/drilling#> . | ||
12 | +@prefix fn: <http://www.w3.org/2005/xpath-functions#> . | ||
13 | +@prefix owl: <http://www.w3.org/2002/07/owl#> . | ||
14 | +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
15 | +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
16 | +@prefix sp: <http://spinrdf.org/sp#> . | ||
17 | +@prefix spif: <http://spinrdf.org/spif#> . | ||
18 | +@prefix spin: <http://spinrdf.org/spin#> . | ||
19 | +@prefix spl: <http://spinrdf.org/spl#> . | ||
20 | +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
21 | + | ||
22 | +<http://www.reportinghub.no/refdata/transform/class2rd> | ||
23 | + rdf:type owl:Ontology ; | ||
24 | + owl:imports <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003> , <http://rds.posccaesar.org/2008/06/OWL/RDL-annotations> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/drilling> ; | ||
25 | + owl:versionInfo "Created with TopBraid Composer"^^xsd:string . | ||
26 | + | ||
27 | +owl:Class | ||
28 | + spin:rule | ||
29 | + [ rdf:type sp:Construct ; | ||
30 | + rdfs:comment "0001 Set URI and designation for EHR RD Class"^^xsd:string ; | ||
31 | + sp:templates ([ sp:object | ||
32 | + [ sp:varName "thisrduri"^^xsd:string | ||
33 | + ] ; | ||
34 | + sp:predicate owl:sameAs ; | ||
35 | + sp:subject spin:_this | ||
36 | + ] [ sp:object | ||
37 | + [ sp:varName "desigation"^^xsd:string | ||
38 | + ] ; | ||
39 | + sp:predicate <http://posccaesar.org/rdl/hasDesignation> ; | ||
40 | + sp:subject | ||
41 | + [ sp:varName "thisrduri"^^xsd:string | ||
42 | + ] | ||
43 | + ] [ sp:object | ||
44 | + [ sp:varName "definition"^^xsd:string | ||
45 | + ] ; | ||
46 | + sp:predicate <http://posccaesar.org/rdl/hasDefinition> ; | ||
47 | + sp:subject | ||
48 | + [ sp:varName "thisrduri"^^xsd:string | ||
49 | + ] | ||
50 | + ] [ sp:object | ||
51 | + [ sp:varName "pcaid"^^xsd:string | ||
52 | + ] ; | ||
53 | + sp:predicate <http://posccaesar.org/rdl/hasIdPCA> ; | ||
54 | + sp:subject | ||
55 | + [ sp:varName "thisrduri"^^xsd:string | ||
56 | + ] | ||
57 | + ]) ; | ||
58 | + sp:where ([ rdf:type sp:NotExists ; | ||
59 | + sp:elements ([ sp:object | ||
60 | + [ sp:varName "same"^^xsd:string | ||
61 | + ] ; | ||
62 | + sp:predicate owl:sameAs ; | ||
63 | + sp:subject spin:_this | ||
64 | + ]) | ||
65 | + ] [ rdf:type sp:NotExists ; | ||
66 | + sp:elements ([ sp:object | ||
67 | + [ sp:varName "seerd"^^xsd:string | ||
68 | + ] ; | ||
69 | + sp:predicate <http://www.reportinghub.no/ep/schema/core#seeReferenceData> ; | ||
70 | + sp:subject spin:_this | ||
71 | + ]) | ||
72 | + ] [ rdf:type sp:Filter ; | ||
73 | + sp:expression | ||
74 | + [ rdf:type sp:ne ; | ||
75 | + sp:arg1 [ rdf:type afn:namespace ; | ||
76 | + sp:arg1 spin:_this | ||
77 | + ] ; | ||
78 | + sp:arg2 "http://www.linkedmodel.org/schema/vaem#" | ||
79 | + ] | ||
80 | + ] [ sp:object | ||
81 | + [ sp:varName "definition"^^xsd:string | ||
82 | + ] ; | ||
83 | + sp:predicate rdfs:comment ; | ||
84 | + sp:subject spin:_this | ||
85 | + ] [ sp:object | ||
86 | + [ sp:varName "label"^^xsd:string | ||
87 | + ] ; | ||
88 | + sp:predicate rdfs:label ; | ||
89 | + sp:subject spin:_this | ||
90 | + ] [ rdf:type sp:Bind ; | ||
91 | + sp:expression | ||
92 | + [ rdf:type spif:generateUUID | ||
93 | + ] ; | ||
94 | + sp:variable | ||
95 | + [ sp:varName "uuid"^^xsd:string | ||
96 | + ] | ||
97 | + ] [ rdf:type sp:Bind ; | ||
98 | + sp:expression | ||
99 | + [ rdf:type fn:concat ; | ||
100 | + sp:arg1 "ERH" ; | ||
101 | + sp:arg2 [ sp:varName "uuid"^^xsd:string | ||
102 | + ] | ||
103 | + ] ; | ||
104 | + sp:variable | ||
105 | + [ sp:varName "pcaid"^^xsd:string | ||
106 | + ] | ||
107 | + ] [ rdf:type sp:Bind ; | ||
108 | + sp:expression | ||
109 | + [ rdf:type spif:buildURI ; | ||
110 | + sp:arg1 "<http://posccaesar.org/{?pcaid}>" | ||
111 | + ] ; | ||
112 | + sp:variable | ||
113 | + [ sp:varName "thisrduri"^^xsd:string | ||
114 | + ] | ||
115 | + ] [ rdf:type sp:Bind ; | ||
116 | + sp:expression | ||
117 | + [ rdf:type fn:upper-case ; | ||
118 | + sp:arg1 [ sp:varName "label"^^xsd:string | ||
119 | + ] | ||
120 | + ] ; | ||
121 | + sp:variable | ||
122 | + [ sp:varName "desigation"^^xsd:string | ||
123 | + ] | ||
124 | + ]) | ||
125 | + ] ; | ||
126 | + spin:rule | ||
127 | + [ rdf:type sp:Construct ; | ||
128 | + rdfs:comment "0002 Handle subclasses"^^xsd:string ; | ||
129 | + sp:templates ([ sp:object ISO-15926-2_2003:Specialization ; | ||
130 | + sp:predicate rdf:type ; | ||
131 | + sp:subject | ||
132 | + [ sp:varName "specuri"^^xsd:string | ||
133 | + ] | ||
134 | + ] [ sp:object | ||
135 | + [ sp:varName "thisrduri"^^xsd:string | ||
136 | + ] ; | ||
137 | + sp:predicate ISO-15926-2_2003:hasSubclass ; | ||
138 | + sp:subject | ||
139 | + [ sp:varName "specuri"^^xsd:string | ||
140 | + ] | ||
141 | + ] [ sp:object | ||
142 | + [ sp:varName "superclassrduri"^^xsd:string | ||
143 | + ] ; | ||
144 | + sp:predicate ISO-15926-2_2003:hasSuperclass ; | ||
145 | + sp:subject | ||
146 | + [ sp:varName "specuri"^^xsd:string | ||
147 | + ] | ||
148 | + ]) ; | ||
149 | + sp:where ([ sp:object | ||
150 | + [ sp:varName "superclass"^^xsd:string | ||
151 | + ] ; | ||
152 | + sp:predicate rdfs:subClassOf ; | ||
153 | + sp:subject spin:_this | ||
154 | + ] [ sp:object | ||
155 | + [ sp:varName "thisrduri"^^xsd:string | ||
156 | + ] ; | ||
157 | + sp:predicate owl:sameAs ; | ||
158 | + sp:subject spin:_this | ||
159 | + ] [ sp:object | ||
160 | + [ sp:varName "superclassrduri"^^xsd:string | ||
161 | + ] ; | ||
162 | + sp:predicate owl:sameAs ; | ||
163 | + sp:subject | ||
164 | + [ sp:varName "superclass"^^xsd:string | ||
165 | + ] | ||
166 | + ] [ rdf:type sp:Bind ; | ||
167 | + sp:expression | ||
168 | + [ rdf:type spif:generateUUID | ||
169 | + ] ; | ||
170 | + sp:variable | ||
171 | + [ sp:varName "uuid"^^xsd:string | ||
172 | + ] | ||
173 | + ] [ rdf:type sp:Bind ; | ||
174 | + sp:expression | ||
175 | + [ rdf:type fn:concat ; | ||
176 | + sp:arg1 "ERH" ; | ||
177 | + sp:arg2 [ sp:varName "uuid"^^xsd:string | ||
178 | + ] | ||
179 | + ] ; | ||
180 | + sp:variable | ||
181 | + [ sp:varName "pcaid"^^xsd:string | ||
182 | + ] | ||
183 | + ] [ rdf:type sp:Bind ; | ||
184 | + sp:expression | ||
185 | + [ rdf:type spif:buildURI ; | ||
186 | + sp:arg1 "<http://posccaesar.org/{?pcaid}>" | ||
187 | + ] ; | ||
188 | + sp:variable | ||
189 | + [ sp:varName "specuri"^^xsd:string | ||
190 | + ] | ||
191 | + ]) | ||
192 | + ] ; | ||
193 | + spin:rule | ||
194 | + [ rdf:type sp:Construct ; | ||
195 | + rdfs:comment "0003 Set Part 2 Class of EHR RD Class"^^xsd:string ; | ||
196 | + sp:templates ([ sp:object | ||
197 | + [ sp:varName "p2class"^^xsd:string | ||
198 | + ] ; | ||
199 | + sp:predicate rdf:type ; | ||
200 | + sp:subject | ||
201 | + [ sp:varName "thisrduri"^^xsd:string | ||
202 | + ] | ||
203 | + ]) ; | ||
204 | + sp:where ([ sp:object | ||
205 | + [ sp:varName "thisrduri"^^xsd:string | ||
206 | + ] ; | ||
207 | + sp:predicate owl:sameAs ; | ||
208 | + sp:subject spin:_this | ||
209 | + ] [ rdf:type sp:Optional ; | ||
210 | + sp:elements ([ rdf:type sp:TriplePath ; | ||
211 | + sp:object <http://www.reportinghub.no/ep/schema/activity#Activity> ; | ||
212 | + sp:path [ rdf:type sp:ModPath ; | ||
213 | + sp:modMax -2 ; | ||
214 | + sp:modMin 0 ; | ||
215 | + sp:subPath rdfs:subClassOf | ||
216 | + ] ; | ||
217 | + sp:subject spin:_this | ||
218 | + ] [ rdf:type sp:Bind ; | ||
219 | + sp:expression ISO-15926-2_2003:ClassOfActivity ; | ||
220 | + sp:variable | ||
221 | + [ sp:varName "p2class"^^xsd:string | ||
222 | + ] | ||
223 | + ]) | ||
224 | + ] [ rdf:type sp:Optional ; | ||
225 | + sp:elements ([ rdf:type sp:TriplePath ; | ||
226 | + sp:object <http://www.reportinghub.no/ep/schema/facility#Facility> ; | ||
227 | + sp:path [ rdf:type sp:ModPath ; | ||
228 | + sp:modMax -2 ; | ||
229 | + sp:modMin 0 ; | ||
230 | + sp:subPath rdfs:subClassOf | ||
231 | + ] ; | ||
232 | + sp:subject spin:_this | ||
233 | + ] [ rdf:type sp:Bind ; | ||
234 | + sp:expression ISO-15926-2_2003:FunctionalPhysicalObject ; | ||
235 | + sp:variable | ||
236 | + [ sp:varName "p2class"^^xsd:string | ||
237 | + ] | ||
238 | + ]) | ||
239 | + ] [ rdf:type sp:Optional ; | ||
240 | + sp:elements ([ rdf:type sp:TriplePath ; | ||
241 | + sp:object <http://www.reportinghub.no/ep/schema/flow#Flow> ; | ||
242 | + sp:path [ rdf:type sp:ModPath ; | ||
243 | + sp:modMax -2 ; | ||
244 | + sp:modMin 0 ; | ||
245 | + sp:subPath rdfs:subClassOf | ||
246 | + ] ; | ||
247 | + sp:subject spin:_this | ||
248 | + ] [ rdf:type sp:Bind ; | ||
249 | + sp:expression ISO-15926-2_2003:ClassOfInanimatePhysicalObject ; | ||
250 | + sp:variable | ||
251 | + [ sp:varName "p2class"^^xsd:string | ||
252 | + ] | ||
253 | + ]) | ||
254 | + ] [ rdf:type sp:Optional ; | ||
255 | + sp:elements ([ rdf:type sp:TriplePath ; | ||
256 | + sp:object <http://www.reportinghub.no/ep/schema/equipment#Equipment> ; | ||
257 | + sp:path [ rdf:type sp:ModPath ; | ||
258 | + sp:modMax -2 ; | ||
259 | + sp:modMin 0 ; | ||
260 | + sp:subPath rdfs:subClassOf | ||
261 | + ] ; | ||
262 | + sp:subject spin:_this | ||
263 | + ] [ rdf:type sp:Bind ; | ||
264 | + sp:expression ISO-15926-2_2003:ClassOfInanimatePhysicalObject ; | ||
265 | + sp:variable | ||
266 | + [ sp:varName "p2class"^^xsd:string | ||
267 | + ] | ||
268 | + ]) | ||
269 | + ] [ rdf:type sp:Optional ; | ||
270 | + sp:elements ([ rdf:type sp:TriplePath ; | ||
271 | + sp:object <http://www.reportinghub.no/ep/schema/well#TemporalPartOfAWellBore> ; | ||
272 | + sp:path [ rdf:type sp:ModPath ; | ||
273 | + sp:modMax -2 ; | ||
274 | + sp:modMin 0 ; | ||
275 | + sp:subPath rdfs:subClassOf | ||
276 | + ] ; | ||
277 | + sp:subject spin:_this | ||
278 | + ] [ rdf:type sp:Bind ; | ||
279 | + sp:expression ISO-15926-2_2003:ClassOfInanimatePhysicalObject ; | ||
280 | + sp:variable | ||
281 | + [ sp:varName "p2class"^^xsd:string | ||
282 | + ] | ||
283 | + ]) | ||
284 | + ] [ rdf:type sp:Optional ; | ||
285 | + sp:elements ([ rdf:type sp:TriplePath ; | ||
286 | + sp:object <http://www.reportinghub.no/ep/schema/well#SpatialPartOfAWellBore> ; | ||
287 | + sp:path [ rdf:type sp:ModPath ; | ||
288 | + sp:modMax -2 ; | ||
289 | + sp:modMin 0 ; | ||
290 | + sp:subPath rdfs:subClassOf | ||
291 | + ] ; | ||
292 | + sp:subject spin:_this | ||
293 | + ] [ rdf:type sp:Bind ; | ||
294 | + sp:expression ISO-15926-2_2003:ClassOfInanimatePhysicalObject ; | ||
295 | + sp:variable | ||
296 | + [ sp:varName "p2class"^^xsd:string | ||
297 | + ] | ||
298 | + ]) | ||
299 | + ] [ rdf:type sp:Optional ; | ||
300 | + sp:elements ([ rdf:type sp:TriplePath ; | ||
301 | + sp:object <http://www.reportinghub.no/ep/schema/well#SpatialPartOfAWell> ; | ||
302 | + sp:path [ rdf:type sp:ModPath ; | ||
303 | + sp:modMax -2 ; | ||
304 | + sp:modMin 0 ; | ||
305 | + sp:subPath rdfs:subClassOf | ||
306 | + ] ; | ||
307 | + sp:subject spin:_this | ||
308 | + ] [ rdf:type sp:Bind ; | ||
309 | + sp:expression ISO-15926-2_2003:ClassOfInanimatePhysicalObject ; | ||
310 | + sp:variable | ||
311 | + [ sp:varName "p2class"^^xsd:string | ||
312 | + ] | ||
313 | + ]) | ||
314 | + ] [ rdf:type sp:Optional ; | ||
315 | + sp:elements ([ rdf:type sp:TriplePath ; | ||
316 | + sp:object <http://www.reportinghub.no/ep/schema/well#TemporalPartOfAWell> ; | ||
317 | + sp:path [ rdf:type sp:ModPath ; | ||
318 | + sp:modMax -2 ; | ||
319 | + sp:modMin 0 ; | ||
320 | + sp:subPath rdfs:subClassOf | ||
321 | + ] ; | ||
322 | + sp:subject spin:_this | ||
323 | + ] [ rdf:type sp:Bind ; | ||
324 | + sp:expression ISO-15926-2_2003:ClassOfInanimatePhysicalObject ; | ||
325 | + sp:variable | ||
326 | + [ sp:varName "p2class"^^xsd:string | ||
327 | + ] | ||
328 | + ]) | ||
329 | + ] [ rdf:type sp:Optional ; | ||
330 | + sp:elements ([ rdf:type sp:TriplePath ; | ||
331 | + sp:object <http://www.reportinghub.no/ep/schema/geography#PartOfTheSurfaceOfTheEarth> ; | ||
332 | + sp:path [ rdf:type sp:ModPath ; | ||
333 | + sp:modMax -2 ; | ||
334 | + sp:modMin 0 ; | ||
335 | + sp:subPath rdfs:subClassOf | ||
336 | + ] ; | ||
337 | + sp:subject spin:_this | ||
338 | + ] [ rdf:type sp:Bind ; | ||
339 | + sp:expression ISO-15926-2_2003:ClassOfInanimatePhysicalObject ; | ||
340 | + sp:variable | ||
341 | + [ sp:varName "p2class"^^xsd:string | ||
342 | + ] | ||
343 | + ]) | ||
344 | + ] [ rdf:type sp:Optional ; | ||
345 | + sp:elements ([ rdf:type sp:TriplePath ; | ||
346 | + sp:object <http://www.reportinghub.no/ep/schema/material#Material> ; | ||
347 | + sp:path [ rdf:type sp:ModPath ; | ||
348 | + sp:modMax -2 ; | ||
349 | + sp:modMin 0 ; | ||
350 | + sp:subPath rdfs:subClassOf | ||
351 | + ] ; | ||
352 | + sp:subject spin:_this | ||
353 | + ] [ rdf:type sp:Bind ; | ||
354 | + sp:expression ISO-15926-2_2003:ClassOfCompound ; | ||
355 | + sp:variable | ||
356 | + [ sp:varName "p2class"^^xsd:string | ||
357 | + ] | ||
358 | + ]) | ||
359 | + ] [ rdf:type sp:Optional ; | ||
360 | + sp:elements ([ rdf:type sp:TriplePath ; | ||
361 | + sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ; | ||
362 | + sp:path [ rdf:type sp:ModPath ; | ||
363 | + sp:modMax -2 ; | ||
364 | + sp:modMin 0 ; | ||
365 | + sp:subPath rdfs:subClassOf | ||
366 | + ] ; | ||
367 | + sp:subject spin:_this | ||
368 | + ] [ rdf:type sp:Bind ; | ||
369 | + sp:expression ISO-15926-2_2003:ClassOfOrganization ; | ||
370 | + sp:variable | ||
371 | + [ sp:varName "p2class"^^xsd:string | ||
372 | + ] | ||
373 | + ]) | ||
374 | + ] [ rdf:type sp:Optional ; | ||
375 | + sp:elements ([ rdf:type sp:TriplePath ; | ||
376 | + sp:object <http://www.reportinghub.no/ep/schema/organization#Person> ; | ||
377 | + sp:path [ rdf:type sp:ModPath ; | ||
378 | + sp:modMax -2 ; | ||
379 | + sp:modMin 0 ; | ||
380 | + sp:subPath rdfs:subClassOf | ||
381 | + ] ; | ||
382 | + sp:subject spin:_this | ||
383 | + ] [ rdf:type sp:Bind ; | ||
384 | + sp:expression ISO-15926-2_2003:ClassOfPerson ; | ||
385 | + sp:variable | ||
386 | + [ sp:varName "p2class"^^xsd:string | ||
387 | + ] | ||
388 | + ]) | ||
389 | + ] [ rdf:type sp:Optional ; | ||
390 | + sp:elements ([ rdf:type sp:TriplePath ; | ||
391 | + sp:object <http://www.reportinghub.no/ep/schema/report#Report> ; | ||
392 | + sp:path [ rdf:type sp:ModPath ; | ||
393 | + sp:modMax -2 ; | ||
394 | + sp:modMin 0 ; | ||
395 | + sp:subPath rdfs:subClassOf | ||
396 | + ] ; | ||
397 | + sp:subject spin:_this | ||
398 | + ] [ rdf:type sp:Bind ; | ||
399 | + sp:expression ISO-15926-2_2003:ClassOfInformationObject ; | ||
400 | + sp:variable | ||
401 | + [ sp:varName "p2class"^^xsd:string | ||
402 | + ] | ||
403 | + ]) | ||
404 | + ]) | ||
405 | + ] . |
1 | +# baseURI: null | ||
2 | + | ||
3 | +@prefix composite: <http://www.topbraid.org/2007/05/composite.owl#> . | ||
4 | +@prefix forms: <http://www.topbraid.org/2007/01/forms.owl#> . | ||
5 | +@prefix inference: <http://www.topbraid.org/2007/06/inference.owl#> . | ||
6 | +@prefix owl: <http://www.w3.org/2002/07/owl#> . | ||
7 | +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
8 | +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
9 | +@prefix visual: <http://topbraid.org/visual#> . | ||
10 | +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
11 | + | ||
12 | +[] rdf:type inference:Configuration ; | ||
13 | + composite:child | ||
14 | + [ rdf:type <http://spinrdf.org/spin#TopSPIN> ; | ||
15 | + <http://spinrdf.org/spin#topSPINOptions> | ||
16 | + "singlePass" ; | ||
17 | + composite:index "0"^^xsd:int | ||
18 | + ] . |
-
Please register or login to post a comment