David Price

Fixed NPD graph access in transforms - GRAPH keyword

......@@ -31,14 +31,26 @@
ddr:Obj_drillReport
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 105
Classify a DailyDrillingReport"""^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "dailyDrillingReportType"^^xsd:string
rdfs:comment "STEP 106 Create Well Part"^^xsd:string ;
sp:templates ([ sp:object _:b1 ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#onWell> ;
sp:subject
[ sp:varName "dailyDrillingActivity"^^xsd:string
]
] [ sp:object
[ sp:varName "well"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b1
] [ sp:object <http://www.reportinghub.no/ep/schema/well#TemporalPartOfAWell> ;
sp:predicate rdf:type ;
sp:subject _:b1
] [ sp:object
[ sp:varName "wellBore"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:subject
[ sp:varName "dailyDrillingReport"^^xsd:string
[ sp:varName "well"^^xsd:string
]
]) ;
sp:where ([ sp:object
......@@ -47,24 +59,44 @@ Classify a DailyDrillingReport"""^^xsd:string ;
sp:predicate ep-spin-lib:nameWellbore ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "createDate"^^xsd:string
[ sp:varName "nameWell"^^xsd:string
] ;
sp:predicate ddr:createDate ;
sp:predicate ep-spin-lib:nameWell ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "versionKind"^^xsd:string
[ sp:varName "dTimStart"^^xsd:string
] ;
sp:predicate ddr:versionKindRef ;
sp:predicate ddr:dTimStart ;
sp:subject spin:_this
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:selectDailyDrillingReportType ;
sp:arg1 [ sp:varName "versionKind"^^xsd:string
] [ sp:object
[ sp:varName "temporalPartOfAWellBore"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#onWellBore> ;
sp:subject
[ sp:varName "dailyDrillingActivity"^^xsd:string
]
] [ sp:object
[ sp:varName "wellBore"^^xsd:string
] ;
sp:variable
[ sp:varName "dailyDrillingReportType"^^xsd:string
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "temporalPartOfAWellBore"^^xsd:string
]
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "wellBore"^^xsd:string
]
] [ sp:object
[ sp:varName "well"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#partOfWell> ;
sp:subject
[ sp:varName "wellBore"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
......@@ -76,14 +108,14 @@ Classify a DailyDrillingReport"""^^xsd:string ;
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:buildDailyDrillingReportURI ;
[ rdf:type ep-spin-lib:buildDailyDrillingActivityURI ;
sp:arg1 [ sp:varName "normalizedWellBoreName"^^xsd:string
] ;
sp:arg2 [ sp:varName "createDate"^^xsd:string
sp:arg2 [ sp:varName "dTimStart"^^xsd:string
]
] ;
sp:variable
[ sp:varName "dailyDrillingReport"^^xsd:string
[ sp:varName "dailyDrillingActivity"^^xsd:string
]
])
] ;
......@@ -150,24 +182,24 @@ replaced for testing - BIND (rhspin:wellBoreByName(?nameWellBore) AS ?wellBore)
sp:subject
[ sp:varName "dailyDrillingActivity"^^xsd:string
]
] [ sp:object _:b1 ;
] [ sp:object _:b2 ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#descriptionOfActivitiesFollowingTheDailyReportingPeriod> ;
sp:subject
[ sp:varName "dailyDrillingActivity"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/report#Report> ;
sp:predicate rdf:type ;
sp:subject _:b1
sp:subject _:b2
] [ sp:object
[ sp:varName "extendedReportContent"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#hasContent> ;
sp:subject _:b1
sp:subject _:b2
] [ sp:object
[ sp:varName "dTimExtendedReport"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#createdAt> ;
sp:subject _:b1
sp:subject _:b2
]) ;
sp:where ([ sp:object
[ sp:varName "nameWellBore"^^xsd:string
......@@ -272,26 +304,14 @@ replaced for testing - BIND (rhspin:wellBoreByName(?nameWellBore) AS ?wellBore)
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 106 Create Well Part"^^xsd:string ;
sp:templates ([ sp:object _:b2 ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#onWell> ;
sp:subject
[ sp:varName "dailyDrillingActivity"^^xsd:string
]
] [ sp:object
[ sp:varName "well"^^xsd:string
rdfs:comment """STEP 105
Classify a DailyDrillingReport"""^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "dailyDrillingReportType"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b2
] [ sp:object <http://www.reportinghub.no/ep/schema/well#TemporalPartOfAWell> ;
sp:predicate rdf:type ;
sp:subject _:b2
] [ sp:object
[ sp:varName "wellBore"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:subject
[ sp:varName "well"^^xsd:string
[ sp:varName "dailyDrillingReport"^^xsd:string
]
]) ;
sp:where ([ sp:object
......@@ -300,40 +320,23 @@ replaced for testing - BIND (rhspin:wellBoreByName(?nameWellBore) AS ?wellBore)
sp:predicate ep-spin-lib:nameWellbore ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "nameWell"^^xsd:string
[ sp:varName "createDate"^^xsd:string
] ;
sp:predicate ep-spin-lib:nameWell ;
sp:predicate ddr:createDate ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "dTimStart"^^xsd:string
[ sp:varName "versionKind"^^xsd:string
] ;
sp:predicate ddr:dTimStart ;
sp:predicate ddr:versionKindRef ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "temporalPartOfAWellBore"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#onWellBore> ;
sp:subject
[ sp:varName "dailyDrillingActivity"^^xsd:string
]
] [ sp:object
[ sp:varName "wellBore"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "temporalPartOfAWellBore"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "wellBore"^^xsd:string
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:selectDailyDrillingReportType ;
sp:arg1 [ sp:varName "versionKind"^^xsd:string
]
] [ sp:object
[ sp:varName "well"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#partOfWell> ;
sp:subject
[ sp:varName "wellBore"^^xsd:string
sp:variable
[ sp:varName "dailyDrillingReportType"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
......@@ -346,14 +349,14 @@ replaced for testing - BIND (rhspin:wellBoreByName(?nameWellBore) AS ?wellBore)
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:buildDailyDrillingActivityURI ;
[ rdf:type ep-spin-lib:buildDailyDrillingReportURI ;
sp:arg1 [ sp:varName "normalizedWellBoreName"^^xsd:string
] ;
sp:arg2 [ sp:varName "dTimStart"^^xsd:string
sp:arg2 [ sp:varName "createDate"^^xsd:string
]
] ;
sp:variable
[ sp:varName "dailyDrillingActivity"^^xsd:string
[ sp:varName "dailyDrillingReport"^^xsd:string
]
])
] .
......
# Saved by TopBraid on Fri Oct 28 14:50:19 BST 2011
# baseURI: http://www.reportinghub.no/ep/transform/1.1/ddr/lithShowInfo
# imports: http://www.witsml.org/schemas/1series
# imports: http://www.reportinghub.no/ep/schema/1.0/core
# imports: http://www.reportinghub.no/ep/schema/1.0/activity
# imports: http://spinrdf.org/spin
# imports: http://www.reportinghub.no/ep/schema/1.0/activity
# imports: http://www.reportinghub.no/ep/schema/1.0/core
# imports: http://www.reportinghub.no/ep/spin/1.1/lib
@prefix : <http://www.reportinghub.no/ep/transform/1.1/ddr/lithShowInfo#> .
@prefix afn: <http://jena.hpl.hp.com/ARQ/function#> .
......@@ -19,7 +18,7 @@
<http://www.reportinghub.no/ep/transform/1.1/ddr/lithShowInfo>
rdf:type owl:Ontology ;
owl:imports <http://www.witsml.org/schemas/1series> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://spinrdf.org/spin> ;
owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.reportinghub.no/ep/spin/1.1/lib> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
<http://www.witsml.org/schemas/1series#Obj_drillReport>
......@@ -217,77 +216,77 @@
])
] .
_:b20
sp:varName "nameWellBore"^^xsd:string .
_:b21
sp:varName "dTimStart"^^xsd:string .
_:b22
sp:varName "lithShowInfo"^^xsd:string .
_:b32
sp:varName "localname"^^xsd:string .
_:b6 sp:varName "dTimEnd"^^xsd:string .
_:b31
sp:varName "normalizedWellBoreName"^^xsd:string .
_:b23
sp:varName "mdTop"^^xsd:string .
_:b30
sp:varName "uomTvdBottom"^^xsd:string .
_:b24
sp:varName "uomMdTop"^^xsd:string .
_:b29
sp:varName "tvdBottom"^^xsd:string .
_:b7 sp:varName "realMdTop"^^xsd:string .
_:b28
sp:varName "uomTvdTop"^^xsd:string .
_:b25
sp:varName "mdBottom"^^xsd:string .
_:b27
sp:varName "tvdTop"^^xsd:string .
_:b26
sp:varName "uomMdBottom"^^xsd:string .
_:b10
sp:varName "realMdBottom"^^xsd:string .
_:b27
sp:varName "tvdTop"^^xsd:string .
_:b28
sp:varName "uomTvdTop"^^xsd:string .
_:b25
sp:varName "mdBottom"^^xsd:string .
_:b13
sp:varName "realTvdTop"^^xsd:string .
_:b24
sp:varName "uomMdTop"^^xsd:string .
_:b29
sp:varName "tvdBottom"^^xsd:string .
_:b23
sp:varName "mdTop"^^xsd:string .
_:b30
sp:varName "uomTvdBottom"^^xsd:string .
_:b22
sp:varName "lithShowInfo"^^xsd:string .
_:b16
sp:varName "realTvdBottom"^^xsd:string .
_:b21
sp:varName "dTimStart"^^xsd:string .
_:b18
sp:varName "show"^^xsd:string .
_:b20
sp:varName "nameWellBore"^^xsd:string .
_:b19
sp:varName "lithology"^^xsd:string .
_:b31
sp:varName "normalizedWellBoreName"^^xsd:string .
_:b2 sp:varName "dailyDrillingActivity"^^xsd:string .
_:b32
sp:varName "localname"^^xsd:string .
_:b18
sp:varName "show"^^xsd:string .
_:b1 sp:varName "lithShowObservation"^^xsd:string .
_:b17
sp:varName "lengthScaleTvdBottom"^^xsd:string .
_:b8 sp:varName "lengthScaleMdTop"^^xsd:string .
_:b16
sp:varName "realTvdBottom"^^xsd:string .
_:b14
sp:varName "lengthScaleTvdTop"^^xsd:string .
_:b13
sp:varName "realTvdTop"^^xsd:string .
_:b11
sp:varName "lengthScaleMdBottom"^^xsd:string .
_:b17
sp:varName "lengthScaleTvdBottom"^^xsd:string .
_:b10
sp:varName "realMdBottom"^^xsd:string .
_:b8 sp:varName "lengthScaleMdTop"^^xsd:string .
_:b7 sp:varName "realMdTop"^^xsd:string .
_:b6 sp:varName "dTimEnd"^^xsd:string .
_:b5 sp:varName "wellBore"^^xsd:string .
_:b2 sp:varName "dailyDrillingActivity"^^xsd:string .
_:b1 sp:varName "lithShowObservation"^^xsd:string .
......
# Saved by TopBraid on Fri Oct 28 15:51:07 BST 2011
# baseURI: http://www.reportinghub.no/ep/transform/1.1/ddr/porePressure
# imports: http://www.witsml.org/schemas/1series
# imports: http://www.reportinghub.no/ep/schema/1.0/core
# imports: http://www.reportinghub.no/ep/schema/1.0/activity
# imports: http://spinrdf.org/spin
# imports: http://www.reportinghub.no/ep/schema/1.0/activity
# imports: http://www.reportinghub.no/ep/schema/1.0/core
# imports: http://www.reportinghub.no/ep/spin/1.1/lib
@prefix : <http://www.reportinghub.no/ep/transform/1.1/ddr/porePressure#> .
@prefix afn: <http://jena.hpl.hp.com/ARQ/function#> .
......@@ -19,7 +18,7 @@
<http://www.reportinghub.no/ep/transform/1.1/ddr/porePressure>
rdf:type owl:Ontology ;
owl:imports <http://www.witsml.org/schemas/1series> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://spinrdf.org/spin> ;
owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.reportinghub.no/ep/spin/1.1/lib> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
<http://www.witsml.org/schemas/1series#Obj_drillReport>
......@@ -187,66 +186,66 @@
])
] .
_:b17
sp:varName "nameWellBore"^^xsd:string .
_:b18
sp:varName "dTimStart"^^xsd:string .
_:b19
sp:varName "porePressure"^^xsd:string .
_:b15
sp:varName "timeOfDetermination"^^xsd:string .
_:b28
sp:varName "localname"^^xsd:string .
_:b20
sp:varName "md"^^xsd:string .
_:b27
sp:varName "normalizedWellBoreName"^^xsd:string .
_:b21
sp:varName "uomMd"^^xsd:string .
_:b26
sp:varName "uomTvd"^^xsd:string .
_:b7 sp:varName "realMd"^^xsd:string .
_:b25
sp:varName "tvd"^^xsd:string .
_:b22
sp:varName "enumReadingKind"^^xsd:string .
_:b24
sp:varName "uomWt"^^xsd:string .
_:b23
sp:varName "equivalentMudWeight"^^xsd:string .
_:b24
sp:varName "uomWt"^^xsd:string .
_:b22
sp:varName "enumReadingKind"^^xsd:string .
_:b13
sp:varName "realWt"^^xsd:string .
_:b21
sp:varName "uomMd"^^xsd:string .
_:b25
sp:varName "tvd"^^xsd:string .
_:b20
sp:varName "md"^^xsd:string .
_:b26
sp:varName "uomTvd"^^xsd:string .
_:b19
sp:varName "porePressure"^^xsd:string .
_:b10
sp:varName "realTvd"^^xsd:string .
_:b18
sp:varName "dTimStart"^^xsd:string .
_:b27
sp:varName "normalizedWellBoreName"^^xsd:string .
_:b17
sp:varName "nameWellBore"^^xsd:string .
_:b2 sp:varName "dailyDrillingActivity"^^xsd:string .
_:b16
sp:varName "porePressureDeterminationType"^^xsd:string .
_:b28
sp:varName "localname"^^xsd:string .
_:b15
sp:varName "timeOfDetermination"^^xsd:string .
_:b1 sp:varName "porePressureDetermination"^^xsd:string .
_:b14
sp:varName "densityScale"^^xsd:string .
_:b8 sp:varName "lengthScaleMd"^^xsd:string .
_:b13
sp:varName "realWt"^^xsd:string .
_:b11
sp:varName "lengthScaleTvd"^^xsd:string .
_:b14
sp:varName "densityScale"^^xsd:string .
_:b10
sp:varName "realTvd"^^xsd:string .
_:b16
sp:varName "porePressureDeterminationType"^^xsd:string .
_:b8 sp:varName "lengthScaleMd"^^xsd:string .
_:b7 sp:varName "realMd"^^xsd:string .
_:b5 sp:varName "wellBore"^^xsd:string .
_:b2 sp:varName "dailyDrillingActivity"^^xsd:string .
_:b1 sp:varName "porePressureDetermination"^^xsd:string .
......
This diff could not be displayed because it is too large.
......@@ -22,13 +22,13 @@
<http://www.reportinghub.no/ep/transform/1.1/wellAndWellBoreAlias>
rdf:type owl:Ontology ;
owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://www.reportinghub.no/ep/spin/1.1/lib> , <http://www.witsml.org/schemas/1series> ;
owl:imports <http://www.witsml.org/schemas/1series> , <http://www.reportinghub.no/ep/spin/1.1/lib> , <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://spinrdf.org/spin> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
ddr:Obj_drillReport
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 150 Transfer Well aliases"^^xsd:string ;
rdfs:comment "STEP 151 Transfer WellBore aliases"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "name"^^xsd:string
] ;
......@@ -36,7 +36,7 @@ ddr:Obj_drillReport
[ sp:varName "labelOfSystem"^^xsd:string
] ;
sp:subject
[ sp:varName "well"^^xsd:string
[ sp:varName "wellBore"^^xsd:string
]
]) ;
sp:where ([ sp:object
......@@ -50,43 +50,46 @@ ddr:Obj_drillReport
sp:predicate ddr:dTimStart ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "wellAlias"^^xsd:string
[ sp:varName "wellBoreAlias"^^xsd:string
] ;
sp:predicate ddr:wellAliasRef ;
sp:predicate ddr:wellboreAliasRef ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "name"^^xsd:string
] ;
sp:predicate ddr:name ;
sp:subject
[ sp:varName "wellAlias"^^xsd:string
[ sp:varName "wellBoreAlias"^^xsd:string
]
] [ sp:object
[ sp:varName "namingSystem"^^xsd:string
] ;
sp:predicate ddr:namingSystemRef ;
sp:subject
[ sp:varName "wellAlias"^^xsd:string
[ sp:varName "wellBoreAlias"^^xsd:string
]
] [ sp:object
[ sp:varName "temporalPartOfAWell"^^xsd:string
[ sp:varName "temporalPartOfAWellBore"^^xsd:string
] ;
sp:predicate ep-activity:onWell ;
sp:predicate ep-activity:onWellBore ;
sp:subject
[ sp:varName "dailyDrillingActivity"^^xsd:string
]
] [ sp:object
[ sp:varName "well"^^xsd:string
[ sp:varName "wellBore"^^xsd:string
] ;
sp:predicate ep-core:temporalPartOf ;
sp:subject
[ sp:varName "temporalPartOfAWell"^^xsd:string
[ sp:varName "temporalPartOfAWellBore"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/well#Well> ;
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "well"^^xsd:string
[ sp:varName "wellBore"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
......@@ -120,7 +123,7 @@ ddr:Obj_drillReport
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 151 Transfer WellBore aliases"^^xsd:string ;
rdfs:comment "STEP 150 Transfer Well aliases"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "name"^^xsd:string
] ;
......@@ -128,7 +131,7 @@ ddr:Obj_drillReport
[ sp:varName "labelOfSystem"^^xsd:string
] ;
sp:subject
[ sp:varName "wellBore"^^xsd:string
[ sp:varName "well"^^xsd:string
]
]) ;
sp:where ([ sp:object
......@@ -142,43 +145,46 @@ ddr:Obj_drillReport
sp:predicate ddr:dTimStart ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "wellBoreAlias"^^xsd:string
[ sp:varName "wellAlias"^^xsd:string
] ;
sp:predicate ddr:wellboreAliasRef ;
sp:predicate ddr:wellAliasRef ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "name"^^xsd:string
] ;
sp:predicate ddr:name ;
sp:subject
[ sp:varName "wellBoreAlias"^^xsd:string
[ sp:varName "wellAlias"^^xsd:string
]
] [ sp:object
[ sp:varName "namingSystem"^^xsd:string
] ;
sp:predicate ddr:namingSystemRef ;
sp:subject
[ sp:varName "wellBoreAlias"^^xsd:string
[ sp:varName "wellAlias"^^xsd:string
]
] [ sp:object
[ sp:varName "temporalPartOfAWellBore"^^xsd:string
[ sp:varName "temporalPartOfAWell"^^xsd:string
] ;
sp:predicate ep-activity:onWellBore ;
sp:predicate ep-activity:onWell ;
sp:subject
[ sp:varName "dailyDrillingActivity"^^xsd:string
]
] [ sp:object
[ sp:varName "wellBore"^^xsd:string
[ sp:varName "well"^^xsd:string
] ;
sp:predicate ep-core:temporalPartOf ;
sp:subject
[ sp:varName "temporalPartOfAWellBore"^^xsd:string
[ sp:varName "temporalPartOfAWell"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ;
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/well#Well> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "wellBore"^^xsd:string
[ sp:varName "well"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
......
......@@ -31,14 +31,13 @@
ddr:Obj_drillReport
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 168 Transfer fixedRig
This rule processes data from statusInfo, but is here because it must be executed after a rig has been defined."""^^xsd:string ;
rdfs:comment "STEP 166 Set SPUD date"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "fixedOrMoveableRigType"^^xsd:string
[ sp:varName "spudDate"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:predicate <http://www.reportinghub.no/ep/schema/well#wellBoreSpudAt> ;
sp:subject
[ sp:varName "rig"^^xsd:string
[ sp:varName "wellBore"^^xsd:string
]
]) ;
sp:where ([ sp:object
......@@ -52,35 +51,99 @@ This rule processes data from statusInfo, but is here because it must be execute
sp:predicate ddr:dTimStart ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "temporalPartOfARig"^^xsd:string
[ sp:varName "wellboreInfo"^^xsd:string
] ;
sp:predicate ep-activity:onRig ;
sp:predicate ddr:wellboreInfoRef ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "spudDate"^^xsd:string
] ;
sp:predicate ddr:dTimSpud ;
sp:subject
[ sp:varName "wellboreInfo"^^xsd:string
]
] [ sp:object
[ sp:varName "temporalPartOfAWellBore"^^xsd:string
] ;
sp:predicate ep-activity:onWellBore ;
sp:subject
[ sp:varName "dailyDrillingActivity"^^xsd:string
]
] [ sp:object
[ sp:varName "rig"^^xsd:string
[ sp:varName "wellBore"^^xsd:string
] ;
sp:predicate ep-core:temporalPartOf ;
sp:subject
[ sp:varName "temporalPartOfARig"^^xsd:string
[ sp:varName "temporalPartOfAWellBore"^^xsd:string
]
] [ sp:object ep-facility:Rig ;
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "rig"^^xsd:string
[ sp:varName "wellBore"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "nameWellBore"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedWellBoreName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:buildDailyDrillingActivityURI ;
sp:arg1 [ sp:varName "normalizedWellBoreName"^^xsd:string
] ;
sp:arg2 [ sp:varName "dTimStart"^^xsd:string
]
] ;
sp:variable
[ sp:varName "dailyDrillingActivity"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 163 Set drilling contractor for drilling activity"^^xsd:string ;
sp:templates ([ sp:object _:b1 ;
sp:predicate ep-activity:drillingContractor ;
sp:subject
[ sp:varName "dailyDrillingActivity"^^xsd:string
]
] [ sp:object ep-org:Company ;
sp:predicate rdf:type ;
sp:subject _:b1
] [ sp:object
[ sp:varName "statusInfo"^^xsd:string
[ sp:varName "nameContractor"^^xsd:string
] ;
sp:predicate ddr:statusInfoRef ;
sp:predicate ep-core:name ;
sp:subject _:b1
]) ;
sp:where ([ sp:object
[ sp:varName "nameWellBore"^^xsd:string
] ;
sp:predicate ep-spin-lib:nameWellbore ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "fixedRig"^^xsd:string
[ sp:varName "dTimStart"^^xsd:string
] ;
sp:predicate ddr:fixedRig ;
sp:predicate ddr:dTimStart ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "wellboreInfo"^^xsd:string
] ;
sp:predicate ddr:wellboreInfoRef ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "nameContractor"^^xsd:string
] ;
sp:predicate ddr:drillContractor ;
sp:subject
[ sp:varName "statusInfo"^^xsd:string
[ sp:varName "wellboreInfo"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
......@@ -104,31 +167,40 @@ This rule processes data from statusInfo, but is here because it must be execute
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:selectFixedOrMoveableRigType ;
sp:arg1 [ sp:varName "fixedRig"^^xsd:string
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "nameContractor"^^xsd:string
]
] ;
sp:variable
[ sp:varName "fixedOrMoveableRigType"^^xsd:string
[ sp:varName "normalizedContractorName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type rhspin:companyById ;
arg:id [ sp:varName "normalizedContractorName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "contractor"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 160a Set rig for drilling activity - NPD Code supplied"^^xsd:string ;
sp:templates ([ sp:object _:b1 ;
sp:templates ([ sp:object _:b2 ;
sp:predicate ep-activity:onRig ;
sp:subject
[ sp:varName "dailyDrillingActivity"^^xsd:string
]
] [ sp:object ep-facility:TemporalPartOfARig ;
sp:predicate rdf:type ;
sp:subject _:b1
sp:subject _:b2
] [ sp:object
[ sp:varName "rig"^^xsd:string
] ;
sp:predicate ep-core:temporalPartOf ;
sp:subject _:b1
sp:subject _:b2
] [ sp:object ep-facility:Rig ;
sp:predicate rdf:type ;
sp:subject
......@@ -263,11 +335,14 @@ This rule processes data from statusInfo, but is here because it must be execute
sp:subject
[ sp:varName "temporalPartOfAWellBore"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ;
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "wellBore"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
......@@ -292,29 +367,15 @@ This rule processes data from statusInfo, but is here because it must be execute
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 169a Transfer waterDepth
rdfs:comment """STEP 168 Transfer fixedRig
This rule processes data from statusInfo, but is here because it must be executed after a rig has been defined."""^^xsd:string ;
sp:templates ([ sp:object _:b2 ;
sp:predicate ep-core:hasPart ;
sp:templates ([ sp:object
[ sp:varName "fixedOrMoveableRigType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfARig"^^xsd:string
[ sp:varName "rig"^^xsd:string
]
] [ sp:object ep-facility:SurroundingWater ;
sp:predicate rdf:type ;
sp:subject _:b2
] [ sp:object _:b3 ;
sp:predicate ep-facility:depthOfSurroundingWater ;
sp:subject _:b2
] [ sp:object ep-core:Length ;
sp:predicate rdf:type ;
sp:subject _:b3
] [ sp:object
[ sp:varName "real"^^xsd:string
] ;
sp:predicate
[ sp:varName "lengthScale"^^xsd:string
] ;
sp:subject _:b3
]) ;
sp:where ([ sp:object
[ sp:varName "nameWellBore"^^xsd:string
......@@ -327,11 +388,6 @@ This rule processes data from statusInfo, but is here because it must be execute
sp:predicate ddr:dTimStart ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "statusInfo"^^xsd:string
] ;
sp:predicate ddr:statusInfoRef ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "temporalPartOfARig"^^xsd:string
] ;
sp:predicate ep-activity:onRig ;
......@@ -339,25 +395,28 @@ This rule processes data from statusInfo, but is here because it must be execute
[ sp:varName "dailyDrillingActivity"^^xsd:string
]
] [ sp:object
[ sp:varName "waterDepth"^^xsd:string
[ sp:varName "rig"^^xsd:string
] ;
sp:predicate ddr:waterDepthRef ;
sp:predicate ep-core:temporalPartOf ;
sp:subject
[ sp:varName "statusInfo"^^xsd:string
[ sp:varName "temporalPartOfARig"^^xsd:string
]
] [ sp:object
[ sp:varName "real"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
] [ sp:object ep-facility:Rig ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "waterDepth"^^xsd:string
[ sp:varName "rig"^^xsd:string
]
] [ sp:object
[ sp:varName "uom"^^xsd:string
[ sp:varName "statusInfo"^^xsd:string
] ;
sp:predicate ddr:uomRef ;
sp:predicate ddr:statusInfoRef ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "fixedRig"^^xsd:string
] ;
sp:predicate ddr:fixedRig ;
sp:subject
[ sp:varName "waterDepth"^^xsd:string
[ sp:varName "statusInfo"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
......@@ -381,40 +440,89 @@ This rule processes data from statusInfo, but is here because it must be execute
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:selectLengthScale ;
sp:arg1 [ sp:varName "uom"^^xsd:string
[ rdf:type ep-spin-lib:selectFixedOrMoveableRigType ;
sp:arg1 [ sp:varName "fixedRig"^^xsd:string
]
] ;
sp:variable
[ sp:varName "lengthScale"^^xsd:string
[ sp:varName "fixedOrMoveableRigType"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 169 Transfer elevKelly
This rule processes data from statusInfo, but is here because it must be executed after a rig has been defined."""^^xsd:string ;
sp:templates ([ sp:object _:b4 ;
sp:predicate ep-core:hasPart ;
sp:subject
[ sp:varName "temporalPartOfARig"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/equipment#KellyBushing> ;
sp:predicate rdf:type ;
rdfs:comment "STEP 160b Set rig for drilling activity - NPD Code not supplied"^^xsd:string ;
sp:templates ([ sp:object _:b3 ;
sp:predicate ep-activity:onRig ;
sp:subject _:b4
] [ sp:object ep-facility:TemporalPartOfARig ;
sp:predicate rdf:type ;
sp:subject _:b3
] [ sp:object _:b5 ;
sp:predicate <http://www.reportinghub.no/ep/schema/equipment#elevationOfKellyBushing> ;
sp:subject _:b4
] [ sp:object ep-core:Length ;
sp:predicate ep-core:temporalPartOf ;
sp:subject _:b3
] [ sp:object ep-facility:Rig ;
sp:predicate rdf:type ;
sp:subject _:b5
]) ;
sp:where ([ sp:object _:b6 ;
sp:predicate ep-spin-lib:nameWellbore ;
sp:subject spin:_this
] [ sp:object _:b7 ;
sp:predicate ddr:dTimStart ;
sp:subject spin:_this
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object _:b8 ;
sp:predicate ddr:wellboreInfoRef ;
sp:subject spin:_this
] [ sp:object _:b9 ;
sp:predicate ddr:rigAliasRef ;
sp:subject _:b8
] [ sp:object
[ sp:varName "real"^^xsd:string
[ sp:varName "code"^^xsd:string
] ;
sp:predicate
[ sp:varName "lengthScale"^^xsd:string
sp:predicate ddr:name ;
sp:subject _:b9
] [ rdf:type sp:Union ;
sp:elements (([ sp:object "NPD Code"^^xsd:string ;
sp:predicate ddr:namingSystem ;
sp:subject _:b9
]) ([ sp:object "NPD code"^^xsd:string ;
sp:predicate ddr:namingSystem ;
sp:subject _:b9
]))
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 _:b6
] ;
sp:subject _:b5
sp:variable _:b10
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:buildDailyDrillingActivityURI ;
sp:arg1 _:b10 ;
sp:arg2 _:b7
] ;
sp:variable _:b4
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 162 Set drilling operator for drilling activity"^^xsd:string ;
sp:templates ([ sp:object _:b11 ;
sp:predicate ep-activity:drillingOperator ;
sp:subject
[ sp:varName "dailyDrillingActivity"^^xsd:string
]
] [ sp:object ep-org:Company ;
sp:predicate rdf:type ;
sp:subject _:b11
] [ sp:object
[ sp:varName "nameOperator"^^xsd:string
] ;
sp:predicate ep-core:name ;
sp:subject _:b11
]) ;
sp:where ([ sp:object
[ sp:varName "nameWellBore"^^xsd:string
......@@ -427,37 +535,16 @@ This rule processes data from statusInfo, but is here because it must be execute
sp:predicate ddr:dTimStart ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "statusInfo"^^xsd:string
[ sp:varName "wellboreInfo"^^xsd:string
] ;
sp:predicate ddr:statusInfoRef ;
sp:predicate ddr:wellboreInfoRef ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "temporalPartOfARig"^^xsd:string
[ sp:varName "nameOperator"^^xsd:string
] ;
sp:predicate ep-activity:onRig ;
sp:predicate ddr:operator ;
sp:subject
[ sp:varName "dailyDrillingActivity"^^xsd:string
]
] [ sp:object
[ sp:varName "elevKelly"^^xsd:string
] ;
sp:predicate ddr:elevKellyRef ;
sp:subject
[ sp:varName "statusInfo"^^xsd:string
]
] [ sp:object
[ sp:varName "real"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "elevKelly"^^xsd:string
]
] [ sp:object
[ sp:varName "uom"^^xsd:string
] ;
sp:predicate ddr:uomRef ;
sp:subject
[ sp:varName "elevKelly"^^xsd:string
[ sp:varName "wellboreInfo"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
......@@ -479,27 +566,33 @@ This rule processes data from statusInfo, but is here because it must be execute
sp:variable
[ sp:varName "dailyDrillingActivity"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:selectLengthScale ;
sp:arg1 [ sp:varName "uom"^^xsd:string
]
] ;
sp:variable
[ sp:varName "lengthScale"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 164 Set preSPUD date"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "preSpudDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/well#wellBorePreSpudAt> ;
rdfs:comment """STEP 169 Transfer elevKelly
This rule processes data from statusInfo, but is here because it must be executed after a rig has been defined."""^^xsd:string ;
sp:templates ([ sp:object _:b12 ;
sp:predicate ep-core:hasPart ;
sp:subject
[ sp:varName "wellBore"^^xsd:string
[ sp:varName "temporalPartOfARig"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/equipment#KellyBushing> ;
sp:predicate rdf:type ;
sp:subject _:b12
] [ sp:object _:b13 ;
sp:predicate <http://www.reportinghub.no/ep/schema/equipment#elevationOfKellyBushing> ;
sp:subject _:b12
] [ sp:object ep-core:Length ;
sp:predicate rdf:type ;
sp:subject _:b13
] [ sp:object
[ sp:varName "real"^^xsd:string
] ;
sp:predicate
[ sp:varName "lengthScale"^^xsd:string
] ;
sp:subject _:b13
]) ;
sp:where ([ sp:object
[ sp:varName "nameWellBore"^^xsd:string
......@@ -512,35 +605,37 @@ This rule processes data from statusInfo, but is here because it must be execute
sp:predicate ddr:dTimStart ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "wellboreInfo"^^xsd:string
[ sp:varName "statusInfo"^^xsd:string
] ;
sp:predicate ddr:wellboreInfoRef ;
sp:predicate ddr:statusInfoRef ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "preSpudDate"^^xsd:string
[ sp:varName "temporalPartOfARig"^^xsd:string
] ;
sp:predicate ddr:dTimPreSpud ;
sp:predicate ep-activity:onRig ;
sp:subject
[ sp:varName "wellboreInfo"^^xsd:string
[ sp:varName "dailyDrillingActivity"^^xsd:string
]
] [ sp:object
[ sp:varName "temporalPartOfAWellBore"^^xsd:string
[ sp:varName "elevKelly"^^xsd:string
] ;
sp:predicate ep-activity:onWellBore ;
sp:predicate ddr:elevKellyRef ;
sp:subject
[ sp:varName "dailyDrillingActivity"^^xsd:string
[ sp:varName "statusInfo"^^xsd:string
]
] [ sp:object
[ sp:varName "wellBore"^^xsd:string
[ sp:varName "real"^^xsd:string
] ;
sp:predicate ep-core:temporalPartOf ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "temporalPartOfAWellBore"^^xsd:string
[ sp:varName "elevKelly"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ;
sp:predicate rdf:type ;
] [ sp:object
[ sp:varName "uom"^^xsd:string
] ;
sp:predicate ddr:uomRef ;
sp:subject
[ sp:varName "wellBore"^^xsd:string
[ sp:varName "elevKelly"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
......@@ -562,18 +657,42 @@ This rule processes data from statusInfo, but is here because it must be execute
sp:variable
[ sp:varName "dailyDrillingActivity"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:selectLengthScale ;
sp:arg1 [ sp:varName "uom"^^xsd:string
]
] ;
sp:variable
[ sp:varName "lengthScale"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 166 Set SPUD date"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "spudDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/well#wellBoreSpudAt> ;
rdfs:comment """STEP 169a Transfer waterDepth
This rule processes data from statusInfo, but is here because it must be executed after a rig has been defined."""^^xsd:string ;
sp:templates ([ sp:object _:b14 ;
sp:predicate ep-core:hasPart ;
sp:subject
[ sp:varName "wellBore"^^xsd:string
[ sp:varName "temporalPartOfARig"^^xsd:string
]
] [ sp:object ep-facility:SurroundingWater ;
sp:predicate rdf:type ;
sp:subject _:b14
] [ sp:object _:b15 ;
sp:predicate ep-facility:depthOfSurroundingWater ;
sp:subject _:b14
] [ sp:object ep-core:Length ;
sp:predicate rdf:type ;
sp:subject _:b15
] [ sp:object
[ sp:varName "real"^^xsd:string
] ;
sp:predicate
[ sp:varName "lengthScale"^^xsd:string
] ;
sp:subject _:b15
]) ;
sp:where ([ sp:object
[ sp:varName "nameWellBore"^^xsd:string
......@@ -586,35 +705,37 @@ This rule processes data from statusInfo, but is here because it must be execute
sp:predicate ddr:dTimStart ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "wellboreInfo"^^xsd:string
[ sp:varName "statusInfo"^^xsd:string
] ;
sp:predicate ddr:wellboreInfoRef ;
sp:predicate ddr:statusInfoRef ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "spudDate"^^xsd:string
[ sp:varName "temporalPartOfARig"^^xsd:string
] ;
sp:predicate ddr:dTimSpud ;
sp:predicate ep-activity:onRig ;
sp:subject
[ sp:varName "wellboreInfo"^^xsd:string
[ sp:varName "dailyDrillingActivity"^^xsd:string
]
] [ sp:object
[ sp:varName "temporalPartOfAWellBore"^^xsd:string
[ sp:varName "waterDepth"^^xsd:string
] ;
sp:predicate ep-activity:onWellBore ;
sp:predicate ddr:waterDepthRef ;
sp:subject
[ sp:varName "dailyDrillingActivity"^^xsd:string
[ sp:varName "statusInfo"^^xsd:string
]
] [ sp:object
[ sp:varName "wellBore"^^xsd:string
[ sp:varName "real"^^xsd:string
] ;
sp:predicate ep-core:temporalPartOf ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "temporalPartOfAWellBore"^^xsd:string
[ sp:varName "waterDepth"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ;
sp:predicate rdf:type ;
] [ sp:object
[ sp:varName "uom"^^xsd:string
] ;
sp:predicate ddr:uomRef ;
sp:subject
[ sp:varName "wellBore"^^xsd:string
[ sp:varName "waterDepth"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
......@@ -636,82 +757,27 @@ This rule processes data from statusInfo, but is here because it must be execute
sp:variable
[ sp:varName "dailyDrillingActivity"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 160b Set rig for drilling activity - NPD Code not supplied"^^xsd:string ;
sp:templates ([ sp:object _:b6 ;
sp:predicate ep-activity:onRig ;
sp:subject _:b7
] [ sp:object ep-facility:TemporalPartOfARig ;
sp:predicate rdf:type ;
sp:subject _:b6
] [ sp:object _:b8 ;
sp:predicate ep-core:temporalPartOf ;
sp:subject _:b6
] [ sp:object ep-facility:Rig ;
sp:predicate rdf:type ;
sp:subject _:b8
]) ;
sp:where ([ sp:object _:b9 ;
sp:predicate ep-spin-lib:nameWellbore ;
sp:subject spin:_this
] [ sp:object _:b10 ;
sp:predicate ddr:dTimStart ;
sp:subject spin:_this
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object _:b11 ;
sp:predicate ddr:wellboreInfoRef ;
sp:subject spin:_this
] [ sp:object _:b12 ;
sp:predicate ddr:rigAliasRef ;
sp:subject _:b11
] [ sp:object
[ sp:varName "code"^^xsd:string
] ;
sp:predicate ddr:name ;
sp:subject _:b12
] [ rdf:type sp:Union ;
sp:elements (([ sp:object "NPD Code"^^xsd:string ;
sp:predicate ddr:namingSystem ;
sp:subject _:b12
]) ([ sp:object "NPD code"^^xsd:string ;
sp:predicate ddr:namingSystem ;
sp:subject _:b12
]))
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 _:b9
] ;
sp:variable _:b13
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:buildDailyDrillingActivityURI ;
sp:arg1 _:b13 ;
sp:arg2 _:b10
[ rdf:type ep-spin-lib:selectLengthScale ;
sp:arg1 [ sp:varName "uom"^^xsd:string
]
] ;
sp:variable _:b7
sp:variable
[ sp:varName "lengthScale"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 163 Set drilling contractor for drilling activity"^^xsd:string ;
sp:templates ([ sp:object _:b14 ;
sp:predicate ep-activity:drillingContractor ;
rdfs:comment "STEP 164 Set preSPUD date"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "preSpudDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/well#wellBorePreSpudAt> ;
sp:subject
[ sp:varName "dailyDrillingActivity"^^xsd:string
[ sp:varName "wellBore"^^xsd:string
]
] [ sp:object ep-org:Company ;
sp:predicate rdf:type ;
sp:subject _:b14
] [ sp:object
[ sp:varName "nameContractor"^^xsd:string
] ;
sp:predicate ep-core:name ;
sp:subject _:b14
]) ;
sp:where ([ sp:object
[ sp:varName "nameWellBore"^^xsd:string
......@@ -729,91 +795,34 @@ This rule processes data from statusInfo, but is here because it must be execute
sp:predicate ddr:wellboreInfoRef ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "nameContractor"^^xsd:string
[ sp:varName "preSpudDate"^^xsd:string
] ;
sp:predicate ddr:drillContractor ;
sp:predicate ddr:dTimPreSpud ;
sp:subject
[ sp:varName "wellboreInfo"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "nameWellBore"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedWellBoreName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:buildDailyDrillingActivityURI ;
sp:arg1 [ sp:varName "normalizedWellBoreName"^^xsd:string
] ;
sp:arg2 [ sp:varName "dTimStart"^^xsd:string
]
] [ sp:object
[ sp:varName "temporalPartOfAWellBore"^^xsd:string
] ;
sp:variable
sp:predicate ep-activity:onWellBore ;
sp:subject
[ sp:varName "dailyDrillingActivity"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "nameContractor"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedContractorName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type rhspin:companyById ;
arg:id [ sp:varName "normalizedContractorName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "contractor"^^xsd:string
]
])
] [ sp:object
[ sp:varName "wellBore"^^xsd:string
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 162 Set drilling operator for drilling activity"^^xsd:string ;
sp:templates ([ sp:object _:b15 ;
sp:predicate ep-activity:drillingOperator ;
sp:predicate ep-core:temporalPartOf ;
sp:subject
[ sp:varName "dailyDrillingActivity"^^xsd:string
[ sp:varName "temporalPartOfAWellBore"^^xsd:string
]
] [ sp:object ep-org:Company ;
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ;
sp:predicate rdf:type ;
sp:subject _:b15
] [ sp:object
[ sp:varName "nameOperator"^^xsd:string
] ;
sp:predicate ep-core:name ;
sp:subject _:b15
]) ;
sp:where ([ sp:object
[ sp:varName "nameWellBore"^^xsd:string
] ;
sp:predicate ep-spin-lib:nameWellbore ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "dTimStart"^^xsd:string
] ;
sp:predicate ddr:dTimStart ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "wellboreInfo"^^xsd:string
] ;
sp:predicate ddr:wellboreInfoRef ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "nameOperator"^^xsd:string
] ;
sp:predicate ddr:operator ;
sp:subject
[ sp:varName "wellboreInfo"^^xsd:string
[ sp:varName "wellBore"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
......@@ -837,34 +846,31 @@ This rule processes data from statusInfo, but is here because it must be execute
])
] .
_:b7 sp:varName "dailyDrillingActivity"^^xsd:string .
_:b9 sp:varName "nameWellBore"^^xsd:string .
[] rdf:type sp:Modify .
_:b10
sp:varName "dTimStart"^^xsd:string .
[] rdf:type fn:starts-with .
_:b11
sp:varName "wellboreInfo"^^xsd:string .
[] rdf:type smf:trim .
_:b12
sp:varName "rigAlias"^^xsd:string .
[] rdf:type smf:regex .
_:b13
_:b10
sp:varName "normalizedWellBoreName"^^xsd:string .
[] rdf:type sp:Modify .
_:b9 sp:varName "rigAlias"^^xsd:string .
[] rdf:type fn:starts-with .
_:b8 sp:varName "wellboreInfo"^^xsd:string .
[] rdf:type smf:trim .
_:b7 sp:varName "dTimStart"^^xsd:string .
[] rdf:type smf:regex .
_:b6 sp:varName "nameWellBore"^^xsd:string .
([] [] [ rdf:type sp:Filter
] [ rdf:type sp:Bind
]) .
_:b4 sp:varName "dailyDrillingActivity"^^xsd:string .
([]) .
([]) .
([] [] [ rdf:type sp:Filter
] [ rdf:type sp:Bind
]) .
......
# Saved by TopBraid on Sat Oct 15 12:48:13 BST 2011
# baseURI: http://www.reportinghub.no/test/ddr/TEST_ddr-xml-ingest
# imports: http://www.reportinghub.no/np/data/npd
# imports: http://spinrdf.org/spin
# imports: http://www.reportinghub.no/ep/transform/1.1/ddr/collector
......@@ -16,5 +14,5 @@
<http://www.reportinghub.no/test/ddr/TEST_ddr-xml-ingest>
rdf:type owl:Ontology ;
owl:imports <http://www.reportinghub.no/np/data/npd> , <http://www.reportinghub.no/ep/transform/1.1/ddr/collector> , <http://spinrdf.org/spin> ;
owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/transform/1.1/ddr/collector> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
......
# Saved by TopBraid on Sat Oct 15 12:48:13 BST 2011
# baseURI: null
@prefix composite: <http://www.topbraid.org/2007/05/composite.owl#> .
......