David Price

Added Marine Operations and Marine Ship Operations section and normalizeDatedComment function

......@@ -205,6 +205,86 @@ ep-mpr-spin-lib:buildWellTestTypeURI
])
] .
ep-mpr-spin-lib:normalizeDatedComment
rdf:type spin:Function ;
rdfs:subClassOf ep-mpr-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables ([ sp:varName "normalizedDatedComment"^^xsd:string
]) ;
sp:where ([ sp:object spin:_arg1 ;
sp:predicate <http://www.reportinghub.no/ep/schema/production-activity#commentUpon> ;
sp:subject
[ sp:varName "comment"^^xsd:string
]
] [ sp:object
[ sp:varName "commentText"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/production-activity#commentMade> ;
sp:subject
[ sp:varName "comment"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "startedAt"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject spin:_arg1
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "finishedAt"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject spin:_arg1
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:bound ;
sp:arg1 [ sp:varName "startedAt"^^xsd:string
]
] ;
sp:arg2 [ sp:varName "startedAt"^^xsd:string
] ;
sp:arg3 "No Start"
] ;
sp:variable
[ sp:varName "started"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:bound ;
sp:arg1 [ sp:varName "finishedAt"^^xsd:string
]
] ;
sp:arg2 [ sp:varName "finishedAt"^^xsd:string
] ;
sp:arg3 "No Finish"
] ;
sp:variable
[ sp:varName "finished"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 [ sp:varName "commentText"^^xsd:string
] ;
sp:arg2 " (" ;
sp:arg3 [ sp:varName "started"^^xsd:string
] ;
sp:arg4 " TO " ;
sp:arg5 [ sp:varName "finished"^^xsd:string
] ;
sp:arg6 " )"
] ;
sp:variable
[ sp:varName "normalizedDatedComment"^^xsd:string
]
])
] .
ep-mpr-spin-lib:selectAverageAmountOfMaterialFlag
rdf:type spin:Function ;
rdfs:label "select AverageAmountOfMaterialFlag"^^xsd:string ;
......
......@@ -61,6 +61,13 @@ WHERE {
<dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:ProductionOperationActivity" />
<dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:ProductionOperationCargoShip" />
<dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:ProductionOperationMarine" />
<dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:ProductionOperationMarineShip" />
<dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:ProductionVolumes" />
<dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:ProductFlows" />
......