Holger Knublauch

Adjusted some SPIN functions to align with NPD names

Added NPDI example file for all known well/bore IDs
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
13 13
14 <http://www.reportinghub.no/ep/schema/1.0/activity> 14 <http://www.reportinghub.no/ep/schema/1.0/activity>
15 rdf:type owl:Ontology ; 15 rdf:type owl:Ontology ;
16 - owl:imports <http://www.reportinghub.no/ep/schema/1.0/well> , <http://www.linkedmodel.org/1.1/schema/ordered> , <http://www.linkedmodel.org/1.2/schema/vaem> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.reportinghub.no/ep/schema/1.0/equipment> ; 16 + owl:imports <http://www.reportinghub.no/ep/schema/1.0/equipment> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.linkedmodel.org/1.2/schema/vaem> , <http://www.linkedmodel.org/1.1/schema/ordered> , <http://www.reportinghub.no/ep/schema/1.0/well> ;
17 owl:versionInfo "0.1.0"^^xsd:string . 17 owl:versionInfo "0.1.0"^^xsd:string .
18 18
19 ep-activity:Activity 19 ep-activity:Activity
...@@ -22,33 +22,33 @@ ep-activity:Activity ...@@ -22,33 +22,33 @@ ep-activity:Activity
22 rdfs:subClassOf <http://www.reportinghub.no/ep/schema/core#PhysicalThing> ; 22 rdfs:subClassOf <http://www.reportinghub.no/ep/schema/core#PhysicalThing> ;
23 rdfs:subClassOf 23 rdfs:subClassOf
24 [ rdf:type owl:Restriction ; 24 [ rdf:type owl:Restriction ;
25 - owl:allValuesFrom ep-activity:Activity ; 25 + owl:maxCardinality "1"^^xsd:nonNegativeInteger ;
26 - owl:onProperty <http://www.linkedmodel.org/schema/ordered#during> 26 + owl:onProperty ep-activity:finishedAt
27 ] ; 27 ] ;
28 rdfs:subClassOf 28 rdfs:subClassOf
29 [ rdf:type owl:Restriction ; 29 [ rdf:type owl:Restriction ;
30 - owl:allValuesFrom ep-activity:Activity ; 30 + owl:maxCardinality "1"^^xsd:nonNegativeInteger ;
31 - owl:onProperty <http://www.linkedmodel.org/schema/ordered#overlaps> 31 + owl:onProperty ep-activity:startedAt
32 ] ; 32 ] ;
33 rdfs:subClassOf 33 rdfs:subClassOf
34 [ rdf:type owl:Restriction ; 34 [ rdf:type owl:Restriction ;
35 owl:allValuesFrom ep-activity:Activity ; 35 owl:allValuesFrom ep-activity:Activity ;
36 - owl:onProperty <http://www.linkedmodel.org/schema/ordered#before> 36 + owl:onProperty <http://www.linkedmodel.org/schema/ordered#after>
37 ] ; 37 ] ;
38 rdfs:subClassOf 38 rdfs:subClassOf
39 [ rdf:type owl:Restriction ; 39 [ rdf:type owl:Restriction ;
40 owl:allValuesFrom ep-activity:Activity ; 40 owl:allValuesFrom ep-activity:Activity ;
41 - owl:onProperty <http://www.linkedmodel.org/schema/ordered#after> 41 + owl:onProperty <http://www.linkedmodel.org/schema/ordered#before>
42 ] ; 42 ] ;
43 rdfs:subClassOf 43 rdfs:subClassOf
44 [ rdf:type owl:Restriction ; 44 [ rdf:type owl:Restriction ;
45 - owl:maxCardinality "1"^^xsd:nonNegativeInteger ; 45 + owl:allValuesFrom ep-activity:Activity ;
46 - owl:onProperty ep-activity:startedAt 46 + owl:onProperty <http://www.linkedmodel.org/schema/ordered#overlaps>
47 ] ; 47 ] ;
48 rdfs:subClassOf 48 rdfs:subClassOf
49 [ rdf:type owl:Restriction ; 49 [ rdf:type owl:Restriction ;
50 - owl:maxCardinality "1"^^xsd:nonNegativeInteger ; 50 + owl:allValuesFrom ep-activity:Activity ;
51 - owl:onProperty ep-activity:finishedAt 51 + owl:onProperty <http://www.linkedmodel.org/schema/ordered#during>
52 ] . 52 ] .
53 53
54 ep-activity:DailyDrillingActivity 54 ep-activity:DailyDrillingActivity
...@@ -57,13 +57,13 @@ ep-activity:DailyDrillingActivity ...@@ -57,13 +57,13 @@ ep-activity:DailyDrillingActivity
57 rdfs:subClassOf ep-activity:DrillingActivity ; 57 rdfs:subClassOf ep-activity:DrillingActivity ;
58 rdfs:subClassOf 58 rdfs:subClassOf
59 [ rdf:type owl:Restriction ; 59 [ rdf:type owl:Restriction ;
60 - owl:allValuesFrom ep-activity:DrillingActivity ; 60 + owl:allValuesFrom ep-activity:Activity ;
61 - owl:onProperty <http://www.linkedmodel.org/schema/ordered#last> 61 + owl:onProperty <http://www.reportinghub.no/ep/schema/core#hasPart>
62 ] ; 62 ] ;
63 rdfs:subClassOf 63 rdfs:subClassOf
64 [ rdf:type owl:Restriction ; 64 [ rdf:type owl:Restriction ;
65 - owl:allValuesFrom <http://www.reportinghub.no/ep/schema/well#AllOrPartOfTheLifeOfAWellBore> ; 65 + owl:allValuesFrom ep-activity:DrillingActivity ;
66 - owl:onProperty ep-activity:onWellBore 66 + owl:onProperty <http://www.linkedmodel.org/schema/ordered#first>
67 ] ; 67 ] ;
68 rdfs:subClassOf 68 rdfs:subClassOf
69 [ rdf:type owl:Restriction ; 69 [ rdf:type owl:Restriction ;
...@@ -72,13 +72,13 @@ ep-activity:DailyDrillingActivity ...@@ -72,13 +72,13 @@ ep-activity:DailyDrillingActivity
72 ] ; 72 ] ;
73 rdfs:subClassOf 73 rdfs:subClassOf
74 [ rdf:type owl:Restriction ; 74 [ rdf:type owl:Restriction ;
75 - owl:allValuesFrom ep-activity:DrillingActivity ; 75 + owl:allValuesFrom <http://www.reportinghub.no/ep/schema/well#AllOrPartOfTheLifeOfAWellBore> ;
76 - owl:onProperty <http://www.linkedmodel.org/schema/ordered#first> 76 + owl:onProperty ep-activity:onWellBore
77 ] ; 77 ] ;
78 rdfs:subClassOf 78 rdfs:subClassOf
79 [ rdf:type owl:Restriction ; 79 [ rdf:type owl:Restriction ;
80 - owl:allValuesFrom ep-activity:Activity ; 80 + owl:allValuesFrom ep-activity:DrillingActivity ;
81 - owl:onProperty <http://www.reportinghub.no/ep/schema/core#hasPart> 81 + owl:onProperty <http://www.linkedmodel.org/schema/ordered#last>
82 ] . 82 ] .
83 83
84 ep-activity:DailyDrillingReportFinalisationType 84 ep-activity:DailyDrillingReportFinalisationType
...@@ -132,13 +132,13 @@ ep-activity:DrillingActivity ...@@ -132,13 +132,13 @@ ep-activity:DrillingActivity
132 rdfs:subClassOf ep-activity:Activity . 132 rdfs:subClassOf ep-activity:Activity .
133 133
134 ep-activity:FormationIntegrityTest 134 ep-activity:FormationIntegrityTest
135 - rdf:type ep-activity:PressureTestType , owl:Class ; 135 + rdf:type owl:Class , ep-activity:PressureTestType ;
136 rdfs:label "formation integrity test"^^xsd:string ; 136 rdfs:label "formation integrity test"^^xsd:string ;
137 rdfs:subClassOf ep-activity:WellBorePressureTest ; 137 rdfs:subClassOf ep-activity:WellBorePressureTest ;
138 owl:disjointWith ep-activity:LeakOffTest . 138 owl:disjointWith ep-activity:LeakOffTest .
139 139
140 ep-activity:LeakOffTest 140 ep-activity:LeakOffTest
141 - rdf:type ep-activity:PressureTestType , owl:Class ; 141 + rdf:type owl:Class , ep-activity:PressureTestType ;
142 rdfs:label "leak-off test"^^xsd:string ; 142 rdfs:label "leak-off test"^^xsd:string ;
143 rdfs:subClassOf ep-activity:WellBorePressureTest ; 143 rdfs:subClassOf ep-activity:WellBorePressureTest ;
144 owl:disjointWith ep-activity:FormationIntegrityTest . 144 owl:disjointWith ep-activity:FormationIntegrityTest .
...@@ -174,7 +174,7 @@ ep-activity:OffshoreWellActivity ...@@ -174,7 +174,7 @@ ep-activity:OffshoreWellActivity
174 rdfs:subClassOf ep-activity:OffshoreActivity ; 174 rdfs:subClassOf ep-activity:OffshoreActivity ;
175 rdfs:subClassOf 175 rdfs:subClassOf
176 [ rdf:type owl:Restriction ; 176 [ rdf:type owl:Restriction ;
177 - owl:allValuesFrom <http://www.reportinghub.no/ep/schema/well#Well> ; 177 + owl:cardinality "1"^^xsd:nonNegativeInteger ;
178 owl:onProperty ep-activity:onWell 178 owl:onProperty ep-activity:onWell
179 ] ; 179 ] ;
180 rdfs:subClassOf 180 rdfs:subClassOf
...@@ -184,7 +184,7 @@ ep-activity:OffshoreWellActivity ...@@ -184,7 +184,7 @@ ep-activity:OffshoreWellActivity
184 ] ; 184 ] ;
185 rdfs:subClassOf 185 rdfs:subClassOf
186 [ rdf:type owl:Restriction ; 186 [ rdf:type owl:Restriction ;
187 - owl:cardinality "1"^^xsd:nonNegativeInteger ; 187 + owl:allValuesFrom <http://www.reportinghub.no/ep/schema/well#Well> ;
188 owl:onProperty ep-activity:onWell 188 owl:onProperty ep-activity:onWell
189 ] . 189 ] .
190 190
...@@ -229,7 +229,7 @@ ep-activity:WellBorePressureTest ...@@ -229,7 +229,7 @@ ep-activity:WellBorePressureTest
229 rdfs:subClassOf ep-activity:Activity . 229 rdfs:subClassOf ep-activity:Activity .
230 230
231 ep-activity:createdAt 231 ep-activity:createdAt
232 - rdf:type owl:FunctionalProperty , owl:DatatypeProperty ; 232 + rdf:type owl:DatatypeProperty , owl:FunctionalProperty ;
233 rdfs:label "created at"^^xsd:string ; 233 rdfs:label "created at"^^xsd:string ;
234 rdfs:range <http://www.linkedmodel.org/schema/vaem#dateUnion> . 234 rdfs:range <http://www.linkedmodel.org/schema/vaem#dateUnion> .
235 235
...@@ -251,7 +251,7 @@ ep-activity:onWell ...@@ -251,7 +251,7 @@ ep-activity:onWell
251 rdfs:label "on well"^^xsd:string . 251 rdfs:label "on well"^^xsd:string .
252 252
253 ep-activity:onWellBore 253 ep-activity:onWellBore
254 - rdf:type owl:FunctionalProperty , owl:ObjectProperty ; 254 + rdf:type owl:ObjectProperty , owl:FunctionalProperty ;
255 rdfs:label "on WellBore"^^xsd:string . 255 rdfs:label "on WellBore"^^xsd:string .
256 256
257 ep-activity:reportOn 257 ep-activity:reportOn
...@@ -264,17 +264,8 @@ ep-activity:startedAt ...@@ -264,17 +264,8 @@ ep-activity:startedAt
264 rdfs:range <http://www.linkedmodel.org/schema/vaem#dateUnion> . 264 rdfs:range <http://www.linkedmodel.org/schema/vaem#dateUnion> .
265 265
266 ep-activity:wellBoreDrillingType 266 ep-activity:wellBoreDrillingType
267 - rdf:type owl:FunctionalProperty , owl:ObjectProperty ; 267 + rdf:type owl:ObjectProperty , owl:FunctionalProperty ;
268 rdfs:domain ep-activity:DrillingActivity ; 268 rdfs:domain ep-activity:DrillingActivity ;
269 rdfs:label "has sub activity"^^xsd:string ; 269 rdfs:label "has sub activity"^^xsd:string ;
270 rdfs:range ep-activity:WellBoreDrillingType ; 270 rdfs:range ep-activity:WellBoreDrillingType ;
271 rdfs:subPropertyOf rdf:type . 271 rdfs:subPropertyOf rdf:type .
272 -
273 -<http://www.reportinghub.no/ep/schema/report#FinalDailyDrillingReport>
274 - rdf:type ep-activity:DailyDrillingReportFinalisationType .
275 -
276 -<http://www.reportinghub.no/ep/schema/report#NormalDailyDrillingReport>
277 - rdf:type ep-activity:DailyDrillingReportFinalisationType .
278 -
279 -<http://www.reportinghub.no/ep/schema/report#PreliminaryDailyDrillingReport>
280 - rdf:type ep-activity:DailyDrillingReportFinalisationType .
......
This diff could not be displayed because it is too large.
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
12 # imports: http://www.reportinghub.no/ep/transform/1.1/ddr/statusInfo 12 # imports: http://www.reportinghub.no/ep/transform/1.1/ddr/statusInfo
13 13
14 @prefix : <http://www.reportinghub.no/ep/transform/1.1/normalization#> . 14 @prefix : <http://www.reportinghub.no/ep/transform/1.1/normalization#> .
15 -@prefix activity: <http://www.reportinghub.no/ep/transform/1.1/ddr/activity#> .
16 @prefix fn: <http://www.w3.org/2005/xpath-functions#> . 15 @prefix fn: <http://www.w3.org/2005/xpath-functions#> .
17 @prefix owl: <http://www.w3.org/2002/07/owl#> . 16 @prefix owl: <http://www.w3.org/2002/07/owl#> .
18 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . 17 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
...@@ -66,8 +65,8 @@ owl:Thing ...@@ -66,8 +65,8 @@ owl:Thing
66 ]) 65 ])
67 ] . 66 ] .
68 67
69 -_:b1 sp:varName "oldLabel"^^xsd:string . 68 +_:b3 sp:varName "newLabel"^^xsd:string .
70 69
71 _:b2 sp:varName "p"^^xsd:string . 70 _:b2 sp:varName "p"^^xsd:string .
72 71
73 -_:b3 sp:varName "newLabel"^^xsd:string . 72 +_:b1 sp:varName "oldLabel"^^xsd:string .
......
This diff could not be displayed because it is too large.
...@@ -444,6 +444,46 @@ rhspin:wellBoreById ...@@ -444,6 +444,46 @@ rhspin:wellBoreById
444 ] ; 444 ] ;
445 spin:returnType <http://www.reportinghub.no/ep/schema/well#WellBore> . 445 spin:returnType <http://www.reportinghub.no/ep/schema/well#WellBore> .
446 446
447 +rhspin:wellBoreByName
448 + rdf:type spin:Function ;
449 + rdfs:comment "Gets a WellBore by a name. This name currently must match the NPD name known to the NPD named graph. Will return without result otherwise."^^xsd:string ;
450 + rdfs:label "well bore by name"^^xsd:string ;
451 + rdfs:subClassOf spl:URIFunctions ;
452 + spin:body
453 + [ rdf:type sp:Select ;
454 + sp:resultVariables (_:b18) ;
455 + sp:where ([ rdf:type sp:NamedGraph ;
456 + sp:elements ([ rdf:type sp:Union ;
457 + sp:elements (([ sp:object _:b19 ;
458 + sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
459 + sp:subject _:b18
460 + ]) ([ rdf:type sp:Bind ;
461 + sp:expression
462 + [ rdf:type spif:replaceAll ;
463 + sp:arg1 _:b19 ;
464 + sp:arg2 "/0" ;
465 + sp:arg3 "/"
466 + ] ;
467 + sp:variable _:b20
468 + ] [ sp:object _:b20 ;
469 + sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
470 + sp:subject _:b18
471 + ]))
472 + ] [ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ;
473 + sp:predicate rdf:type ;
474 + sp:subject _:b18
475 + ]) ;
476 + sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
477 + ])
478 + ] ;
479 + spin:constraint
480 + [ rdf:type spl:Argument ;
481 + rdfs:comment "The name of the well bore."^^xsd:string ;
482 + spl:predicate <http://spinrdf.org/arg#wellBoreName> ;
483 + spl:valueType xsd:string
484 + ] ;
485 + spin:returnType <http://www.reportinghub.no/ep/schema/well#WellBore> .
486 +
447 rhspin:wellByName 487 rhspin:wellByName
448 rdf:type spin:Function ; 488 rdf:type spin:Function ;
449 rdfs:comment "Gets the URI resource of a well based on its NPD name."^^xsd:string ; 489 rdfs:comment "Gets the URI resource of a well based on its NPD name."^^xsd:string ;
...@@ -470,43 +510,52 @@ rhspin:wellByName ...@@ -470,43 +510,52 @@ rhspin:wellByName
470 ] ; 510 ] ;
471 spin:returnType <http://www.reportinghub.no/ep/schema/well#Well> . 511 spin:returnType <http://www.reportinghub.no/ep/schema/well#Well> .
472 512
473 -_:b3 sp:varName "wellBore"^^xsd:string . 513 +_:b20
514 + sp:varName "str"^^xsd:string .
474 515
475 -_:b4 sp:varName "nowDate"^^xsd:string . 516 +_:b19
517 + sp:varName "wellBoreName"^^xsd:string .
476 518
477 -_:b5 sp:varName "share"^^xsd:string . 519 +_:b18
520 + sp:varName "wellBore"^^xsd:string .
478 521
479 -_:b6 sp:varName "licence"^^xsd:string . 522 +_:b17
523 + sp:varName "t4"^^xsd:string .
480 524
481 -_:b7 sp:varName "startDate"^^xsd:string . 525 +_:b16
526 + sp:varName "t3"^^xsd:string .
482 527
483 -_:b8 sp:varName "endDate"^^xsd:string . 528 +_:b15
529 + sp:varName "t2"^^xsd:string .
484 530
485 -_:b9 sp:varName "normalizedStr"^^xsd:string . 531 +_:b14
532 + sp:varName "t1"^^xsd:string .
486 533
487 -_:b10 534 +_:b13
488 - sp:varName "s1"^^xsd:string . 535 + sp:varName "t0b"^^xsd:string .
536 +
537 +_:b12
538 + sp:varName "t0a"^^xsd:string .
489 539
490 _:b11 540 _:b11
491 sp:varName "s2"^^xsd:string . 541 sp:varName "s2"^^xsd:string .
492 542
493 -_:b12 543 +_:b10
494 - sp:varName "t0a"^^xsd:string . 544 + sp:varName "s1"^^xsd:string .
495 545
496 -_:b13 546 +_:b9 sp:varName "normalizedStr"^^xsd:string .
497 - sp:varName "t0b"^^xsd:string .
498 547
499 -_:b14 548 +_:b8 sp:varName "endDate"^^xsd:string .
500 - sp:varName "t1"^^xsd:string .
501 549
502 -_:b15 550 +_:b7 sp:varName "startDate"^^xsd:string .
503 - sp:varName "t2"^^xsd:string .
504 551
505 -_:b16 552 +_:b6 sp:varName "licence"^^xsd:string .
506 - sp:varName "t3"^^xsd:string .
507 553
508 -_:b17 554 +_:b5 sp:varName "share"^^xsd:string .
509 - sp:varName "t4"^^xsd:string . 555 +
556 +_:b4 sp:varName "nowDate"^^xsd:string .
557 +
558 +_:b3 sp:varName "wellBore"^^xsd:string .
510 559
511 _:b2 sp:varName "wellBore"^^xsd:string . 560 _:b2 sp:varName "wellBore"^^xsd:string .
512 561
......