David Price

Add DateTime function and use in tables and header

......@@ -6,6 +6,7 @@
@prefix arg: <http://spinrdf.org/arg#> .
@prefix ddr-tables: <http://www.reportinghub.no/ep/spin/ddr-tables#> .
@prefix ep-spin-lib: <http://www.reportinghub.no/ep/spin/lib#> .
@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#> .
......@@ -21,7 +22,7 @@
<http://www.reportinghub.no/ep/spin/ddr-tables>
rdf:type owl:Ontology ;
rdfs:comment "A collection of SELECT templates that can be used to assemble tables in DD reports."^^xsd:string ;
owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/activity-purpose> , <http://www.reportinghub.no/ep/schema/1.0/ddr> , <http://www.reportinghub.no/spin/rh> ;
owl:imports <http://www.reportinghub.no/spin/rh> , <http://www.reportinghub.no/ep/schema/1.0/ddr> , <http://www.reportinghub.no/ep/schema/1.0/activity-purpose> , <http://spinrdf.org/spin> ;
owl:versionInfo "0.1.0"^^xsd:string .
ddr-tables:BitRecord
......@@ -438,11 +439,9 @@ ddr-tables:CasingLinerTubingInformation
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:dateFormat ;
arg:date
[ sp:varName "startedAt"^^xsd:string
] ;
arg:pattern "HH:mm"
[ rdf:type ep-spin-lib:normalizeTimeFromDateTime ;
sp:arg1 [ sp:varName "startedAt"^^xsd:string
]
] ;
sp:variable
[ sp:varName "startTime"^^xsd:string
......@@ -458,11 +457,9 @@ ddr-tables:CasingLinerTubingInformation
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:dateFormat ;
arg:date
[ sp:varName "finishedAt"^^xsd:string
] ;
arg:pattern "HH:mm"
[ rdf:type ep-spin-lib:normalizeTimeFromDateTime ;
sp:arg1 [ sp:varName "finishedAt"^^xsd:string
]
] ;
sp:variable
[ sp:varName "endTime"^^xsd:string
......@@ -804,11 +801,9 @@ ddr-tables:CementFluidInformation
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:dateFormat ;
arg:date
[ sp:varName "startedAt"^^xsd:string
] ;
arg:pattern "HH:mm"
[ rdf:type ep-spin-lib:normalizeTimeFromDateTime ;
sp:arg1 [ sp:varName "startedAt"^^xsd:string
]
] ;
sp:variable
[ sp:varName "startTime"^^xsd:string
......@@ -1093,11 +1088,9 @@ ddr-tables:CementInformation
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:dateFormat ;
arg:date
[ sp:varName "startedAt"^^xsd:string
] ;
arg:pattern "HH:mm"
[ rdf:type ep-spin-lib:normalizeTimeFromDateTime ;
sp:arg1 [ sp:varName "startedAt"^^xsd:string
]
] ;
sp:variable
[ sp:varName "startTime"^^xsd:string
......@@ -1120,11 +1113,9 @@ ddr-tables:CementInformation
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:dateFormat ;
arg:date
[ sp:varName "finishedAt"^^xsd:string
] ;
arg:pattern "HH:mm"
[ rdf:type ep-spin-lib:normalizeTimeFromDateTime ;
sp:arg1 [ sp:varName "finishedAt"^^xsd:string
]
] ;
sp:variable
[ sp:varName "endTime"^^xsd:string
......@@ -1152,11 +1143,9 @@ ddr-tables:CementInformation
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:dateFormat ;
arg:date
[ sp:varName "nominallyAt"^^xsd:string
] ;
arg:pattern "yyyy-MM-dd HH:mm"
[ rdf:type ep-spin-lib:normalizeTimeFromDateTime ;
sp:arg1 [ sp:varName "nominallyAt"^^xsd:string
]
] ;
sp:variable
[ sp:varName "pressureReleaseTime"^^xsd:string
......@@ -1683,12 +1672,21 @@ ddr-tables:DrillingFluidInformation
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "sampleTime"^^xsd:string
[ sp:varName "nominallyAt"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#nominallyAt> ;
sp:subject
[ sp:varName "fr"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeTimeFromDateTime ;
sp:arg1 [ sp:varName "nominallyAt"^^xsd:string
]
] ;
sp:variable
[ sp:varName "sampleTime"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
......@@ -1827,94 +1825,176 @@ ddr-tables:EquipmentFailure
rdfs:subClassOf rhspin:DDRTableTemplates ;
spin:body
[ rdf:type sp:Select ;
sp:orderBy (_:b1) ;
sp:resultVariables (_:b1 _:b2 _:b3 _:b4 _:b5 _:b6 _:b7) ;
sp:where ([ sp:object _:b8 ;
sp:orderBy ([ sp:varName "startTime"^^xsd:string
]) ;
sp:resultVariables ([ sp:varName "startTime"^^xsd:string
] [ sp:varName "depthMD"^^xsd:string
] [ sp:varName "depthTVD"^^xsd:string
] [ sp:varName "equipmentType"^^xsd:string
] [ sp:varName "downtime"^^xsd:string
] [ sp:varName "repairedTime"^^xsd:string
] [ sp:varName "failureDescription"^^xsd:string
]) ;
sp:where ([ sp:object
[ sp:varName "reportOn"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:subject
[ sp:varName "report"^^xsd:string
]
] [ sp:object _:b9 ;
] [ sp:object
[ sp:varName "part"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:subject _:b8
sp:subject
[ sp:varName "reportOn"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/activity#EquipmentFailureAndRepair> ;
sp:predicate rdf:type ;
sp:subject _:b9
sp:subject
[ sp:varName "part"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b10 ;
sp:elements ([ sp:object
[ sp:varName "mpt"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#missedProductionTime> ;
sp:subject _:b9
] [ sp:object _:b5 ;
sp:subject
[ sp:varName "part"^^xsd:string
]
] [ sp:object
[ sp:varName "downtime"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#minute> ;
sp:subject _:b10
sp:subject
[ sp:varName "mpt"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b11 ;
sp:elements ([ sp:object
[ sp:varName "temporalPartOfEquipment"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#failedEquipment> ;
sp:subject _:b9
] [ sp:object _:b12 ;
sp:subject
[ sp:varName "part"^^xsd:string
]
] [ sp:object
[ sp:varName "equipment"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b11
] [ sp:object _:b13 ;
sp:subject
[ sp:varName "temporalPartOfEquipment"^^xsd:string
]
] [ sp:object
[ sp:varName "classOfEquipment"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b12
sp:subject
[ sp:varName "equipment"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/drilling-equipment-type#DrillingEquipmentType> ;
sp:predicate rdf:type ;
sp:subject _:b13
] [ sp:object _:b4 ;
sp:subject
[ sp:varName "classOfEquipment"^^xsd:string
]
] [ sp:object
[ sp:varName "equipmentType"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject _:b13
sp:subject
[ sp:varName "classOfEquipment"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b14 ;
sp:elements ([ sp:object
[ sp:varName "timeOfFailure"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#timeOfFailure> ;
sp:subject _:b9
sp:subject
[ sp:varName "part"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:dateFormat ;
arg:date _:b14 ;
arg:pattern "yyyy-MM-dd HH:mm"
[ rdf:type ep-spin-lib:normalizeTimeFromDateTime ;
sp:arg1 [ sp:varName "timeOfFailure"^^xsd:string
]
] ;
sp:variable _:b1
sp:variable
[ sp:varName "startTime"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b15 ;
sp:elements ([ sp:object
[ sp:varName "timeOfRepair"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#timeOfRepair> ;
sp:subject _:b9
sp:subject
[ sp:varName "part"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:dateFormat ;
arg:date _:b15 ;
arg:pattern "yyyy-MM-dd HH:mm"
[ rdf:type ep-spin-lib:normalizeTimeFromDateTime ;
sp:arg1 [ sp:varName "timeOfRepair"^^xsd:string
]
] ;
sp:variable _:b6
sp:variable
[ sp:varName "repairedTime"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b16 ;
sp:elements ([ sp:object
[ sp:varName "wellbore"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#onWellBore> ;
sp:subject _:b9
] [ sp:object _:b17 ;
sp:subject
[ sp:varName "part"^^xsd:string
]
] [ sp:object
[ sp:varName "md"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/well#bottomHoleMeasuredDepth> ;
sp:subject _:b16
] [ sp:object _:b2 ;
sp:subject
[ sp:varName "wellbore"^^xsd:string
]
] [ sp:object
[ sp:varName "depthMD"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#metre> ;
sp:subject _:b17
sp:subject
[ sp:varName "md"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b16 ;
sp:elements ([ sp:object
[ sp:varName "wellbore"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#onWellBore> ;
sp:subject _:b9
] [ sp:object _:b18 ;
sp:subject
[ sp:varName "part"^^xsd:string
]
] [ sp:object
[ sp:varName "tvd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/well#bottomHoleTrueVerticalDepth> ;
sp:subject _:b16
] [ sp:object _:b3 ;
sp:subject
[ sp:varName "wellbore"^^xsd:string
]
] [ sp:object
[ sp:varName "depthTVD"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#metre> ;
sp:subject _:b18
sp:subject
[ sp:varName "tvd"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b7 ;
sp:elements ([ sp:object
[ sp:varName "failureDescription"^^xsd:string
] ;
sp:predicate rdfs:comment ;
sp:subject _:b9
sp:subject
[ sp:varName "part"^^xsd:string
]
])
])
] ;
......@@ -2207,11 +2287,9 @@ ddr-tables:GasReadingInformation
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:dateFormat ;
arg:date
[ sp:varName "nominallyAt"^^xsd:string
] ;
arg:pattern "HH:mm"
[ rdf:type ep-spin-lib:normalizeTimeFromDateTime ;
sp:arg1 [ sp:varName "nominallyAt"^^xsd:string
]
] ;
sp:variable
[ sp:varName "time"^^xsd:string
......@@ -2877,96 +2955,174 @@ ddr-tables:Operations
rdfs:subClassOf rhspin:DDRTableTemplates ;
spin:body
[ rdf:type sp:Select ;
sp:orderBy (_:b19) ;
sp:resultVariables (_:b19 _:b20 _:b21 _:b22 _:b23 _:b24 _:b25 _:b26) ;
sp:where ([ sp:object _:b27 ;
sp:orderBy ([ sp:varName "startTime"^^xsd:string
]) ;
sp:resultVariables ([ sp:varName "startTime"^^xsd:string
] [ sp:varName "endTime"^^xsd:string
] [ sp:varName "startDepth"^^xsd:string
] [ sp:varName "endDepth"^^xsd:string
] [ sp:varName "depth"^^xsd:string
] [ sp:varName "mainSubActivity"^^xsd:string
] [ sp:varName "state"^^xsd:string
] [ sp:varName "remark"^^xsd:string
]) ;
sp:where ([ sp:object
[ sp:varName "reportOn"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:subject
[ sp:varName "report"^^xsd:string
]
] [ sp:object _:b28 ;
] [ sp:object
[ sp:varName "part"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:subject _:b27
] [ sp:object _:b29 ;
sp:subject
[ sp:varName "reportOn"^^xsd:string
]
] [ sp:object
[ sp:varName "startedAt"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject _:b28
sp:subject
[ sp:varName "part"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:dateFormat ;
arg:date _:b29 ;
arg:pattern "HH:mm"
[ rdf:type ep-spin-lib:normalizeTimeFromDateTime ;
sp:arg1 [ sp:varName "startedAt"^^xsd:string
]
] ;
sp:variable
[ sp:varName "startTime"^^xsd:string
]
] [ sp:object
[ sp:varName "finishedAt"^^xsd:string
] ;
sp:variable _:b19
] [ sp:object _:b30 ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject _:b28
sp:subject
[ sp:varName "part"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:dateFormat ;
arg:date _:b30 ;
arg:pattern "HH:mm"
[ rdf:type ep-spin-lib:normalizeTimeFromDateTime ;
sp:arg1 [ sp:varName "finishedAt"^^xsd:string
]
] ;
sp:variable
[ sp:varName "endTime"^^xsd:string
]
] [ sp:object
[ sp:varName "stateclass"^^xsd:string
] ;
sp:variable _:b20
] [ sp:object _:b31 ;
sp:predicate rdf:type ;
sp:subject _:b28
sp:subject
[ sp:varName "part"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/activity#ActivitySuccessType> ;
sp:predicate rdf:type ;
sp:subject _:b31
] [ sp:object _:b25 ;
sp:subject
[ sp:varName "stateclass"^^xsd:string
]
] [ sp:object
[ sp:varName "state"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject _:b31
sp:subject
[ sp:varName "stateclass"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b32 ;
sp:elements ([ sp:object
[ sp:varName "subactclass"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b28
sp:subject
[ sp:varName "part"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/activity-purpose#DailyDrillingActivityPurposeType> ;
sp:predicate rdf:type ;
sp:subject _:b32
sp:subject
[ sp:varName "subactclass"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:name ;
sp:arg1 _:b32
sp:arg1 [ sp:varName "subactclass"^^xsd:string
]
] ;
sp:variable _:b24
sp:variable
[ sp:varName "mainSubActivity"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b33 ;
sp:elements ([ sp:object
[ sp:varName "wellbore"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#onWellBore> ;
sp:subject _:b28
] [ sp:object _:b34 ;
sp:subject
[ sp:varName "part"^^xsd:string
]
] [ sp:object
[ sp:varName "id"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/well#initialBottomHoleMeasuredDepth> ;
sp:subject _:b33
] [ sp:object _:b21 ;
sp:subject
[ sp:varName "wellbore"^^xsd:string
]
] [ sp:object
[ sp:varName "startDepth"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#metre> ;
sp:subject _:b34
] [ sp:object _:b33 ;
sp:subject
[ sp:varName "id"^^xsd:string
]
] [ sp:object
[ sp:varName "wellbore"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#onWellBore> ;
sp:subject _:b28
] [ sp:object _:b35 ;
sp:subject
[ sp:varName "part"^^xsd:string
]
] [ sp:object
[ sp:varName "ed"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/well#finalBottomHoleMeasuredDepth> ;
sp:subject _:b33
] [ sp:object _:b22 ;
sp:subject
[ sp:varName "wellbore"^^xsd:string
]
] [ sp:object
[ sp:varName "endDepth"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#metre> ;
sp:subject _:b35
sp:subject
[ sp:varName "ed"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:sub ;
sp:arg1 [ rdf:type spif:cast ;
arg:datatype xsd:float ;
sp:arg1 _:b22
sp:arg1 [ sp:varName "endDepth"^^xsd:string
]
] ;
sp:arg2 [ rdf:type spif:cast ;
arg:datatype xsd:float ;
sp:arg1 _:b21
sp:arg1 [ sp:varName "startDepth"^^xsd:string
]
]
] ;
sp:variable _:b23
sp:variable
[ sp:varName "depth"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b26 ;
sp:elements ([ sp:object
[ sp:varName "remark"^^xsd:string
] ;
sp:predicate rdfs:comment ;
sp:subject _:b28
sp:subject
[ sp:varName "part"^^xsd:string
]
])
])
] ;
......@@ -3025,11 +3181,9 @@ ddr-tables:PerforationInformation
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:dateFormat ;
arg:date
[ sp:varName "startedAt"^^xsd:string
] ;
arg:pattern "yyyy-MM-dd HH:mm"
[ rdf:type ep-spin-lib:normalizeTimeFromDateTime ;
sp:arg1 [ sp:varName "startedAt"^^xsd:string
]
] ;
sp:variable
[ sp:varName "timeOfOpeningWellPerf"^^xsd:string
......@@ -3045,11 +3199,9 @@ ddr-tables:PerforationInformation
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:dateFormat ;
arg:date
[ sp:varName "finishedAt"^^xsd:string
] ;
arg:pattern "yyyy-MM-dd HH:mm"
[ rdf:type ep-spin-lib:normalizeTimeFromDateTime ;
sp:arg1 [ sp:varName "finishedAt"^^xsd:string
]
] ;
sp:variable
[ sp:varName "timeOfClosingWellPerf"^^xsd:string
......@@ -3221,11 +3373,9 @@ ddr-tables:PorePressure
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:dateFormat ;
arg:date
[ sp:varName "nominallyAt"^^xsd:string
] ;
arg:pattern "yyyy-MM-dd HH:mm"
[ rdf:type ep-spin-lib:normalizeTimeFromDateTime ;
sp:arg1 [ sp:varName "nominallyAt"^^xsd:string
]
] ;
sp:variable
[ sp:varName "time"^^xsd:string
......@@ -3928,7 +4078,7 @@ ddr-tables:WellControlIncident
arg:date
[ sp:varName "startedAt"^^xsd:string
] ;
arg:pattern "yyyy-MM-dd"
arg:pattern "yyyy-MMM-dd"
] ;
sp:variable
[ sp:varName "date"^^xsd:string
......@@ -3960,11 +4110,9 @@ ddr-tables:WellControlIncident
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:dateFormat ;
arg:date
[ sp:varName "finishedAt"^^xsd:string
] ;
arg:pattern "HH:mm"
[ rdf:type ep-spin-lib:normalizeTimeFromDateTime ;
sp:arg1 [ sp:varName "finishedAt"^^xsd:string
]
] ;
sp:variable
[ sp:varName "timeForWellControlRegain"^^xsd:string
......@@ -4077,11 +4225,9 @@ ddr-tables:WellTestInformation
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:dateFormat ;
arg:date
[ sp:varName "finishedAt"^^xsd:string
] ;
arg:pattern "HH:mm"
[ rdf:type ep-spin-lib:normalizeTimeFromDateTime ;
sp:arg1 [ sp:varName "finishedAt"^^xsd:string
]
] ;
sp:variable
[ sp:varName "time"^^xsd:string
......@@ -4455,99 +4601,3 @@ content
ppm"""^^xsd:string """H2S
content
ppm"""^^xsd:string) .
_:b35
sp:varName "ed"^^xsd:string .
_:b34
sp:varName "id"^^xsd:string .
_:b33
sp:varName "wellbore"^^xsd:string .
_:b32
sp:varName "subactclass"^^xsd:string .
_:b31
sp:varName "stateclass"^^xsd:string .
_:b30
sp:varName "finishedAt"^^xsd:string .
_:b29
sp:varName "startedAt"^^xsd:string .
_:b28
sp:varName "part"^^xsd:string .
_:b27
sp:varName "reportOn"^^xsd:string .
_:b26
sp:varName "remark"^^xsd:string .
_:b25
sp:varName "state"^^xsd:string .
_:b24
sp:varName "mainSubActivity"^^xsd:string .
_:b23
sp:varName "depth"^^xsd:string .
_:b22
sp:varName "endDepth"^^xsd:string .
_:b21
sp:varName "startDepth"^^xsd:string .
_:b20
sp:varName "endTime"^^xsd:string .
_:b19
sp:varName "startTime"^^xsd:string .
_:b18
sp:varName "tvd"^^xsd:string .
_:b17
sp:varName "md"^^xsd:string .
_:b16
sp:varName "wellbore"^^xsd:string .
_:b15
sp:varName "timeOfRepair"^^xsd:string .
_:b14
sp:varName "timeOfFailure"^^xsd:string .
_:b13
sp:varName "classOfEquipment"^^xsd:string .
_:b12
sp:varName "equipment"^^xsd:string .
_:b11
sp:varName "temporalPartOfEquipment"^^xsd:string .
_:b10
sp:varName "mpt"^^xsd:string .
_:b9 sp:varName "part"^^xsd:string .
_:b8 sp:varName "reportOn"^^xsd:string .
_:b7 sp:varName "failureDescription"^^xsd:string .
_:b6 sp:varName "repairedTime"^^xsd:string .
_:b5 sp:varName "downtime"^^xsd:string .
_:b4 sp:varName "equipmentType"^^xsd:string .
_:b3 sp:varName "depthTVD"^^xsd:string .
_:b2 sp:varName "depthMD"^^xsd:string .
_:b1 sp:varName "startTime"^^xsd:string .
......
# Saved by TopBraid on Wed Nov 02 15:54:15 GMT 2011
# baseURI: http://www.reportinghub.no/ep/spin/1.1/lib
# imports: http://www.reportinghub.no/ep/schema/1.0/drilling-equipment-type
# imports: http://www.reportinghub.no/ep/schema/1.0/report
# 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/well
# imports: http://spinrdf.org/spin
# 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/drilling-equipment-type
# imports: http://www.reportinghub.no/ep/schema/1.0/equipment
# imports: http://www.reportinghub.no/ep/schema/1.0/facility
# 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/spin/rh
# imports: http://www.witsml.org/schemas/1series
@prefix activity-purpose: <http://www.reportinghub.no/ep/schema/1.0/activity-purpose#> .
@prefix afn: <http://jena.hpl.hp.com/ARQ/function#> .
......@@ -32,7 +31,7 @@
<http://www.reportinghub.no/ep/spin/1.1/lib>
rdf:type owl:Ontology ;
owl:imports <http://www.reportinghub.no/spin/rh> , <http://www.reportinghub.no/ep/schema/1.0/drilling-equipment-type> , <http://www.reportinghub.no/ep/schema/1.0/report> , <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://www.reportinghub.no/ep/schema/1.0/well> , <http://spinrdf.org/spin> , <http://www.witsml.org/schemas/1series> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.reportinghub.no/ep/schema/1.0/equipment> , <http://www.reportinghub.no/ep/schema/1.0/facility> , <http://www.reportinghub.no/ep/schema/1.0/activity-purpose> ;
owl:imports <http://www.reportinghub.no/spin/rh> , <http://www.reportinghub.no/ep/schema/1.0/drilling-equipment-type> , <http://www.reportinghub.no/ep/schema/1.0/report> , <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://www.reportinghub.no/ep/schema/1.0/well> , <http://spinrdf.org/spin> , <http://www.witsml.org/schemas/1series> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.reportinghub.no/ep/schema/1.0/equipment> , <http://www.reportinghub.no/ep/schema/1.0/activity-purpose> , <http://www.reportinghub.no/ep/schema/1.0/facility> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
ep-spin-lib:Function
......@@ -629,12 +628,12 @@ ep-spin-lib:buildURI
] ;
spin:constraint
[ rdf:type spl:Argument ;
spl:predicate sp:arg1 ;
spl:predicate sp:arg2 ;
spl:valueType xsd:string
] ;
spin:constraint
[ rdf:type spl:Argument ;
spl:predicate sp:arg2 ;
spl:predicate sp:arg1 ;
spl:valueType xsd:string
] .
......@@ -984,6 +983,73 @@ ep-spin-lib:nameWellbore
] ;
spin:returnType xsd:string .
ep-spin-lib:normalizeDateTime
rdf:type spin:Function ;
rdfs:label "normalize an xsd:date for printing"^^xsd:string ;
rdfs:subClassOf ep-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables ([ sp:varName "normalizedDateTime"^^xsd:string
]) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type xsd:string ;
sp:arg1 spin:_arg1
] ;
sp:variable
[ sp:varName "arg1str"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:dateFormat ;
arg:date spin:_arg1 ;
arg:pattern "yyyy-MMM-dd HH:mm"
] ;
sp:variable
[ sp:varName "formatstr"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type afn:substr ;
sp:arg1 [ sp:varName "formatstr"^^xsd:string
] ;
sp:arg2 0 ;
sp:arg3 12
] ;
sp:variable
[ sp:varName "day"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type afn:substr ;
sp:arg1 [ sp:varName "arg1str"^^xsd:string
] ;
sp:arg2 11 ;
sp:arg3 16
] ;
sp:variable
[ sp:varName "time"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 [ sp:varName "day"^^xsd:string
] ;
sp:arg2 ", " ;
sp:arg3 [ sp:varName "time"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedDateTime"^^xsd:string
]
])
] ;
spin:constraint
[ rdf:type spl:Argument ;
spl:predicate sp:arg1 ;
spl:valueType xsd:dateTime
] .
ep-spin-lib:normalizeDoubleName
rdf:type spin:Function ;
rdfs:label "normalize an xsd:double to a rounded name string"^^xsd:string ;
......@@ -1122,6 +1188,41 @@ ep-spin-lib:normalizeString
spl:valueType xsd:string
] .
ep-spin-lib:normalizeTimeFromDateTime
rdf:type spin:Function ;
rdfs:label "normalize a time for pringing from an xsd:datetime"^^xsd:string ;
rdfs:subClassOf ep-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables ([ sp:varName "normalizedTime"^^xsd:string
]) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type xsd:string ;
sp:arg1 spin:_arg1
] ;
sp:variable
[ sp:varName "arg1str"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type afn:substr ;
sp:arg1 [ sp:varName "arg1str"^^xsd:string
] ;
sp:arg2 11 ;
sp:arg3 16
] ;
sp:variable
[ sp:varName "normalizedTime"^^xsd:string
]
])
] ;
spin:constraint
[ rdf:type spl:Argument ;
spl:predicate sp:arg1 ;
spl:valueType xsd:dateTime
] .
ep-spin-lib:selectActivitySuccessType
rdf:type spin:Function ;
rdfs:label "select ActivitySuccessType"^^xsd:string ;
......@@ -3853,251 +3954,251 @@ ddr:TTUC_Enumeration_1
rdfs:label "Enumeration"^^xsd:string ;
dtype:value ddr:TTUC_degC .
_:b86
sp:varName "yieldPointScale"^^xsd:string .
_:b85
sp:varName "wirelineFormationTestGoodnessOfSealType"^^xsd:string .
_:b1 sp:varName "uri"^^xsd:string .
_:b84
sp:varName "wellTestType"^^xsd:string .
_:b2 sp:varName "uri"^^xsd:string .
_:b83
sp:varName "wellKillingType"^^xsd:string .
_:b3 sp:varName "uri"^^xsd:string .
_:b82
sp:varName "wellControlIncidentType"^^xsd:string .
_:b4 sp:varName "uri"^^xsd:string .
_:b81
sp:varName "wellCementJobType"^^xsd:string .
_:b5 sp:varName "uri"^^xsd:string .
_:b80
sp:varName "wellCementJobTopPlugType"^^xsd:string .
_:b6 sp:varName "uri"^^xsd:string .
_:b79
sp:varName "wellCementJobPlugBumpingType"^^xsd:string .
_:b7 sp:varName "uri"^^xsd:string .
_:b78
sp:varName "wellCementJobFloatHoldingType"^^xsd:string .
_:b8 sp:varName "uri"^^xsd:string .
_:b77
sp:varName "wellCementJobCasingRotationType"^^xsd:string .
_:b9 sp:varName "uri"^^xsd:string .
_:b76
sp:varName "wellCementJobCasingReciprocationType"^^xsd:string .
_:b10
sp:varName "uri"^^xsd:string .
_:b75
sp:varName "wellCementJobBottomPlugType"^^xsd:string .
_:b11
sp:varName "uri"^^xsd:string .
_:b74
sp:varName "wellBoreTightnessType"^^xsd:string .
_:b12
sp:varName "uri"^^xsd:string .
_:b73
sp:varName "wellBoreHphtType"^^xsd:string .
_:b13
sp:varName "uri"^^xsd:string .
_:b72
sp:varName "wellBoreDrillingType"^^xsd:string .
_:b14
sp:varName "uri"^^xsd:string .
_:b71
sp:varName "volumetricFlowRateScale"^^xsd:string .
_:b15
sp:varName "uri"^^xsd:string .
_:b70
sp:varName "volumeScale"^^xsd:string .
_:b16
sp:varName "uri"^^xsd:string .
_:b69
sp:varName "durationScale"^^xsd:string .
_:b17
sp:varName "uri"^^xsd:string .
_:b68
sp:varName "temperatureScale"^^xsd:string .
_:b18
sp:varName "uri"^^xsd:string .
_:b67
sp:varName "strengthScale"^^xsd:string .
_:b19
sp:varName "uri"^^xsd:string .
_:b66
sp:varName "speedScale"^^xsd:string .
_:b20
sp:varName "uri"^^xsd:string .
_:b65
sp:varName "specificVolumeScale"^^xsd:string .
_:b21
sp:varName "uri"^^xsd:string .
_:b64
sp:varName "specificMassScale"^^xsd:string .
_:b22
sp:varName "uri"^^xsd:string .
_:b63
sp:varName "pressureTestType"^^xsd:string .
_:b23
sp:varName "uri"^^xsd:string .
_:b62
sp:varName "pressureScale"^^xsd:string .
_:b24
sp:varName "uri"^^xsd:string .
_:b61
sp:varName "porePressureDeterminationType"^^xsd:string .
_:b25
sp:varName "uri"^^xsd:string .
_:b60
sp:varName "plasticViscosityScale"^^xsd:string .
_:b26
sp:varName "uri"^^xsd:string .
_:b59
sp:varName "angleScale"^^xsd:string .
_:b27
sp:varName "uri"^^xsd:string .
_:b58
sp:varName "mudClass"^^xsd:string .
_:b28
sp:varName "uri"^^xsd:string .
_:b57
sp:varName "massPerUnitLengthScale"^^xsd:string .
_:b29
sp:varName "uri"^^xsd:string .
_:b56
sp:varName "lengthScale"^^xsd:string .
_:b30
sp:varName "uri"^^xsd:string .
_:b55
sp:varName "dailyDrillingReportType"^^xsd:string .
_:b31
sp:varName "normalizedStr"^^xsd:string .
_:b54
sp:varName "innerBarrelType"^^xsd:string .
_:b32
sp:varName "s1"^^xsd:string .
_:b53
sp:varName "gasReadingType"^^xsd:string .
_:b33
sp:varName "s2"^^xsd:string .
_:b52
sp:varName "fluidType"^^xsd:string .
_:b34
sp:varName "t0a"^^xsd:string .
_:b51
sp:varName "fixedOrMoveableRigType"^^xsd:string .
_:b35
sp:varName "t0b"^^xsd:string .
_:b50
sp:varName "drillingEquipmentType"^^xsd:string .
_:b36
sp:varName "t1"^^xsd:string .
_:b49
sp:varName "drillingActivityTypeAccordingToEquipmentType"^^xsd:string .
_:b37
sp:varName "t2"^^xsd:string .
_:b48
sp:varName "drillingActivityPurposeType"^^xsd:string .
_:b38
sp:varName "t3"^^xsd:string .
_:b47
sp:varName "drillingActivityOutcomeType"^^xsd:string .
_:b39
sp:varName "t4"^^xsd:string .
_:b46
sp:varName "densityScale"^^xsd:string .
_:b40
sp:varName "activitySuccessType"^^xsd:string .
_:b45
sp:varName "dailyDrillingReportType"^^xsd:string .
_:b41
sp:varName "casingRoleType"^^xsd:string .
_:b44
sp:varName "componentType"^^xsd:string .
_:b42
sp:varName "cementingFluidReturnType"^^xsd:string .
_:b43
sp:varName "classOfWellDatumObject"^^xsd:string .
_:b42
sp:varName "cementingFluidReturnType"^^xsd:string .
_:b44
sp:varName "componentType"^^xsd:string .
_:b41
sp:varName "casingRoleType"^^xsd:string .
_:b45
sp:varName "dailyDrillingReportType"^^xsd:string .
_:b40
sp:varName "activitySuccessType"^^xsd:string .
_:b46
sp:varName "densityScale"^^xsd:string .
_:b39
sp:varName "t4"^^xsd:string .
_:b47
sp:varName "drillingActivityOutcomeType"^^xsd:string .
_:b38
sp:varName "t3"^^xsd:string .
_:b48
sp:varName "drillingActivityPurposeType"^^xsd:string .
_:b37
sp:varName "t2"^^xsd:string .
_:b49
sp:varName "drillingActivityTypeAccordingToEquipmentType"^^xsd:string .
_:b36
sp:varName "t1"^^xsd:string .
_:b50
sp:varName "drillingEquipmentType"^^xsd:string .
_:b35
sp:varName "t0b"^^xsd:string .
_:b51
sp:varName "fixedOrMoveableRigType"^^xsd:string .
_:b34
sp:varName "t0a"^^xsd:string .
_:b52
sp:varName "fluidType"^^xsd:string .
_:b33
sp:varName "s2"^^xsd:string .
_:b53
sp:varName "gasReadingType"^^xsd:string .
_:b32
sp:varName "s1"^^xsd:string .
_:b54
sp:varName "innerBarrelType"^^xsd:string .
_:b31
sp:varName "normalizedStr"^^xsd:string .
_:b55
sp:varName "dailyDrillingReportType"^^xsd:string .
_:b30
sp:varName "uri"^^xsd:string .
_:b56
sp:varName "lengthScale"^^xsd:string .
_:b29
sp:varName "uri"^^xsd:string .
_:b57
sp:varName "massPerUnitLengthScale"^^xsd:string .
_:b28
sp:varName "uri"^^xsd:string .
_:b58
sp:varName "mudClass"^^xsd:string .
_:b27
sp:varName "uri"^^xsd:string .
_:b59
sp:varName "angleScale"^^xsd:string .
_:b26
sp:varName "uri"^^xsd:string .
_:b60
sp:varName "plasticViscosityScale"^^xsd:string .
_:b25
sp:varName "uri"^^xsd:string .
_:b61
sp:varName "porePressureDeterminationType"^^xsd:string .
_:b24
sp:varName "uri"^^xsd:string .
_:b62
sp:varName "pressureScale"^^xsd:string .
_:b23
sp:varName "uri"^^xsd:string .
_:b63
sp:varName "pressureTestType"^^xsd:string .
_:b22
sp:varName "uri"^^xsd:string .
_:b64
sp:varName "specificMassScale"^^xsd:string .
_:b21
sp:varName "uri"^^xsd:string .
_:b65
sp:varName "specificVolumeScale"^^xsd:string .
_:b20
sp:varName "uri"^^xsd:string .
_:b66
sp:varName "speedScale"^^xsd:string .
_:b19
sp:varName "uri"^^xsd:string .
_:b67
sp:varName "strengthScale"^^xsd:string .
_:b18
sp:varName "uri"^^xsd:string .
_:b68
sp:varName "temperatureScale"^^xsd:string .
_:b17
sp:varName "uri"^^xsd:string .
_:b69
sp:varName "durationScale"^^xsd:string .
_:b16
sp:varName "uri"^^xsd:string .
_:b70
sp:varName "volumeScale"^^xsd:string .
_:b15
sp:varName "uri"^^xsd:string .
_:b71
sp:varName "volumetricFlowRateScale"^^xsd:string .
_:b14
sp:varName "uri"^^xsd:string .
_:b72
sp:varName "wellBoreDrillingType"^^xsd:string .
_:b12
sp:varName "uri"^^xsd:string .
_:b73
sp:varName "wellBoreHphtType"^^xsd:string .
_:b11
sp:varName "uri"^^xsd:string .
_:b74
sp:varName "wellBoreTightnessType"^^xsd:string .
_:b10
sp:varName "uri"^^xsd:string .
_:b75
sp:varName "wellCementJobBottomPlugType"^^xsd:string .
_:b9 sp:varName "uri"^^xsd:string .
_:b76
sp:varName "wellCementJobCasingReciprocationType"^^xsd:string .
_:b8 sp:varName "uri"^^xsd:string .
_:b77
sp:varName "wellCementJobCasingRotationType"^^xsd:string .
_:b7 sp:varName "uri"^^xsd:string .
_:b78
sp:varName "wellCementJobFloatHoldingType"^^xsd:string .
_:b6 sp:varName "uri"^^xsd:string .
_:b79
sp:varName "wellCementJobPlugBumpingType"^^xsd:string .
_:b5 sp:varName "uri"^^xsd:string .
_:b80
sp:varName "wellCementJobTopPlugType"^^xsd:string .
_:b4 sp:varName "uri"^^xsd:string .
_:b81
sp:varName "wellCementJobType"^^xsd:string .
_:b3 sp:varName "uri"^^xsd:string .
_:b82
sp:varName "wellControlIncidentType"^^xsd:string .
_:b2 sp:varName "uri"^^xsd:string .
_:b83
sp:varName "wellKillingType"^^xsd:string .
_:b1 sp:varName "uri"^^xsd:string .
_:b84
sp:varName "wellTestType"^^xsd:string .
_:b13
sp:varName "uri"^^xsd:string .
_:b85
sp:varName "wirelineFormationTestGoodnessOfSealType"^^xsd:string .
_:b86
sp:varName "yieldPointScale"^^xsd:string .
......
......@@ -17,7 +17,9 @@
>
<h1>Summary report Wellbore: {= rhspin:npdName(?wb) }</h1>
<div>End time: {= ?activityEnd}</div>
<div>Period: {= fn:concat(ep-spin-lib:normalizeDateTime(?activityStart), ' - ', ep-spin-lib:normalizeDateTime(?activityEnd)) } </div>
<hr />
......@@ -30,7 +32,7 @@
<rhswp:NameValuePair arg:name="Status:" arg:value="{# SELECT ?repTypeName WHERE {?report a ?repType . ?repType a ep-report:DailyDrillingReportFinalisationType . ?repType rdfs:label ?repTypeName}}" />
<rhswp:NameValuePair arg:name="Operator:" arg:value="{# SELECT ?operatorName WHERE {?activity ep-activity:drillingOperator ?operator . ?operator ep-core:name ?operatorName }}" />
<rhswp:NameValuePair arg:name="Rig name:" arg:value="{= rhspin:npdName(?rig) }" />
<rhswp:NameValuePair arg:name="Spud date:" arg:value="{= IF(bound(?spudDate), spif:dateFormat(?spudDate, 'yyyy-MM-dd'), ?unbound) }" />
<rhswp:NameValuePair arg:name="Spud date:" arg:value="{= IF(bound(?spudDate), spif:dateFormat(?spudDate, 'yyyy-MMM-dd'), ?unbound) }" />
<rhswp:NameValuePair arg:name="Elevation RKB-MSL m:" arg:value="{# SELECT ?kellyElevMeas WHERE {?activity ep-activity:onRig ?rigState . ?rigState ep-core:hasPart ?kellyBushing . ?kellyBushing a ep-eqt:KellyBushing . ?kellyBushing ep-eqt:elevationOfKellyBushing ?kellyElev . ?kellyElev ep-core:metre ?kellyElevMeas}}" />
<rhswp:NameValuePair arg:name="Tight well:" arg:value="{# SELECT ?wbTightTypeLabel WHERE { ?statusActivityWb a ?wbTightType . ?wbTightType a ep-well:WellBoreTightnessType . ?wbTightType rdfs:label ?wbTightTypeLabel} }" />
<rhswp:NameValuePair arg:name="Pressure psig:" arg:value="{# SELECT ?buttHolePresVal WHERE {?statusActivityWb ep-well:averageBottomHolePressure ?buttHolePres . ?buttHolePres ep-core:psig ?buttHolePresVal}}" />
......@@ -45,14 +47,12 @@
</td>
<td class="ddrSummaryRight">
<rhswp:NameValuePair arg:name="Period:" arg:value="{= fn:concat(?activityStart, ' - ', ?activityEnd) }" />
<rhswp:NameValuePair arg:name="Wellbore Id:" arg:value="{= rhspin:npdId(?wb) }" />
<rhswp:NameValuePair arg:name="Created date:" arg:value="{= ?createdAt }" />
<rhswp:NameValuePair arg:name="Created time:" arg:value="{= ep-spin-lib:normalizeDateTime(?createdAt) }" />
<rhswp:NameValuePair arg:name="Drilling contractor:" arg:value="{# SELECT ?contractorName WHERE {?activity ep-activity:drillingContractor ?contractor . ?contractor ep-core:name ?contractorName}}" />
<rhswp:NameValuePair arg:name="NPD Rig Id:" arg:value="{= rhspin:npdId(?rig) }" />
<rhswp:NameValuePair arg:name="Date Well Complete:" arg:value="{= IF(bound(?completeDate), spif:dateFormat(?completeDate, 'yyyy-MM-dd'), ?unbound) }" />
<rhswp:NameValuePair arg:name="Date Well Complete:" arg:value="{= IF(bound(?completeDate), spif:dateFormat(?completeDate, 'yyyy-MMM-dd'), ?unbound) }" />
<rhswp:NameValuePair arg:name="Water depth MSL m:" arg:value="{# SELECT ?waterDepthVal WHERE {?activity ep-activity:onRig ?rigState . ?rigState a ep-fac:TemporalPartOfARig . ?rigState ep-core:hasPart ?water . ?water a ep-fac:SurroundingWater . ?water ep-fac:depthOfSurroundingWater ?waterDepth . ?waterDepth ep-core:metre ?waterDepthVal}}" />
<rhswp:NameValuePair arg:name="High pressure - High temperature:" arg:value="{# SELECT ?wbPTTypeLabel WHERE { ?statusActivityWb a ?wbPTType . ?wbPTType a ep-well:WellBoreHphtType . ?wbPTType rdfs:label ?wbPTTypeLabel} }" />
<rhswp:NameValuePair arg:name="Temperature degC:" arg:value="{# SELECT ?buttHoleTempVal WHERE {?statusActivityWb ep-well:averageBottomHoleTemperature ?buttHoleTemp . ?buttHoleTemp ep-core:celsius ?buttHoleTempVal}}" />
......