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 @@
<http://www.reportinghub.no/ep/schema/1.0/activity>
rdf:type owl:Ontology ;
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> ;
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> ;
owl:versionInfo "0.1.0"^^xsd:string .
ep-activity:Activity
......@@ -22,33 +22,33 @@ ep-activity:Activity
rdfs:subClassOf <http://www.reportinghub.no/ep/schema/core#PhysicalThing> ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:allValuesFrom ep-activity:Activity ;
owl:onProperty <http://www.linkedmodel.org/schema/ordered#during>
owl:maxCardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty ep-activity:finishedAt
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:allValuesFrom ep-activity:Activity ;
owl:onProperty <http://www.linkedmodel.org/schema/ordered#overlaps>
owl:maxCardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty ep-activity:startedAt
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:allValuesFrom ep-activity:Activity ;
owl:onProperty <http://www.linkedmodel.org/schema/ordered#before>
owl:onProperty <http://www.linkedmodel.org/schema/ordered#after>
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:allValuesFrom ep-activity:Activity ;
owl:onProperty <http://www.linkedmodel.org/schema/ordered#after>
owl:onProperty <http://www.linkedmodel.org/schema/ordered#before>
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:maxCardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty ep-activity:startedAt
owl:allValuesFrom ep-activity:Activity ;
owl:onProperty <http://www.linkedmodel.org/schema/ordered#overlaps>
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:maxCardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty ep-activity:finishedAt
owl:allValuesFrom ep-activity:Activity ;
owl:onProperty <http://www.linkedmodel.org/schema/ordered#during>
] .
ep-activity:DailyDrillingActivity
......@@ -57,13 +57,13 @@ ep-activity:DailyDrillingActivity
rdfs:subClassOf ep-activity:DrillingActivity ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:allValuesFrom ep-activity:DrillingActivity ;
owl:onProperty <http://www.linkedmodel.org/schema/ordered#last>
owl:allValuesFrom ep-activity:Activity ;
owl:onProperty <http://www.reportinghub.no/ep/schema/core#hasPart>
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:allValuesFrom <http://www.reportinghub.no/ep/schema/well#AllOrPartOfTheLifeOfAWellBore> ;
owl:onProperty ep-activity:onWellBore
owl:allValuesFrom ep-activity:DrillingActivity ;
owl:onProperty <http://www.linkedmodel.org/schema/ordered#first>
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
......@@ -72,13 +72,13 @@ ep-activity:DailyDrillingActivity
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:allValuesFrom ep-activity:DrillingActivity ;
owl:onProperty <http://www.linkedmodel.org/schema/ordered#first>
owl:allValuesFrom <http://www.reportinghub.no/ep/schema/well#AllOrPartOfTheLifeOfAWellBore> ;
owl:onProperty ep-activity:onWellBore
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:allValuesFrom ep-activity:Activity ;
owl:onProperty <http://www.reportinghub.no/ep/schema/core#hasPart>
owl:allValuesFrom ep-activity:DrillingActivity ;
owl:onProperty <http://www.linkedmodel.org/schema/ordered#last>
] .
ep-activity:DailyDrillingReportFinalisationType
......@@ -132,13 +132,13 @@ ep-activity:DrillingActivity
rdfs:subClassOf ep-activity:Activity .
ep-activity:FormationIntegrityTest
rdf:type ep-activity:PressureTestType , owl:Class ;
rdf:type owl:Class , ep-activity:PressureTestType ;
rdfs:label "formation integrity test"^^xsd:string ;
rdfs:subClassOf ep-activity:WellBorePressureTest ;
owl:disjointWith ep-activity:LeakOffTest .
ep-activity:LeakOffTest
rdf:type ep-activity:PressureTestType , owl:Class ;
rdf:type owl:Class , ep-activity:PressureTestType ;
rdfs:label "leak-off test"^^xsd:string ;
rdfs:subClassOf ep-activity:WellBorePressureTest ;
owl:disjointWith ep-activity:FormationIntegrityTest .
......@@ -174,7 +174,7 @@ ep-activity:OffshoreWellActivity
rdfs:subClassOf ep-activity:OffshoreActivity ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:allValuesFrom <http://www.reportinghub.no/ep/schema/well#Well> ;
owl:cardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty ep-activity:onWell
] ;
rdfs:subClassOf
......@@ -184,7 +184,7 @@ ep-activity:OffshoreWellActivity
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:cardinality "1"^^xsd:nonNegativeInteger ;
owl:allValuesFrom <http://www.reportinghub.no/ep/schema/well#Well> ;
owl:onProperty ep-activity:onWell
] .
......@@ -229,7 +229,7 @@ ep-activity:WellBorePressureTest
rdfs:subClassOf ep-activity:Activity .
ep-activity:createdAt
rdf:type owl:FunctionalProperty , owl:DatatypeProperty ;
rdf:type owl:DatatypeProperty , owl:FunctionalProperty ;
rdfs:label "created at"^^xsd:string ;
rdfs:range <http://www.linkedmodel.org/schema/vaem#dateUnion> .
......@@ -251,7 +251,7 @@ ep-activity:onWell
rdfs:label "on well"^^xsd:string .
ep-activity:onWellBore
rdf:type owl:FunctionalProperty , owl:ObjectProperty ;
rdf:type owl:ObjectProperty , owl:FunctionalProperty ;
rdfs:label "on WellBore"^^xsd:string .
ep-activity:reportOn
......@@ -264,17 +264,8 @@ ep-activity:startedAt
rdfs:range <http://www.linkedmodel.org/schema/vaem#dateUnion> .
ep-activity:wellBoreDrillingType
rdf:type owl:FunctionalProperty , owl:ObjectProperty ;
rdf:type owl:ObjectProperty , owl:FunctionalProperty ;
rdfs:domain ep-activity:DrillingActivity ;
rdfs:label "has sub activity"^^xsd:string ;
rdfs:range ep-activity:WellBoreDrillingType ;
rdfs:subPropertyOf rdf:type .
<http://www.reportinghub.no/ep/schema/report#FinalDailyDrillingReport>
rdf:type ep-activity:DailyDrillingReportFinalisationType .
<http://www.reportinghub.no/ep/schema/report#NormalDailyDrillingReport>
rdf:type ep-activity:DailyDrillingReportFinalisationType .
<http://www.reportinghub.no/ep/schema/report#PreliminaryDailyDrillingReport>
rdf:type ep-activity:DailyDrillingReportFinalisationType .
......
This diff could not be displayed because it is too large.
......@@ -12,7 +12,6 @@
# imports: http://www.reportinghub.no/ep/transform/1.1/ddr/statusInfo
@prefix : <http://www.reportinghub.no/ep/transform/1.1/normalization#> .
@prefix activity: <http://www.reportinghub.no/ep/transform/1.1/ddr/activity#> .
@prefix fn: <http://www.w3.org/2005/xpath-functions#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
......@@ -66,8 +65,8 @@ owl:Thing
])
] .
_:b1 sp:varName "oldLabel"^^xsd:string .
_:b3 sp:varName "newLabel"^^xsd:string .
_:b2 sp:varName "p"^^xsd:string .
_:b3 sp:varName "newLabel"^^xsd:string .
_:b1 sp:varName "oldLabel"^^xsd:string .
......
This diff could not be displayed because it is too large.
......@@ -444,6 +444,46 @@ rhspin:wellBoreById
] ;
spin:returnType <http://www.reportinghub.no/ep/schema/well#WellBore> .
rhspin:wellBoreByName
rdf:type spin:Function ;
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 ;
rdfs:label "well bore by name"^^xsd:string ;
rdfs:subClassOf spl:URIFunctions ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables (_:b18) ;
sp:where ([ rdf:type sp:NamedGraph ;
sp:elements ([ rdf:type sp:Union ;
sp:elements (([ sp:object _:b19 ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject _:b18
]) ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:replaceAll ;
sp:arg1 _:b19 ;
sp:arg2 "/0" ;
sp:arg3 "/"
] ;
sp:variable _:b20
] [ sp:object _:b20 ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject _:b18
]))
] [ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ;
sp:predicate rdf:type ;
sp:subject _:b18
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
])
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The name of the well bore."^^xsd:string ;
spl:predicate <http://spinrdf.org/arg#wellBoreName> ;
spl:valueType xsd:string
] ;
spin:returnType <http://www.reportinghub.no/ep/schema/well#WellBore> .
rhspin:wellByName
rdf:type spin:Function ;
rdfs:comment "Gets the URI resource of a well based on its NPD name."^^xsd:string ;
......@@ -470,43 +510,52 @@ rhspin:wellByName
] ;
spin:returnType <http://www.reportinghub.no/ep/schema/well#Well> .
_:b3 sp:varName "wellBore"^^xsd:string .
_:b20
sp:varName "str"^^xsd:string .
_:b4 sp:varName "nowDate"^^xsd:string .
_:b19
sp:varName "wellBoreName"^^xsd:string .
_:b5 sp:varName "share"^^xsd:string .
_:b18
sp:varName "wellBore"^^xsd:string .
_:b6 sp:varName "licence"^^xsd:string .
_:b17
sp:varName "t4"^^xsd:string .
_:b7 sp:varName "startDate"^^xsd:string .
_:b16
sp:varName "t3"^^xsd:string .
_:b8 sp:varName "endDate"^^xsd:string .
_:b15
sp:varName "t2"^^xsd:string .
_:b9 sp:varName "normalizedStr"^^xsd:string .
_:b14
sp:varName "t1"^^xsd:string .
_:b10
sp:varName "s1"^^xsd:string .
_:b13
sp:varName "t0b"^^xsd:string .
_:b12
sp:varName "t0a"^^xsd:string .
_:b11
sp:varName "s2"^^xsd:string .
_:b12
sp:varName "t0a"^^xsd:string .
_:b10
sp:varName "s1"^^xsd:string .
_:b13
sp:varName "t0b"^^xsd:string .
_:b9 sp:varName "normalizedStr"^^xsd:string .
_:b14
sp:varName "t1"^^xsd:string .
_:b8 sp:varName "endDate"^^xsd:string .
_:b15
sp:varName "t2"^^xsd:string .
_:b7 sp:varName "startDate"^^xsd:string .
_:b16
sp:varName "t3"^^xsd:string .
_:b6 sp:varName "licence"^^xsd:string .
_:b17
sp:varName "t4"^^xsd:string .
_:b5 sp:varName "share"^^xsd:string .
_:b4 sp:varName "nowDate"^^xsd:string .
_:b3 sp:varName "wellBore"^^xsd:string .
_:b2 sp:varName "wellBore"^^xsd:string .
......