David Price

Fixed Step 106 Wellbore part of Well to use NPD URIs correctly

# Saved by TopBraid on Fri Oct 21 16:32:54 BST 2011
# baseURI: http://www.reportinghub.no/ep/transform/1.1/ddr/drillReport
# imports: http://www.reportinghub.no/ep/schema/1.0/report
# imports: http://www.reportinghub.no/ep/spin/1.1/lib
# imports: http://spinrdf.org/spin
# imports: http://www.energistics.org/schemas/abstract
# imports: http://www.witsml.org/schemas/1series
# imports: http://www.reportinghub.no/ep/schema/1.0/well
# imports: http://www.reportinghub.no/ep/schema/1.0/activity
# imports: http://www.reportinghub.no/ep/schema/1.0/activity-purpose
# imports: http://www.reportinghub.no/ep/schema/1.0/core
# imports: http://www.reportinghub.no/ep/schema/1.0/equipment
# imports: http://www.reportinghub.no/ep/schema/1.0/activity-purpose
# imports: http://www.reportinghub.no/ep/schema/1.0/activity
# imports: http://spinrdf.org/spin
# imports: http://www.reportinghub.no/ep/schema/1.0/report
# imports: http://www.reportinghub.no/ep/schema/1.0/well
# imports: http://www.reportinghub.no/ep/spin/1.1/lib
# imports: http://www.witsml.org/schemas/1series
@prefix NPD_110721144611-valid: <file:///Sandbox/NPD_110721144611-valid.xml#> .
@prefix arg: <http://spinrdf.org/arg#> .
......@@ -32,122 +31,99 @@
ddr:Obj_drillReport
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 103 Create DailyDrillingReport, DailyDrillingActivity, and TemporalPartOfAWellBore
Minimum data - createDate, dTimStart, dTimEnd, nameWellBore
Optional data - extendedReport
replaced for testing - BIND (rhspin:wellBoreByName(?nameWellBore) AS ?wellBore) ."""^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#DailyDrillingReport> ;
sp:predicate rdf:type ;
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/activity#DailyDrillingActivity> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/well#TemporalPartOfAWell> ;
sp:predicate rdf:type ;
sp:subject _:b2
] [ sp:object _:b2 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:subject _:b1
] [ sp:object _:b3 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#createdAt> ;
sp:subject _:b1
] [ sp:object _:b4 ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject _:b2
] [ sp:object <http://www.reportinghub.no/ep/schema/well#TemporalPartOfAWellBore> ;
sp:predicate rdf:type ;
sp:subject _:b5
] [ sp:object _:b6 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b5
] [ sp:object _:b7 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#humanRecognizableName> ;
sp:subject _:b6
] [ sp:object _:b5 ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#onWellBore> ;
sp:subject _:b2
] [ sp:object _:b8 ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#descriptionOfActivitiesFollowingTheDailyReportingPeriod> ;
sp:subject _:b2
] [ sp:object <http://www.reportinghub.no/ep/schema/report#Report> ;
sp:predicate rdf:type ;
sp:subject _:b8
] [ sp:object _:b9 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#hasContent> ;
sp:subject _:b8
] [ sp:object _:b10 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#createdAt> ;
sp:subject _:b8
] [ 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:where ([ sp:object _:b7 ;
sp:where ([ sp:object
[ sp:varName "nameWellBore"^^xsd:string
] ;
sp:predicate ep-spin-lib:nameWellbore ;
sp:subject spin:_this
] [ sp:object _:b4 ;
sp:predicate ddr:dTimStart ;
sp:subject spin:_this
] [ sp:object _:b11 ;
sp:predicate ddr:dTimEnd ;
] [ sp:object
[ sp:varName "nameWell"^^xsd:string
] ;
sp:predicate ep-spin-lib:nameWell ;
sp:subject spin:_this
] [ sp:object _:b3 ;
sp:predicate ddr:createDate ;
] [ sp:object
[ sp:varName "dTimStart"^^xsd:string
] ;
sp:predicate ddr:dTimStart ;
sp:subject spin:_this
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b12 ;
sp:predicate ddr:extendedReportRef ;
sp:subject spin:_this
] [ sp:object _:b9 ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject _:b12
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b10 ;
sp:predicate ddr:dTim ;
sp:subject _:b12
])
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 _:b7
] [ sp:object
[ sp:varName "temporalPartOfAWellBore"^^xsd:string
] ;
sp:variable _:b13
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:buildDailyDrillingReportURI ;
sp:arg1 _:b13 ;
sp:arg2 _:b3
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 _:b1
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:buildDailyDrillingActivityURI ;
sp:arg1 _:b13 ;
sp:arg2 _:b4
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
]
] [ sp:object
[ sp:varName "well"^^xsd:string
] ;
sp:variable _:b2
sp:predicate <http://www.reportinghub.no/np/schema/npd#partOfWell> ;
sp:subject
[ sp:varName "wellBore"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:buildTemporalPartOfAWellBoreURI ;
sp:arg1 _:b13 ;
sp:arg2 _:b4 ;
sp:arg3 _:b11
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "nameWellBore"^^xsd:string
]
] ;
sp:variable _:b5
sp:variable
[ sp:varName "normalizedWellBoreName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type rhspin:wellBoreByName ;
arg:wellBoreName
[ rdf:type xsd:string ;
sp:arg1 _:b7
[ rdf:type ep-spin-lib:buildDailyDrillingActivityURI ;
sp:arg1 [ sp:varName "normalizedWellBoreName"^^xsd:string
] ;
sp:arg2 [ sp:varName "dTimStart"^^xsd:string
]
] ;
sp:variable _:b6
sp:variable
[ sp:varName "dailyDrillingActivity"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 105
Classify a DailyDrillingReport"""^^xsd:string ;
rdfs:comment """STEP 103a Set name of DailyDrillingReport as label
Minimum data - createDate, dTimStart, nameWellBore"""^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "dailyDrillingReportType"^^xsd:string
[ sp:varName "nameDailyDrillingReport"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#humanRecognizableName> ;
sp:subject
[ sp:varName "dailyDrillingReport"^^xsd:string
]
......@@ -158,26 +134,17 @@ Classify a DailyDrillingReport"""^^xsd:string ;
sp:predicate ep-spin-lib:nameWellbore ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "createDate"^^xsd:string
[ sp:varName "nameDailyDrillingReport"^^xsd:string
] ;
sp:predicate ddr:createDate ;
sp:predicate ddr:name ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "versionKind"^^xsd:string
[ sp:varName "createDate"^^xsd:string
] ;
sp:predicate ddr:versionKindRef ;
sp:predicate ddr:createDate ;
sp:subject spin:_this
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:selectDailyDrillingReportType ;
sp:arg1 [ sp:varName "versionKind"^^xsd:string
]
] ;
sp:variable
[ sp:varName "dailyDrillingReportType"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "nameWellBore"^^xsd:string
]
......@@ -248,12 +215,12 @@ Classify a DailyDrillingReport"""^^xsd:string ;
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 103a Set name of DailyDrillingReport as label
Minimum data - createDate, dTimStart, nameWellBore"""^^xsd:string ;
rdfs:comment """STEP 105
Classify a DailyDrillingReport"""^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "nameDailyDrillingReport"^^xsd:string
[ sp:varName "dailyDrillingReportType"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#humanRecognizableName> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "dailyDrillingReport"^^xsd:string
]
......@@ -264,17 +231,26 @@ Minimum data - createDate, dTimStart, nameWellBore"""^^xsd:string ;
sp:predicate ep-spin-lib:nameWellbore ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "nameDailyDrillingReport"^^xsd:string
[ sp:varName "createDate"^^xsd:string
] ;
sp:predicate ddr:name ;
sp:predicate ddr:createDate ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "createDate"^^xsd:string
[ sp:varName "versionKind"^^xsd:string
] ;
sp:predicate ddr:createDate ;
sp:predicate ddr:versionKindRef ;
sp:subject spin:_this
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:selectDailyDrillingReportType ;
sp:arg1 [ sp:varName "versionKind"^^xsd:string
]
] ;
sp:variable
[ sp:varName "dailyDrillingReportType"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "nameWellBore"^^xsd:string
]
......@@ -297,120 +273,140 @@ Minimum data - createDate, dTimStart, nameWellBore"""^^xsd:string ;
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 106 Create Well Part"^^xsd:string ;
sp:templates ([ sp:object _:b14 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#humanRecognizableName> ;
sp:subject _:b15
] [ sp:object _:b16 ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#onWell> ;
sp:subject _:b17
] [ sp:object _:b15 ;
rdfs:comment """STEP 103 Create DailyDrillingReport, DailyDrillingActivity, and TemporalPartOfAWellBore
Minimum data - createDate, dTimStart, dTimEnd, nameWellBore
Optional data - extendedReport
replaced for testing - BIND (rhspin:wellBoreByName(?nameWellBore) AS ?wellBore) ."""^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/report#DailyDrillingReport> ;
sp:predicate rdf:type ;
sp:subject _:b2
] [ sp:object <http://www.reportinghub.no/ep/schema/activity#DailyDrillingActivity> ;
sp:predicate rdf:type ;
sp:subject _:b3
] [ sp:object _:b3 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:subject _:b2
] [ sp:object _:b4 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#createdAt> ;
sp:subject _:b2
] [ sp:object _:b5 ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject _:b3
] [ sp:object <http://www.reportinghub.no/ep/schema/well#TemporalPartOfAWellBore> ;
sp:predicate rdf:type ;
sp:subject _:b6
] [ sp:object _:b7 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b16
] [ sp:object <http://www.reportinghub.no/ep/schema/well#TemporalPartOfAWell> ;
sp:subject _:b6
] [ sp:object _:b8 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#humanRecognizableName> ;
sp:subject _:b7
] [ sp:object _:b6 ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#onWellBore> ;
sp:subject _:b3
] [ sp:object _:b9 ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#descriptionOfActivitiesFollowingTheDailyReportingPeriod> ;
sp:subject _:b3
] [ sp:object <http://www.reportinghub.no/ep/schema/report#Report> ;
sp:predicate rdf:type ;
sp:subject _:b16
] [ sp:object _:b18 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:subject _:b15
sp:subject _:b9
] [ sp:object _:b10 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#hasContent> ;
sp:subject _:b9
] [ sp:object _:b11 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#createdAt> ;
sp:subject _:b9
]) ;
sp:where ([ sp:object _:b19 ;
sp:where ([ sp:object _:b8 ;
sp:predicate ep-spin-lib:nameWellbore ;
sp:subject spin:_this
] [ sp:object _:b14 ;
sp:predicate ep-spin-lib:nameWell ;
sp:subject spin:_this
] [ sp:object _:b20 ;
] [ sp:object _:b5 ;
sp:predicate ddr:dTimStart ;
sp:subject spin:_this
] [ sp:object _:b21 ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#onWellBore> ;
sp:subject _:b17
] [ sp:object _:b18 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b21
] [ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ;
sp:predicate rdf:type ;
sp:subject _:b18
] [ sp:object _:b12 ;
sp:predicate ddr:dTimEnd ;
sp:subject spin:_this
] [ sp:object _:b4 ;
sp:predicate ddr:createDate ;
sp:subject spin:_this
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b13 ;
sp:predicate ddr:extendedReportRef ;
sp:subject spin:_this
] [ sp:object _:b10 ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject _:b13
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b11 ;
sp:predicate ddr:dTim ;
sp:subject _:b13
])
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 _:b19
sp:arg1 _:b8
] ;
sp:variable _:b14
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:buildDailyDrillingReportURI ;
sp:arg1 _:b14 ;
sp:arg2 _:b4
] ;
sp:variable _:b22
sp:variable _:b2
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:buildDailyDrillingActivityURI ;
sp:arg1 _:b22 ;
sp:arg2 _:b20
sp:arg1 _:b14 ;
sp:arg2 _:b5
] ;
sp:variable _:b17
sp:variable _:b3
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 _:b14
[ rdf:type ep-spin-lib:buildTemporalPartOfAWellBoreURI ;
sp:arg1 _:b14 ;
sp:arg2 _:b5 ;
sp:arg3 _:b12
] ;
sp:variable _:b23
sp:variable _:b6
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type rhspin:wellByName ;
arg:wellName _:b23
[ rdf:type rhspin:wellBoreByName ;
arg:wellBoreName
[ rdf:type xsd:string ;
sp:arg1 _:b8
]
] ;
sp:variable _:b15
sp:variable _:b7
])
] .
_:b19
sp:varName "nameWellBore"^^xsd:string .
_:b14
sp:varName "nameWell"^^xsd:string .
_:b20
sp:varName "dTimStart"^^xsd:string .
_:b2 sp:varName "dailyDrillingReport"^^xsd:string .
_:b17
sp:varName "dailyDrillingActivity"^^xsd:string .
_:b3 sp:varName "dailyDrillingActivity"^^xsd:string .
_:b21
sp:varName "temporalPartOfAWellBore"^^xsd:string .
_:b4 sp:varName "createDate"^^xsd:string .
_:b18
sp:varName "wellBore"^^xsd:string .
_:b22
sp:varName "normalizedWellBoreName"^^xsd:string .
_:b5 sp:varName "dTimStart"^^xsd:string .
_:b23
sp:varName "normalizedWellName"^^xsd:string .
_:b6 sp:varName "temporalPartOfAWellBore"^^xsd:string .
_:b15
sp:varName "well"^^xsd:string .
_:b7 sp:varName "wellBore"^^xsd:string .
_:b7 sp:varName "nameWellBore"^^xsd:string .
_:b8 sp:varName "nameWellBore"^^xsd:string .
_:b4 sp:varName "dTimStart"^^xsd:string .
_:b10
sp:varName "extendedReportContent"^^xsd:string .
_:b11
sp:varName "dTimEnd"^^xsd:string .
_:b3 sp:varName "createDate"^^xsd:string .
sp:varName "dTimExtendedReport"^^xsd:string .
_:b12
sp:varName "extendedReport"^^xsd:string .
_:b9 sp:varName "extendedReportContent"^^xsd:string .
_:b10
sp:varName "dTimExtendedReport"^^xsd:string .
sp:varName "dTimEnd"^^xsd:string .
_:b13
sp:varName "normalizedWellBoreName"^^xsd:string .
_:b1 sp:varName "dailyDrillingReport"^^xsd:string .
_:b2 sp:varName "dailyDrillingActivity"^^xsd:string .
_:b5 sp:varName "temporalPartOfAWellBore"^^xsd:string .
sp:varName "extendedReport"^^xsd:string .
_:b6 sp:varName "wellBore"^^xsd:string .
_:b14
sp:varName "normalizedWellBoreName"^^xsd:string .
......
# Saved by TopBraid on Fri Oct 21 16:32:55 BST 2011
# baseURI: null
@prefix composite: <http://www.topbraid.org/2007/05/composite.owl#> .
......