First load - put these up here in case anyone wants to make use of
them.
Showing
1 changed file
with
337 additions
and
0 deletions
1 | +# Saved by TopBraid on Thu Aug 04 09:37:09 BST 2011 | ||
2 | +# baseURI: http://www.reportinghub.no/1.1/schema/NPD-to-15926 | ||
3 | +# imports: http://topbraid.org/spin/spinmapl | ||
4 | +# imports: http://spinrdf.org/spin | ||
5 | +# imports: http://www.reportinghub.no/1.1/schema/npd | ||
6 | +# imports: http://rds.posccaesar.org/2008/06/OWL/RDL | ||
7 | + | ||
8 | +@prefix afn: <http://jena.hpl.hp.com/ARQ/function#> . | ||
9 | +@prefix dm: <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#> . | ||
10 | +@prefix npd: <http://www.reportinghub.no/schema/npd#> . | ||
11 | +@prefix npdMap: <http://www.reportinghub.no/1.1/schema/NPD-to-15926#> . | ||
12 | +@prefix owl: <http://www.w3.org/2002/07/owl#> . | ||
13 | +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
14 | +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
15 | +@prefix rdl: <http://rds.posccaesar.org/2008/06/OWL/RDL#> . | ||
16 | +@prefix smf: <http://topbraid.org/sparqlmotionfunctions#> . | ||
17 | +@prefix sp: <http://spinrdf.org/sp#> . | ||
18 | +@prefix spif: <http://spinrdf.org/spif#> . | ||
19 | +@prefix spin: <http://spinrdf.org/spin#> . | ||
20 | +@prefix spl: <http://spinrdf.org/spl#> . | ||
21 | +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
22 | + | ||
23 | +<http://www.reportinghub.no/1.1/schema/NPD-to-15926> | ||
24 | + rdf:type owl:Ontology ; | ||
25 | + owl:imports <http://rds.posccaesar.org/2008/06/OWL/RDL> , <http://www.reportinghub.no/1.1/schema/npd> , <http://topbraid.org/spin/spinmapl> , <http://spinrdf.org/spin> ; | ||
26 | + owl:versionInfo "Created with TopBraid Composer"^^xsd:string . | ||
27 | + | ||
28 | +npdMap:ClassifyArrangedIndividual | ||
29 | + rdf:type spin:ConstructTemplate ; | ||
30 | + rdfs:comment """?AI is the Arranged_Individual that is the wellbore | ||
31 | +?AIClsn is the classification relationship from ?ai to the RDL entry for Wellbore - RDS1714464911"""^^xsd:string ; | ||
32 | + rdfs:subClassOf spin:ConstructTemplates ; | ||
33 | + spin:body | ||
34 | + [ rdf:type sp:Construct ; | ||
35 | + rdfs:comment """?AI is the Arranged_Individual that is the wellbore | ||
36 | +?AIClsn is the classification relationship from ?ai to the RDL entry referred to by arg1"""^^xsd:string ; | ||
37 | + sp:templates ([ sp:object dm:ArrangedIndividual ; | ||
38 | + sp:predicate rdf:type ; | ||
39 | + sp:subject _:b1 | ||
40 | + ] [ sp:object dm:Classification ; | ||
41 | + sp:predicate rdf:type ; | ||
42 | + sp:subject _:b2 | ||
43 | + ] [ sp:object _:b1 ; | ||
44 | + sp:predicate dm:hasClassified ; | ||
45 | + sp:subject _:b2 | ||
46 | + ] [ sp:object spin:_arg1 ; | ||
47 | + sp:predicate dm:hasClassifier ; | ||
48 | + sp:subject _:b2 | ||
49 | + ]) ; | ||
50 | + sp:where ([ sp:object _:b3 ; | ||
51 | + sp:predicate rdf:type ; | ||
52 | + sp:subject spin:_this | ||
53 | + ] [ sp:object | ||
54 | + [ sp:varName "npdid"^^xsd:string | ||
55 | + ] ; | ||
56 | + sp:predicate npd:id ; | ||
57 | + sp:subject spin:_this | ||
58 | + ] [ rdf:type sp:Bind ; | ||
59 | + sp:expression "http://www.reportinghub.no/ep/" ; | ||
60 | + sp:variable | ||
61 | + [ sp:varName "base"^^xsd:string | ||
62 | + ] | ||
63 | + ] [ rdf:type sp:Bind ; | ||
64 | + sp:expression | ||
65 | + [ rdf:type spif:buildURI ; | ||
66 | + sp:arg1 [ rdf:type sp:add ; | ||
67 | + sp:arg1 [ rdf:type sp:add ; | ||
68 | + sp:arg1 "<{?base}" ; | ||
69 | + sp:arg2 [ rdf:type afn:localname ; | ||
70 | + sp:arg1 _:b3 | ||
71 | + ] | ||
72 | + ] ; | ||
73 | + sp:arg2 "AI-{?npdid}>" | ||
74 | + ] | ||
75 | + ] ; | ||
76 | + sp:variable _:b1 | ||
77 | + ] [ rdf:type sp:Bind ; | ||
78 | + sp:expression | ||
79 | + [ rdf:type smf:buildURI ; | ||
80 | + sp:arg1 [ rdf:type sp:add ; | ||
81 | + sp:arg1 [ rdf:type sp:add ; | ||
82 | + sp:arg1 "<{?base}" ; | ||
83 | + sp:arg2 [ rdf:type afn:localname ; | ||
84 | + sp:arg1 _:b3 | ||
85 | + ] | ||
86 | + ] ; | ||
87 | + sp:arg2 "AIClsn-{?npdid}>" | ||
88 | + ] | ||
89 | + ] ; | ||
90 | + sp:variable _:b2 | ||
91 | + ]) | ||
92 | + ] ; | ||
93 | + spin:constraint | ||
94 | + [ rdf:type spl:Argument ; | ||
95 | + spl:predicate sp:arg1 ; | ||
96 | + spl:valueType owl:Thing | ||
97 | + ] ; | ||
98 | + spin:labelTemplate """?AI is the Arranged_Individual that is the wellbore | ||
99 | +?AIClsn is the classification relationship from ?ai to the RDL entry referred to by arg1"""^^xsd:string . | ||
100 | + | ||
101 | +npdMap:CreateIndividualWithNPDID | ||
102 | + rdf:type spin:ConstructTemplate ; | ||
103 | + rdfs:comment """?Arg1 is the type of object - e.g. \"WellBore\", \"Licence\", etc.?AI is the Arranged_Individual | ||
104 | +?npdExpStr is the Express_string that holds the NPDID text | ||
105 | +?npdCOI is the class of Identification relating ?ai to ?npdExpStr | ||
106 | +?npdCOIClsn is classification relationship from ?npdCOI to the RDL entry for NPD Identifier - RDS487765302 | ||
107 | +?wbIDExpStr is the Express_string that holds the wellbore id code | ||
108 | +?wbCOI is the class of Identification relating ?ai to ?wbIDExpStr | ||
109 | +?wbIDCOIClsn is classification relationship from ?wbCOI to the RDL entry for wellbore identification code - RDS16622067"""^^xsd:string ; | ||
110 | + rdfs:subClassOf spin:ConstructTemplates ; | ||
111 | + spin:body | ||
112 | + [ rdf:type sp:Construct ; | ||
113 | + rdfs:comment """?Arg1 is the type of object - e.g. \"WellBore\", \"Licence\", etc. | ||
114 | +?AI is the Arranged_Individual | ||
115 | +?npdExpStr is the Express_string that holds the NPDID text | ||
116 | +?npdCOI is the class of Identification relating ?ai to ?npdExpStr | ||
117 | +?npdCOIClsn is classification relationship from ?npdCOI to the RDL entry for NPD Identifier - RDS487765302 | ||
118 | +?wbIDExpStr is the Express_string that holds the wellbore id code | ||
119 | +?wbCOI is the class of Identification relating ?ai to ?wbIDExpStr | ||
120 | +?wbIDCOIClsn is classification relationship from ?wbCOI to the RDL entry for wellbore identification code - RDS16622067"""^^xsd:string ; | ||
121 | + sp:templates ([ sp:object dm:ArrangedIndividual ; | ||
122 | + sp:predicate rdf:type ; | ||
123 | + sp:subject _:b4 | ||
124 | + ] [ sp:object dm:ClassOfIdentification ; | ||
125 | + sp:predicate rdf:type ; | ||
126 | + sp:subject _:b5 | ||
127 | + ] [ sp:object _:b4 ; | ||
128 | + sp:predicate dm:hasRepresented ; | ||
129 | + sp:subject _:b5 | ||
130 | + ] [ sp:object dm:ExpressString ; | ||
131 | + sp:predicate rdf:type ; | ||
132 | + sp:subject _:b6 | ||
133 | + ] [ sp:object _:b6 ; | ||
134 | + sp:predicate dm:hasPattern ; | ||
135 | + sp:subject _:b5 | ||
136 | + ] [ sp:object dm:Classification ; | ||
137 | + sp:predicate rdf:type ; | ||
138 | + sp:subject _:b7 | ||
139 | + ] [ sp:object _:b5 ; | ||
140 | + sp:predicate dm:hasClassified ; | ||
141 | + sp:subject _:b7 | ||
142 | + ] [ sp:object rdl:RDS487765302 ; | ||
143 | + sp:predicate dm:hasClassifier ; | ||
144 | + sp:subject _:b7 | ||
145 | + ] [ sp:object _:b8 ; | ||
146 | + sp:predicate dm:hasContent ; | ||
147 | + sp:subject _:b6 | ||
148 | + ]) ; | ||
149 | + sp:where ([ sp:object _:b8 ; | ||
150 | + sp:predicate npd:id ; | ||
151 | + sp:subject spin:_this | ||
152 | + ] [ sp:object _:b9 ; | ||
153 | + sp:predicate rdf:type ; | ||
154 | + sp:subject spin:_this | ||
155 | + ] [ rdf:type sp:Bind ; | ||
156 | + sp:expression "http://www.reportinghub.no/ep/" ; | ||
157 | + sp:variable | ||
158 | + [ sp:varName "base"^^xsd:string | ||
159 | + ] | ||
160 | + ] [ rdf:type sp:Bind ; | ||
161 | + sp:expression | ||
162 | + [ rdf:type spif:buildURI ; | ||
163 | + sp:arg1 [ rdf:type sp:add ; | ||
164 | + sp:arg1 [ rdf:type sp:add ; | ||
165 | + sp:arg1 "<{?base}" ; | ||
166 | + sp:arg2 [ rdf:type afn:localname ; | ||
167 | + sp:arg1 _:b9 | ||
168 | + ] | ||
169 | + ] ; | ||
170 | + sp:arg2 "AI-{?npdid}>" | ||
171 | + ] | ||
172 | + ] ; | ||
173 | + sp:variable _:b4 | ||
174 | + ] [ rdf:type sp:Bind ; | ||
175 | + sp:expression | ||
176 | + [ rdf:type spif:buildURI ; | ||
177 | + sp:arg1 [ rdf:type sp:add ; | ||
178 | + sp:arg1 [ rdf:type sp:add ; | ||
179 | + sp:arg1 "<{?base}" ; | ||
180 | + sp:arg2 [ rdf:type afn:localname ; | ||
181 | + sp:arg1 _:b9 | ||
182 | + ] | ||
183 | + ] ; | ||
184 | + sp:arg2 "CoINPDID-{?npdid}>" | ||
185 | + ] | ||
186 | + ] ; | ||
187 | + sp:variable _:b5 | ||
188 | + ] [ rdf:type sp:Bind ; | ||
189 | + sp:expression | ||
190 | + [ rdf:type spif:buildURI ; | ||
191 | + sp:arg1 [ rdf:type sp:add ; | ||
192 | + sp:arg1 [ rdf:type sp:add ; | ||
193 | + sp:arg1 "<{?base}" ; | ||
194 | + sp:arg2 [ rdf:type afn:localname ; | ||
195 | + sp:arg1 _:b9 | ||
196 | + ] | ||
197 | + ] ; | ||
198 | + sp:arg2 "CoINPDIDClsn-{?npdid}>" | ||
199 | + ] | ||
200 | + ] ; | ||
201 | + sp:variable _:b7 | ||
202 | + ] [ rdf:type sp:Bind ; | ||
203 | + sp:expression | ||
204 | + [ rdf:type spif:buildURI ; | ||
205 | + sp:arg1 [ rdf:type sp:add ; | ||
206 | + sp:arg1 [ rdf:type sp:add ; | ||
207 | + sp:arg1 "<{?base}" ; | ||
208 | + sp:arg2 [ rdf:type afn:localname ; | ||
209 | + sp:arg1 _:b9 | ||
210 | + ] | ||
211 | + ] ; | ||
212 | + sp:arg2 "NPDIDExpressString-{?npdid}>" | ||
213 | + ] | ||
214 | + ] ; | ||
215 | + sp:variable _:b6 | ||
216 | + ]) | ||
217 | + ] ; | ||
218 | + spin:labelTemplate """?AI is the Arranged_Individual that is the wellbore | ||
219 | +?npdExpStr is the Express_string that holds the NPDID text | ||
220 | +?npdCOI is the class of Identification relating ?ai to ?npdExpStr | ||
221 | +?npdCOIClsn is classification relationship from ?npdCOI to the RDL entry for NPD Identifier - RDS487765302 | ||
222 | +?wbIDExpStr is the Express_string that holds the wellbore id code | ||
223 | +?wbCOI is the class of Identification relating ?ai to ?wbIDExpStr | ||
224 | +?wbIDCOIClsn is classification relationship from ?wbCOI to the RDL entry for wellbore identification code - RDS16622067"""^^xsd:string . | ||
225 | + | ||
226 | +npdMap:Licence_1 | ||
227 | + rdf:type npd:Licence ; | ||
228 | + npd:id "ABC123"^^xsd:string . | ||
229 | + | ||
230 | +npd:NpdIndividual | ||
231 | + spin:rule | ||
232 | + [ rdf:type npdMap:CreateIndividualWithNPDID ; | ||
233 | + sp:arg1 "\"Individual\""^^xsd:string | ||
234 | + ] . | ||
235 | + | ||
236 | +npd:WellBore | ||
237 | + spin:rule | ||
238 | + [ rdf:type sp:Construct ; | ||
239 | + rdfs:comment """This rule creates the WellBore and Well and joins them up using a composition relationship (dm:ArrangementOfIndividual) | ||
240 | +Note that because it uses the same URI production rule as other functions, we don't get repeated instances of the Well and WellBore...hopefully"""^^xsd:string ; | ||
241 | + sp:templates ([ sp:object dm:ArrangedIndividual ; | ||
242 | + sp:predicate rdf:type ; | ||
243 | + sp:subject _:b10 | ||
244 | + ] [ sp:object dm:ArrangedIndividual ; | ||
245 | + sp:predicate rdf:type ; | ||
246 | + sp:subject _:b11 | ||
247 | + ] [ sp:object dm:ArrangementOfIndividual ; | ||
248 | + sp:predicate rdf:type ; | ||
249 | + sp:subject _:b12 | ||
250 | + ] [ sp:object _:b11 ; | ||
251 | + sp:predicate dm:hasWhole ; | ||
252 | + sp:subject _:b12 | ||
253 | + ] [ sp:object _:b10 ; | ||
254 | + sp:predicate dm:hasPart ; | ||
255 | + sp:subject _:b12 | ||
256 | + ]) ; | ||
257 | + sp:where ([ sp:object | ||
258 | + [ sp:varName "npdid"^^xsd:string | ||
259 | + ] ; | ||
260 | + sp:predicate npd:id ; | ||
261 | + sp:subject spin:_this | ||
262 | + ] [ sp:object _:b13 ; | ||
263 | + sp:predicate npd:partOfWell ; | ||
264 | + sp:subject spin:_this | ||
265 | + ] [ sp:object | ||
266 | + [ sp:varName "wellName"^^xsd:string | ||
267 | + ] ; | ||
268 | + sp:predicate npd:name ; | ||
269 | + sp:subject _:b13 | ||
270 | + ] [ rdf:type sp:Bind ; | ||
271 | + sp:expression "http://www.reportinghub.no/ep/" ; | ||
272 | + sp:variable | ||
273 | + [ sp:varName "base"^^xsd:string | ||
274 | + ] | ||
275 | + ] [ rdf:type sp:Bind ; | ||
276 | + sp:expression | ||
277 | + [ rdf:type smf:buildURI ; | ||
278 | + sp:arg1 "<{?base}WellAI-{?wellName}>" | ||
279 | + ] ; | ||
280 | + sp:variable _:b11 | ||
281 | + ] [ rdf:type sp:Bind ; | ||
282 | + sp:expression | ||
283 | + [ rdf:type smf:buildURI ; | ||
284 | + sp:arg1 "<{?base}WellBoreAI-{?npdid}>" | ||
285 | + ] ; | ||
286 | + sp:variable _:b10 | ||
287 | + ] [ rdf:type sp:Bind ; | ||
288 | + sp:expression | ||
289 | + [ rdf:type smf:buildURI ; | ||
290 | + sp:arg1 "<{?base}WellBoreComposition-{?npdid}>" | ||
291 | + ] ; | ||
292 | + sp:variable _:b12 | ||
293 | + ]) | ||
294 | + ] ; | ||
295 | + spin:rule | ||
296 | + [ rdf:type npdMap:ClassifyArrangedIndividual | ||
297 | + ] . | ||
298 | + | ||
299 | +npd:WellBore_1 | ||
300 | + npd:drilledInProductionLicence | ||
301 | + npdMap:Licence_1 . | ||
302 | + | ||
303 | +npd:wellDiskosType | ||
304 | + rdf:type owl:DatatypeProperty ; | ||
305 | + rdfs:comment "Corresponds to DISKOS Type field in WellBore tables"^^xsd:string ; | ||
306 | + rdfs:domain npd:Well ; | ||
307 | + rdfs:range xsd:string . | ||
308 | + | ||
309 | +_:b13 | ||
310 | + sp:varName "well"^^xsd:string . | ||
311 | + | ||
312 | +_:b12 | ||
313 | + sp:varName "wellBoreComp"^^xsd:string . | ||
314 | + | ||
315 | +_:b11 | ||
316 | + sp:varName "wellAI"^^xsd:string . | ||
317 | + | ||
318 | +_:b10 | ||
319 | + sp:varName "wellBoreAI"^^xsd:string . | ||
320 | + | ||
321 | +_:b9 sp:varName "npdType"^^xsd:string . | ||
322 | + | ||
323 | +_:b8 sp:varName "npdid"^^xsd:string . | ||
324 | + | ||
325 | +_:b7 sp:varName "npdCOIClsn"^^xsd:string . | ||
326 | + | ||
327 | +_:b6 sp:varName "npdExpStr"^^xsd:string . | ||
328 | + | ||
329 | +_:b5 sp:varName "npdCOI"^^xsd:string . | ||
330 | + | ||
331 | +_:b4 sp:varName "AI"^^xsd:string . | ||
332 | + | ||
333 | +_:b3 sp:varName "npdType"^^xsd:string . | ||
334 | + | ||
335 | +_:b2 sp:varName "AIClsn"^^xsd:string . | ||
336 | + | ||
337 | +_:b1 sp:varName "AI"^^xsd:string . |
-
Please register or login to post a comment