David Leal

Added flow destination and related stuff

# Saved by TopBraid on Mon Oct 10 17:05:37 BST 2011
# Saved by TopBraid on Tue Oct 11 16:41:16 BST 2011
# baseURI: http://www.reportinghub.no/ep/transform/1.0/dpr/productVolume
# imports: http://www.reportinghub.no/ep/spin/1.1/lib
# imports: http://www.reportinghub.no/ep/dpr/spin/1.1/lib
......@@ -9,11 +9,13 @@
@prefix : <http://www.reportinghub.no/ep/transform/1.0/dpr/productVolume#> .
@prefix afn: <http://jena.hpl.hp.com/ARQ/function#> .
@prefix arg: <http://spinrdf.org/arg#> .
@prefix ep-dpr-spin-lib: <http://www.reportinghub.no/ep/dpr/spin/1.1/lib#> .
@prefix ep-spin-lib: <http://www.reportinghub.no/ep/spin/lib#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rhspin: <http://www.reportinghub.no/spin/rh#> .
@prefix smf: <http://topbraid.org/sparqlmotionfunctions#> .
@prefix sp: <http://spinrdf.org/sp#> .
@prefix spin: <http://spinrdf.org/spin#> .
......@@ -28,118 +30,205 @@
<http://www.witsml.org/schemas/131/addendum/combo#Co_productVolume>
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20105 record the temporal parts of product flows"^^xsd:string ;
sp:templates ([ sp:object _:b1 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:subject _:b2
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#TemporalPartOfAFlow> ;
rdfs:comment """STEP 20101a Record the Temporal part of the flows for the day
"""^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/flow#TemporalPartOfAFlow> ;
sp:predicate rdf:type ;
sp:subject _:b1
] [ sp:object _:b3 ;
sp:predicate rdf:type ;
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b1
]) ;
sp:where ([ sp:object _:b2 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#name> ;
sp:subject spin:_this
] [ sp:object _:b3 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dTimStart> ;
sp:subject spin:_this
] [ sp:object _:b4 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b1
] [ sp:object _:b5 ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject _:b1
] [ sp:object _:b6 ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject _:b1
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dTimStart> ;
sp:subject spin:_this
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 _:b2
] ;
sp:variable _:b5
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionFlowsForAPeriodURI ;
sp:arg1 _:b5 ;
sp:arg2 _:b3 ;
sp:arg3 _:b4
] ;
sp:variable _:b1
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 20101l Set the facility operator- installation or context facility do not exist
role is ignored"""^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b6
] [ sp:object _:b7 ;
sp:predicate _:b8 ;
sp:subject _:b1
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b6
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b7
] [ sp:object _:b8 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:subject _:b6
] [ sp:object _:b9 ;
sp:predicate _:b10 ;
sp:predicate <http://www.reportinghub.no/ep/schema/facility#facilityOperator> ;
sp:subject _:b7
]) ;
sp:where ([ sp:object _:b10 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#operatorRef> ;
sp:subject spin:_this
] [ sp:object _:b11 ;
sp:predicate _:b8 ;
sp:subject _:b1
] [ sp:object _:b12 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#name> ;
sp:subject _:b10
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b8
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b12
] [ sp:object _:b8 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:subject _:b12
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 _:b11
] ;
sp:variable _:b13
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type rhspin:companyById ;
arg:id _:b13
] ;
sp:variable _:b9
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20105 record the temporal parts of product flows"^^xsd:string ;
sp:templates ([ sp:object _:b14 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:subject _:b15
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#TemporalPartOfAFlow> ;
sp:predicate rdf:type ;
sp:subject _:b14
] [ sp:object _:b16 ;
sp:predicate rdf:type ;
sp:subject _:b11
] [ sp:object _:b13 ;
sp:predicate _:b14 ;
sp:subject _:b11
sp:subject _:b14
] [ sp:object _:b17 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b14
] [ sp:object _:b18 ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject _:b14
] [ sp:object _:b19 ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject _:b14
] [ sp:object _:b20 ;
sp:predicate _:b21 ;
sp:subject _:b14
] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ;
sp:predicate rdf:type ;
sp:subject _:b20
] [ sp:object _:b22 ;
sp:predicate _:b23 ;
sp:subject _:b20
] [ sp:object _:b24 ;
sp:predicate _:b21 ;
sp:subject _:b14
] [ sp:object _:b25 ;
sp:predicate rdf:type ;
sp:subject _:b24
] [ sp:object _:b26 ;
sp:predicate _:b27 ;
sp:subject _:b24
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b2
] [ sp:object _:b15 ;
sp:subject _:b15
] [ sp:object _:b28 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#standardTempPresRef> ;
sp:subject spin:_this
] [ sp:object _:b16 ;
] [ sp:object _:b29 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#facilityRef> ;
sp:subject spin:_this
] [ sp:object _:b17 ;
] [ sp:object _:b30 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#nameRef> ;
sp:subject _:b16
] [ sp:object _:b18 ;
sp:subject _:b29
] [ sp:object _:b31 ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject _:b17
] [ sp:object _:b19 ;
sp:subject _:b30
] [ sp:object _:b32 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#flowRef> ;
sp:subject _:b16
] [ sp:object _:b20 ;
sp:subject _:b29
] [ sp:object _:b33 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#name> ;
sp:subject _:b19
] [ sp:object _:b21 ;
sp:subject _:b32
] [ sp:object _:b34 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#productRef> ;
sp:subject _:b19
] [ sp:object _:b22 ;
sp:subject _:b32
] [ sp:object _:b35 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kindRef> ;
sp:subject _:b21
] [ sp:object _:b23 ;
sp:subject _:b34
] [ sp:object _:b36 ;
sp:predicate rdfs:label ;
sp:subject _:b24
] [ sp:object _:b25 ;
sp:subject _:b37
] [ sp:object _:b38 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#periodRef> ;
sp:subject _:b21
] [ sp:object _:b26 ;
sp:subject _:b34
] [ sp:object _:b39 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kindRef> ;
sp:subject _:b25
] [ sp:object _:b5 ;
sp:subject _:b38
] [ sp:object _:b18 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dTimStart> ;
sp:subject _:b25
] [ sp:object _:b6 ;
sp:subject _:b38
] [ sp:object _:b19 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dTimEnd> ;
sp:subject _:b25
sp:subject _:b38
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b27 ;
sp:elements ([ sp:object _:b40 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#volumeRef> ;
sp:subject _:b25
] [ sp:object _:b9 ;
sp:subject _:b38
] [ sp:object _:b22 ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject _:b27
] [ sp:object _:b28 ;
sp:subject _:b40
] [ sp:object _:b41 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#uomRef> ;
sp:subject _:b27
sp:subject _:b40
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b29 ;
sp:elements ([ sp:object _:b42 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#volumeStdRef> ;
sp:subject _:b25
] [ sp:object _:b13 ;
sp:subject _:b38
] [ sp:object _:b26 ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject _:b29
] [ sp:object _:b30 ;
sp:subject _:b42
] [ sp:object _:b43 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#uomRef> ;
sp:subject _:b29
sp:subject _:b42
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 _:b18
sp:arg1 _:b31
] ;
sp:variable _:b31
sp:variable _:b44
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionFacilityURI ;
sp:arg1 _:b31
sp:arg1 _:b44
] ;
sp:variable
[ sp:varName "productionFacility"^^xsd:string
......@@ -147,13 +236,13 @@
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 _:b20
sp:arg1 _:b33
] ;
sp:variable _:b32
sp:variable _:b45
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionFlowURI ;
sp:arg1 _:b32
sp:arg1 _:b45
] ;
sp:variable
[ sp:varName "productionFlow"^^xsd:string
......@@ -161,113 +250,168 @@
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:selectProductType ;
sp:arg1 _:b22
sp:arg1 _:b35
] ;
sp:variable _:b24
sp:variable _:b37
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 _:b23
sp:arg1 _:b36
] ;
sp:variable _:b33
sp:variable _:b46
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductFlowURI ;
sp:arg1 _:b32 ;
sp:arg2 _:b33
sp:arg1 _:b45 ;
sp:arg2 _:b46
] ;
sp:variable _:b4
sp:variable _:b17
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:selectRelationshipToMeasure ;
sp:arg1 _:b26
sp:arg1 _:b39
] ;
sp:variable _:b8
sp:variable _:b21
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:selectTemporalPartOfAFlowDurationType ;
sp:arg1 _:b26
sp:arg1 _:b39
] ;
sp:variable _:b3
sp:variable _:b16
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:selectVolumeAtStandardTemperaturePressureType ;
sp:arg1 _:b15
sp:arg1 _:b28
] ;
sp:variable _:b12
sp:variable _:b25
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:selectVolumeScale ;
sp:arg1 _:b28
sp:arg1 _:b41
] ;
sp:variable _:b10
sp:variable _:b23
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:selectVolumeScale ;
sp:arg1 _:b30
sp:arg1 _:b43
] ;
sp:variable _:b27
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 20102 Record the Facility that has the flows
Nothing is done with the namingSystem!"""^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b47
] [ sp:object _:b48 ;
sp:predicate rdf:type ;
sp:subject _:b47
] [ sp:object _:b49 ;
sp:predicate rdfs:label ;
sp:subject _:b47
]) ;
sp:where ([ sp:object _:b50 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#facilityRef> ;
sp:subject spin:_this
] [ sp:object _:b51 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#nameRef> ;
sp:subject _:b50
] [ sp:object _:b49 ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject _:b51
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "facilityNamingSystem"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#namingSystem> ;
sp:subject _:b51
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b52 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kindRef> ;
sp:subject _:b51
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 _:b49
] ;
sp:variable _:b53
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionFacilityURI ;
sp:arg1 _:b53
] ;
sp:variable _:b47
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:selectProductionFacilityType ;
sp:arg1 _:b52
] ;
sp:variable _:b14
sp:variable _:b48
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 20104 record the product flows
namingSystem not processed"""^^xsd:string ;
sp:templates ([ sp:object _:b34 ;
sp:templates ([ sp:object _:b54 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:subject _:b35
sp:subject _:b55
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#FlowOfMaterial> ;
sp:predicate rdf:type ;
sp:subject _:b34
] [ sp:object _:b36 ;
sp:subject _:b54
] [ sp:object _:b56 ;
sp:predicate rdf:type ;
sp:subject _:b34
] [ sp:object _:b37 ;
sp:subject _:b54
] [ sp:object _:b57 ;
sp:predicate rdfs:label ;
sp:subject _:b34
sp:subject _:b54
]) ;
sp:where ([ sp:object _:b38 ;
sp:where ([ sp:object _:b58 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#facilityRef> ;
sp:subject spin:_this
] [ sp:object _:b39 ;
] [ sp:object _:b59 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#nameRef> ;
sp:subject _:b38
] [ sp:object _:b40 ;
sp:subject _:b58
] [ sp:object _:b60 ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject _:b39
] [ sp:object _:b41 ;
sp:subject _:b59
] [ sp:object _:b61 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#flowRef> ;
sp:subject _:b38
] [ sp:object _:b42 ;
sp:subject _:b58
] [ sp:object _:b62 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#name> ;
sp:subject _:b41
] [ sp:object _:b43 ;
sp:subject _:b61
] [ sp:object _:b63 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#productRef> ;
sp:subject _:b41
] [ sp:object _:b44 ;
sp:subject _:b61
] [ sp:object _:b64 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kindRef> ;
sp:subject _:b43
] [ sp:object _:b45 ;
sp:subject _:b63
] [ sp:object _:b65 ;
sp:predicate rdfs:label ;
sp:subject _:b36
sp:subject _:b56
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b46 ;
sp:elements ([ sp:object _:b66 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#nameRef> ;
sp:subject _:b43
] [ sp:object _:b37 ;
sp:subject _:b63
] [ sp:object _:b57 ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject _:b46
sp:subject _:b66
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 _:b40
sp:arg1 _:b60
] ;
sp:variable _:b47
sp:variable _:b67
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionFacilityURI ;
sp:arg1 _:b47
sp:arg1 _:b67
] ;
sp:variable
[ sp:varName "productionFacility"^^xsd:string
......@@ -275,215 +419,505 @@ namingSystem not processed"""^^xsd:string ;
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 _:b42
sp:arg1 _:b62
] ;
sp:variable _:b48
sp:variable _:b68
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionFlowURI ;
sp:arg1 _:b48
sp:arg1 _:b68
] ;
sp:variable _:b35
sp:variable _:b55
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:selectProductType ;
sp:arg1 _:b44
sp:arg1 _:b64
] ;
sp:variable _:b36
sp:variable _:b56
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 _:b45
sp:arg1 _:b65
] ;
sp:variable _:b49
sp:variable _:b69
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductFlowURI ;
sp:arg1 _:b48 ;
sp:arg2 _:b49
sp:arg1 _:b68 ;
sp:arg2 _:b69
] ;
sp:variable _:b34
sp:variable _:b54
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 20103 record the flows
nothing is done with flowDirection"""^^xsd:string ;
sp:templates ([ sp:object _:b50 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:subject _:b51
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ;
rdfs:comment "STEP 20101e Set the context facility - installation exists"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b50
] [ sp:object _:b52 ;
sp:subject _:b70
] [ sp:object _:b71 ;
sp:predicate rdf:type ;
sp:subject _:b50
] [ sp:object _:b53 ;
sp:subject _:b70
] [ sp:object
[ sp:varName "productionInstallation"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:subject _:b70
]) ;
sp:where ([ sp:object _:b72 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#contextFacilityRef> ;
sp:subject spin:_this
] [ sp:object _:b73 ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject _:b72
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b74 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kindRef> ;
sp:subject _:b72
])
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b75
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b50
] [ sp:object _:b54 ;
sp:predicate rdfs:label ;
sp:subject _:b50
sp:subject _:b76
] [ sp:object _:b75 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:subject _:b76
] [ sp:object
[ sp:varName "productionInstallaton"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b76
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 _:b73
] ;
sp:variable _:b77
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionFacilityURI ;
sp:arg1 _:b77
] ;
sp:variable _:b70
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:selectProductionFacilityType ;
sp:arg1 _:b74
] ;
sp:variable _:b71
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20103b record the related facility - only its kind is specified"^^xsd:string ;
sp:templates ([ sp:object _:b78 ;
sp:predicate _:b79 ;
sp:subject _:b80
] [ sp:object _:b81 ;
sp:predicate rdf:type ;
sp:subject _:b80
]) ;
sp:where ([ sp:object _:b55 ;
sp:where ([ sp:object _:b82 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#facilityRef> ;
sp:subject spin:_this
] [ sp:object _:b56 ;
] [ sp:object _:b83 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#nameRef> ;
sp:subject _:b55
] [ sp:object _:b57 ;
sp:subject _:b82
] [ sp:object _:b84 ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject _:b56
] [ sp:object _:b58 ;
sp:subject _:b83
] [ sp:object _:b85 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#flowRef> ;
sp:subject _:b55
] [ sp:object _:b54 ;
sp:subject _:b82
] [ sp:object _:b86 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#name> ;
sp:subject _:b58
] [ sp:object _:b59 ;
sp:subject _:b85
] [ sp:object _:b87 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#directionRef> ;
sp:subject _:b85
] [ sp:object _:b88 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#relatedFacilityRef> ;
sp:subject _:b85
] [ sp:object _:b89 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kindRef> ;
sp:subject _:b58
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "flowDirection"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#directionRef> ;
sp:subject _:b58
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "flowQualifier"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#qualifierRef> ;
sp:subject _:b58
])
sp:subject _:b88
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 _:b57
sp:arg1 _:b84
] ;
sp:variable _:b60
sp:variable _:b90
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionFacilityURI ;
sp:arg1 _:b60
sp:arg1 _:b90
] ;
sp:variable _:b51
sp:variable
[ sp:varName "productionFacility"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 _:b54
sp:arg1 _:b86
] ;
sp:variable _:b61
sp:variable _:b91
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionFlowURI ;
sp:arg1 _:b61
sp:arg1 _:b91
] ;
sp:variable _:b50
sp:variable _:b78
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:selectProductionFlowPurposeType ;
sp:arg1 _:b59
[ rdf:type ep-dpr-spin-lib:selectProductionFacilityType ;
sp:arg1 _:b89
] ;
sp:variable _:b52
sp:variable _:b81
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:selectProductionFlowDefinitionType ;
sp:arg1 _:b59
[ rdf:type ep-dpr-spin-lib:selectProductionFlowDirectionInverseRelationshipType ;
sp:arg1 _:b87
] ;
sp:variable _:b53
sp:variable _:b79
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 20101a Record the Temporal part of the flows for the day
"""^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/flow#TemporalPartOfAFlow> ;
rdfs:comment "STEP 20101h Set the geographic context - installation or context facility do not exist"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b62
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b62
sp:subject _:b92
] [ sp:object _:b93 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b92
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b93
] [ sp:object _:b94 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:subject _:b92
] [ sp:object _:b95 ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject _:b93
] [ sp:object <http://www.reportinghub.no/ep/schema/geography#Country> ;
sp:predicate rdf:type ;
sp:subject _:b95
] [ sp:object _:b96 ;
sp:predicate rdfs:label ;
sp:subject _:b95
] [ sp:object _:b97 ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject _:b93
] [ sp:object <http://www.reportinghub.no/ep/schema/geography#State> ;
sp:predicate rdf:type ;
sp:subject _:b97
] [ sp:object _:b98 ;
sp:predicate rdfs:label ;
sp:subject
[]
] [ sp:object _:b99 ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject _:b93
]) ;
sp:where ([ sp:object _:b63 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#name> ;
sp:subject spin:_this
] [ sp:object _:b64 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dTimStart> ;
sp:where ([ sp:object _:b100 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#geographicContextRef> ;
sp:subject spin:_this
] [ sp:object _:b65 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dTimStart> ;
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b96 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#country> ;
sp:subject _:b100
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b98 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#state> ;
sp:subject _:b100
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b101 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#fieldRef> ;
sp:subject _:b100
] [ sp:object _:b102 ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject _:b101
])
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b94
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b103
] [ sp:object _:b94 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:subject _:b103
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 _:b102
] ;
sp:variable _:b104
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionFacilityURI ;
sp:arg1 _:b104
] ;
sp:variable _:b99
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20101d Set the installation"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b105
] [ sp:object
[ sp:varName "productionInstallaton"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b105
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b106
] [ sp:object _:b107 ;
sp:predicate rdf:type ;
sp:subject _:b106
] [ sp:object _:b108 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:subject _:b105
]) ;
sp:where ([ sp:object _:b109 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#installationRef> ;
sp:subject spin:_this
] [ sp:object _:b110 ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject _:b109
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b111 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kindRef> ;
sp:subject _:b109
])
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b108
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 _:b63
sp:arg1 _:b110
] ;
sp:variable _:b66
sp:variable _:b112
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionFlowsForAPeriodURI ;
sp:arg1 _:b66 ;
sp:arg2 _:b64 ;
sp:arg3 _:b65
[ rdf:type ep-dpr-spin-lib:buildProductionFacilityURI ;
sp:arg1 _:b112
] ;
sp:variable _:b62
sp:variable _:b106
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:selectProductionFacilityType ;
sp:arg1 _:b111
] ;
sp:variable _:b107
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 20102 Record the Facility that has the flows
Nothing is done with the namingSystem!"""^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
rdfs:comment "STEP 20101f Set the context facility - installation does not exist"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b113
] [ sp:object _:b114 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b113
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b114
] [ sp:object _:b115 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:subject _:b113
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b67
] [ sp:object _:b68 ;
sp:subject _:b116
] [ sp:object _:b117 ;
sp:predicate rdf:type ;
sp:subject _:b67
] [ sp:object _:b69 ;
sp:subject _:b116
] [ sp:object _:b114 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:subject _:b116
]) ;
sp:where ([ sp:object _:b118 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#contextFacilityRef> ;
sp:subject spin:_this
] [ sp:object _:b119 ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject _:b118
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b120 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kindRef> ;
sp:subject _:b118
])
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b115
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b121
] [ sp:object _:b115 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:subject _:b121
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 _:b119
] ;
sp:variable _:b122
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionFacilityURI ;
sp:arg1 _:b122
] ;
sp:variable _:b116
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:selectProductionFacilityType ;
sp:arg1 _:b120
] ;
sp:variable _:b117
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 20101k Set the facility operator- installation or context facility exist
role is ignored"""^^xsd:string ;
sp:templates ([ sp:object _:b123 ;
sp:predicate <http://www.reportinghub.no/ep/schema/facility#facilityOperator> ;
sp:subject _:b124
]) ;
sp:where ([ sp:object _:b125 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#operatorRef> ;
sp:subject spin:_this
] [ sp:object _:b126 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#name> ;
sp:subject _:b125
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b127
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b128
] [ sp:object _:b127 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:subject _:b128
] [ sp:object _:b124 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b128
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 _:b126
] ;
sp:variable _:b129
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type rhspin:companyById ;
arg:id _:b129
] ;
sp:variable _:b123
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20103a record the flows"^^xsd:string ;
sp:templates ([ sp:object _:b130 ;
sp:predicate _:b131 ;
sp:subject _:b132
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ;
sp:predicate rdf:type ;
sp:subject _:b130
] [ sp:object _:b133 ;
sp:predicate rdf:type ;
sp:subject _:b130
] [ sp:object _:b134 ;
sp:predicate rdf:type ;
sp:subject _:b130
] [ sp:object _:b135 ;
sp:predicate rdfs:label ;
sp:subject _:b67
sp:subject _:b130
]) ;
sp:where ([ sp:object _:b70 ;
sp:where ([ sp:object _:b136 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#facilityRef> ;
sp:subject spin:_this
] [ sp:object _:b71 ;
] [ sp:object _:b137 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#nameRef> ;
sp:subject _:b70
] [ sp:object _:b69 ;
sp:subject _:b136
] [ sp:object _:b138 ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject _:b71
sp:subject _:b137
] [ sp:object _:b139 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#flowRef> ;
sp:subject _:b136
] [ sp:object _:b135 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#name> ;
sp:subject _:b139
] [ sp:object _:b140 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kindRef> ;
sp:subject _:b139
] [ sp:object _:b141 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#directionRef> ;
sp:subject _:b139
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "facilityNamingSystem"^^xsd:string
[ sp:varName "flowQualifier"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#namingSystem> ;
sp:subject _:b71
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b72 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kindRef> ;
sp:subject _:b71
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#qualifierRef> ;
sp:subject _:b139
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 _:b69
sp:arg1 _:b138
] ;
sp:variable _:b73
sp:variable _:b142
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionFacilityURI ;
sp:arg1 _:b73
sp:arg1 _:b142
] ;
sp:variable _:b67
sp:variable _:b132
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:selectProductionFacilityType ;
sp:arg1 _:b72
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 _:b135
] ;
sp:variable _:b68
sp:variable _:b143
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionFlowURI ;
sp:arg1 _:b143
] ;
sp:variable _:b130
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:selectProductionFlowPurposeType ;
sp:arg1 _:b140
] ;
sp:variable _:b133
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:selectProductionFlowDefinitionType ;
sp:arg1 _:b140
] ;
sp:variable _:b134
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:selectProductionFlowDirectionRelationshipType ;
sp:arg1 _:b141
] ;
sp:variable _:b131
])
] ;
spin:rule
......@@ -491,282 +925,753 @@ Nothing is done with the namingSystem!"""^^xsd:string ;
rdfs:comment "STEP 20101b Record the Temporal part of the flows for the day"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/flow#TemporalPartOfAFlow> ;
sp:predicate rdf:type ;
sp:subject _:b74
sp:subject _:b144
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b74
sp:subject _:b144
]) ;
sp:where ([ sp:object _:b75 ;
sp:where ([ sp:object _:b145 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#name> ;
sp:subject spin:_this
] [ sp:object _:b76 ;
] [ sp:object _:b146 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dateStart> ;
sp:subject spin:_this
] [ sp:object _:b77 ;
] [ sp:object _:b147 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dateStart> ;
sp:subject spin:_this
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 _:b75
sp:arg1 _:b145
] ;
sp:variable _:b78
sp:variable _:b148
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionFlowsForAPeriodURI ;
sp:arg1 _:b78 ;
sp:arg2 _:b76 ;
sp:arg3 _:b77
sp:arg1 _:b148 ;
sp:arg2 _:b146 ;
sp:arg3 _:b147
] ;
sp:variable _:b74
sp:variable _:b144
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 20101c Set the type of temporal part
kind and periodKind are not yet processed"""^^xsd:string ;
kind is not yet processed"""^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/flow#TemporalPartOfAFlow> ;
sp:predicate rdf:type ;
sp:subject _:b79
sp:subject _:b149
] [ sp:object _:b150 ;
sp:predicate rdf:type ;
sp:subject _:b149
]) ;
sp:where ([ sp:object
[ sp:varName "kind"^^xsd:string
sp:where ([ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "kind"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kind> ;
sp:subject spin:_this
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b151 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#periodKindRef> ;
sp:subject spin:_this
])
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b149
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:selectTemporalPartOfAFlowDurationType ;
sp:arg1 _:b151
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kind> ;
sp:variable _:b150
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20101i Set the geographic context - offshore location - not done yet"^^xsd:string ;
sp:templates () ;
sp:where ([ sp:object _:b152 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#geographicContextRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "periodKindRef"^^xsd:string
[ sp:varName "offshoreLocationRef"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#periodKindRef> ;
sp:subject spin:_this
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#offshoreLocationRef> ;
sp:subject _:b152
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b153
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b154
] [ sp:object _:b153 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:subject _:b154
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
[ sp:varName "productionInstallaton"^^xsd:string
] ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dateStart> ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b154
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 20101g Set the geographic context - installation or context facility exist"^^xsd:string ;
sp:templates ([ sp:object _:b155 ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject _:b156
] [ sp:object <http://www.reportinghub.no/ep/schema/geography#Country> ;
sp:predicate rdf:type ;
sp:subject _:b155
] [ sp:object _:b157 ;
sp:predicate rdfs:label ;
sp:subject _:b155
] [ sp:object _:b158 ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject _:b156
] [ sp:object <http://www.reportinghub.no/ep/schema/geography#State> ;
sp:predicate rdf:type ;
sp:subject _:b158
] [ sp:object _:b159 ;
sp:predicate rdfs:label ;
sp:subject _:b158
] [ sp:object _:b160 ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject _:b156
]) ;
sp:where ([ sp:object _:b161 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#geographicContextRef> ;
sp:subject spin:_this
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b157 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#country> ;
sp:subject _:b161
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b159 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#state> ;
sp:subject _:b161
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b162 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#fieldRef> ;
sp:subject _:b161
] [ sp:object _:b163 ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject _:b162
])
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b79
sp:subject _:b164
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b165
] [ sp:object _:b164 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
sp:subject _:b165
] [ sp:object _:b156 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b165
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 _:b163
] ;
sp:variable _:b166
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionFacilityURI ;
sp:arg1 _:b166
] ;
sp:variable _:b160
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 20103b record the related facility
nothing is done with the facilityParent1 or facilityParent2 of the related facility"""^^xsd:string ;
sp:templates ([ sp:object _:b167 ;
sp:predicate _:b168 ;
sp:subject _:b169
] [ sp:object _:b170 ;
sp:predicate rdf:type ;
sp:subject _:b169
]) ;
sp:where ([ sp:object _:b171 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#facilityRef> ;
sp:subject spin:_this
] [ sp:object _:b172 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#nameRef> ;
sp:subject _:b171
] [ sp:object _:b173 ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject _:b172
] [ sp:object _:b174 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#flowRef> ;
sp:subject _:b171
] [ sp:object _:b175 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#name> ;
sp:subject _:b174
] [ sp:object _:b176 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#directionRef> ;
sp:subject _:b174
] [ sp:object _:b177 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#relatedFacilityRef> ;
sp:subject _:b174
] [ sp:object _:b178 ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject _:b177
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object _:b179 ;
sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kindRef> ;
sp:subject _:b177
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 _:b173
] ;
sp:variable _:b180
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionFacilityURI ;
sp:arg1 _:b180
] ;
sp:variable
[ sp:varName "productionFacility"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 _:b175
] ;
sp:variable _:b181
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionFlowURI ;
sp:arg1 _:b181
] ;
sp:variable _:b167
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 _:b178
] ;
sp:variable _:b182
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionFacilityURI ;
sp:arg1 _:b182
] ;
sp:variable _:b169
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:selectProductionFacilityType ;
sp:arg1 _:b179
] ;
sp:variable _:b170
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:selectProductionFlowDirectionInverseRelationshipType ;
sp:arg1 _:b176
] ;
sp:variable _:b168
])
] .
_:b53
sp:varName "productionFlowDefinitionType"^^xsd:string .
_:b148
sp:varName "normalizedProductionFlowsName"^^xsd:string .
_:b115
sp:varName "productionFlowsForAPeriod"^^xsd:string .
_:b116
sp:varName "productionContextFacility"^^xsd:string .
_:b117
sp:varName "productionContextFacilityType"^^xsd:string .
_:b118
sp:varName "contextFacilityRef"^^xsd:string .
_:b119
sp:varName "contextFacilityName"^^xsd:string .
_:b120
sp:varName "contextFacilityKind"^^xsd:string .
_:b121
sp:varName "temporalPartOfAProductionFacility"^^xsd:string .
_:b122
sp:varName "normalizedContextFacilityName"^^xsd:string .
_:b149
sp:varName "productionFlowsForAPeriod"^^xsd:string .
_:b150
sp:varName "temporalPartOfAFlowDurationType"^^xsd:string .
_:b151
sp:varName "periodKindRef"^^xsd:string .
_:b54
sp:varName "productFlow"^^xsd:string .
_:b55
sp:varName "productionFlow"^^xsd:string .
_:b56
sp:varName "productType"^^xsd:string .
_:b57
sp:varName "productFlowName"^^xsd:string .
_:b58
sp:varName "facilityRef"^^xsd:string .
_:b59
sp:varName "facilityNameRef"^^xsd:string .
_:b60
sp:varName "facilityName"^^xsd:string .
_:b61
sp:varName "flowRef"^^xsd:string .
_:b62
sp:varName "flowName"^^xsd:string .
_:b100
sp:varName "geographicContextRef"^^xsd:string .
_:b96
sp:varName "countryName"^^xsd:string .
_:b98
sp:varName "stateName"^^xsd:string .
_:b101
sp:varName "fieldRef"^^xsd:string .
_:b102
sp:varName "fieldName"^^xsd:string .
_:b63
sp:varName "productRef"^^xsd:string .
_:b94
sp:varName "productionFlowsForAPeriod"^^xsd:string .
_:b103
sp:varName "temporalPartOfAProductionFacility"^^xsd:string .
_:b104
sp:varName "normalizedFieldName"^^xsd:string .
_:b99
sp:varName "field"^^xsd:string .
_:b64
sp:varName "productKind"^^xsd:string .
_:b65
sp:varName "productTypeName"^^xsd:string .
_:b66
sp:varName "productNameRef"^^xsd:string .
_:b152
sp:varName "geographicContextRef"^^xsd:string .
_:b153
sp:varName "productionFlowsForAPeriod"^^xsd:string .
_:b154
sp:varName "temporalPartOfAProductionFacility"^^xsd:string .
_:b67
sp:varName "normalizedFacilityName"^^xsd:string .
_:b68
sp:varName "normalizedFlowName"^^xsd:string .
_:b69
sp:varName "normalizedProductTypeName"^^xsd:string .
_:b15
sp:varName "productionFlowsForAPeriod"^^xsd:string .
_:b16
sp:varName "temporalPartOfAFlowDurationType"^^xsd:string .
_:b17
sp:varName "productFlow"^^xsd:string .
_:b18
sp:varName "startTime"^^xsd:string .
_:b19
sp:varName "endTime"^^xsd:string .
_:b21
sp:varName "relationshipToMeasure"^^xsd:string .
_:b52
sp:varName "productionFlowPurposeType"^^xsd:string .
_:b22
sp:varName "realVolume"^^xsd:string .
_:b50
sp:varName "productionFlow"^^xsd:string .
_:b23
sp:varName "volumeScale"^^xsd:string .
_:b61
sp:varName "normalizedFlowName"^^xsd:string .
_:b25
sp:varName "volumeStdType"^^xsd:string .
_:b51
sp:varName "productionFacility"^^xsd:string .
_:b26
sp:varName "realVolumeStd"^^xsd:string .
_:b60
sp:varName "normalizedFacilityName"^^xsd:string .
_:b27
sp:varName "volumeStdScale"^^xsd:string .
_:b59
sp:varName "flowKind"^^xsd:string .
_:b28
sp:varName "standardTempPres"^^xsd:string .
_:b54
sp:varName "flowName"^^xsd:string .
_:b29
sp:varName "facilityRef"^^xsd:string .
_:b58
sp:varName "flowRef"^^xsd:string .
_:b30
sp:varName "facilityNameRef"^^xsd:string .
_:b57
_:b31
sp:varName "facilityName"^^xsd:string .
_:b56
sp:varName "facilityNameRef"^^xsd:string .
_:b32
sp:varName "flowRef"^^xsd:string .
_:b55
sp:varName "facilityRef"^^xsd:string .
_:b33
sp:varName "flowName"^^xsd:string .
_:b62
sp:varName "productionFlowsForAPeriod"^^xsd:string .
_:b34
sp:varName "productRef"^^xsd:string .
_:b66
sp:varName "normalizedProductionFlowsName"^^xsd:string .
_:b35
sp:varName "productKind"^^xsd:string .
_:b65
sp:varName "dTimEnd"^^xsd:string .
_:b36
sp:varName "productTypeName"^^xsd:string .
_:b64
sp:varName "dTimStart"^^xsd:string .
_:b37
sp:varName "productType"^^xsd:string .
_:b63
sp:varName "productionFlowsName"^^xsd:string .
_:b38
sp:varName "periodRef"^^xsd:string .
_:b79
_:b39
sp:varName "periodKindRef"^^xsd:string .
_:b40
sp:varName "volumeRef"^^xsd:string .
_:b41
sp:varName "uomVolume"^^xsd:string .
_:b42
sp:varName "volumeStdRef"^^xsd:string .
_:b43
sp:varName "uomVolumeStd"^^xsd:string .
_:b44
sp:varName "normalizedFacilityName"^^xsd:string .
_:b45
sp:varName "normalizedFlowName"^^xsd:string .
_:b46
sp:varName "normalizedProductTypeName"^^xsd:string .
_:b125
sp:varName "operatorRef"^^xsd:string .
_:b126
sp:varName "operatorName"^^xsd:string .
_:b127
sp:varName "productionFlowsForAPeriod"^^xsd:string .
_:b78
sp:varName "normalizedProductionFlowsName"^^xsd:string .
_:b128
sp:varName "temporalPartOfAProductionFacility"^^xsd:string .
_:b77
sp:varName "dateEnd"^^xsd:string .
_:b124
sp:varName "productionInstallation"^^xsd:string .
_:b76
sp:varName "dateStart"^^xsd:string .
_:b129
sp:varName "normalizedOperatorName"^^xsd:string .
_:b75
sp:varName "productionFlowsName"^^xsd:string .
_:b123
sp:varName "operator"^^xsd:string .
_:b74
_:b161
sp:varName "geographicContextRef"^^xsd:string .
_:b157
sp:varName "countryName"^^xsd:string .
_:b159
sp:varName "stateName"^^xsd:string .
_:b162
sp:varName "fieldRef"^^xsd:string .
_:b163
sp:varName "fieldName"^^xsd:string .
_:b164
sp:varName "productionFlowsForAPeriod"^^xsd:string .
_:b73
sp:varName "normalizedFacilityName"^^xsd:string .
_:b165
sp:varName "temporalPartOfAProductionFacility"^^xsd:string .
_:b72
sp:varName "facilityKind"^^xsd:string .
_:b156
sp:varName "productionInstallation"^^xsd:string .
_:b71
sp:varName "facilityNameRef"^^xsd:string .
_:b166
sp:varName "normalizedFieldName"^^xsd:string .
_:b70
sp:varName "facilityRef"^^xsd:string .
_:b160
sp:varName "field"^^xsd:string .
_:b69
sp:varName "facilityName"^^xsd:string .
_:b10
sp:varName "operatorRef"^^xsd:string .
_:b68
sp:varName "productionFacilityType"^^xsd:string .
_:b11
sp:varName "operatorName"^^xsd:string .
_:b67
sp:varName "productionFacility"^^xsd:string .
_:b8 sp:varName "productionFlowsForAPeriod"^^xsd:string .
_:b2 sp:varName "productionFlowsForAPeriod"^^xsd:string .
_:b12
sp:varName "temporalPartOfAProductionFacility"^^xsd:string .
_:b15
sp:varName "standardTempPres"^^xsd:string .
_:b13
sp:varName "normalizedOperatorName"^^xsd:string .
_:b16
_:b9 sp:varName "operator"^^xsd:string .
_:b106
sp:varName "productionInstallation"^^xsd:string .
_:b107
sp:varName "productionInstallationType"^^xsd:string .
_:b108
sp:varName "productionFlowsForAPeriod"^^xsd:string .
_:b109
sp:varName "installationRef"^^xsd:string .
_:b110
sp:varName "installationName"^^xsd:string .
_:b111
sp:varName "installationKind"^^xsd:string .
_:b112
sp:varName "normalizedInstallationName"^^xsd:string .
_:b136
sp:varName "facilityRef"^^xsd:string .
_:b17
_:b137
sp:varName "facilityNameRef"^^xsd:string .
_:b18
_:b138
sp:varName "facilityName"^^xsd:string .
_:b19
_:b139
sp:varName "flowRef"^^xsd:string .
_:b20
_:b135
sp:varName "flowName"^^xsd:string .
_:b21
sp:varName "productRef"^^xsd:string .
_:b140
sp:varName "flowKind"^^xsd:string .
_:b22
sp:varName "productKind"^^xsd:string .
_:b141
sp:varName "flowDirection"^^xsd:string .
_:b24
sp:varName "productType"^^xsd:string .
_:b142
sp:varName "normalizedFacilityName"^^xsd:string .
_:b23
sp:varName "productTypeName"^^xsd:string .
_:b132
sp:varName "productionFacility"^^xsd:string .
_:b25
sp:varName "periodRef"^^xsd:string .
_:b143
sp:varName "normalizedFlowName"^^xsd:string .
_:b26
sp:varName "periodKind"^^xsd:string .
_:b130
sp:varName "productionFlow"^^xsd:string .
_:b5 sp:varName "startTime"^^xsd:string .
_:b133
sp:varName "productionFlowPurposeType"^^xsd:string .
_:b6 sp:varName "endTime"^^xsd:string .
_:b134
sp:varName "productionFlowDefinitionType"^^xsd:string .
_:b27
sp:varName "volumeRef"^^xsd:string .
_:b131
sp:varName "productionFlowDirectionRelationshipType"^^xsd:string .
_:b9 sp:varName "realVolume"^^xsd:string .
_:b1 sp:varName "productionFlowsForAPeriod"^^xsd:string .
_:b28
sp:varName "uomVolume"^^xsd:string .
_:b2 sp:varName "productionFlowsName"^^xsd:string .
_:b29
sp:varName "volumeStdRef"^^xsd:string .
_:b3 sp:varName "dTimStart"^^xsd:string .
_:b13
sp:varName "realVolumeStd"^^xsd:string .
_:b4 sp:varName "dTimEnd"^^xsd:string .
_:b30
sp:varName "uomVolumeStd"^^xsd:string .
_:b171
sp:varName "facilityRef"^^xsd:string .
_:b31
_:b172
sp:varName "facilityNameRef"^^xsd:string .
_:b173
sp:varName "facilityName"^^xsd:string .
_:b174
sp:varName "flowRef"^^xsd:string .
_:b175
sp:varName "flowName"^^xsd:string .
_:b176
sp:varName "flowDirection"^^xsd:string .
_:b177
sp:varName "relatedFacilityRef"^^xsd:string .
_:b178
sp:varName "relatedFacilityName"^^xsd:string .
_:b179
sp:varName "relatedFacilityKind"^^xsd:string .
_:b180
sp:varName "normalizedFacilityName"^^xsd:string .
_:b32
_:b181
sp:varName "normalizedFlowName"^^xsd:string .
_:b33
sp:varName "normalizedProductTypeName"^^xsd:string .
_:b4 sp:varName "productFlow"^^xsd:string .
_:b167
sp:varName "productionFlow"^^xsd:string .
_:b8 sp:varName "relationshipToMeasure"^^xsd:string .
_:b182
sp:varName "normalizedRelatedFacilityName"^^xsd:string .
_:b3 sp:varName "temporalPartOfAFlowDurationType"^^xsd:string .
_:b169
sp:varName "relatedFacility"^^xsd:string .
_:b12
sp:varName "volumeStdType"^^xsd:string .
_:b170
sp:varName "relatedFacilityType"^^xsd:string .
_:b10
sp:varName "volumeScale"^^xsd:string .
_:b168
sp:varName "productionFlowDirectionInverseRelationshipType"^^xsd:string .
_:b14
sp:varName "volumeStdScale"^^xsd:string .
_:b5 sp:varName "normalizedProductionFlowsName"^^xsd:string .
_:b38
_:b82
sp:varName "facilityRef"^^xsd:string .
_:b39
_:b83
sp:varName "facilityNameRef"^^xsd:string .
_:b40
_:b84
sp:varName "facilityName"^^xsd:string .
_:b41
_:b85
sp:varName "flowRef"^^xsd:string .
_:b42
_:b86
sp:varName "flowName"^^xsd:string .
_:b43
sp:varName "productRef"^^xsd:string .
_:b87
sp:varName "flowDirection"^^xsd:string .
_:b44
sp:varName "productKind"^^xsd:string .
_:b88
sp:varName "relatedFacilityRef"^^xsd:string .
_:b36
sp:varName "productType"^^xsd:string .
_:b89
sp:varName "relatedFacilityKind"^^xsd:string .
_:b45
sp:varName "productTypeName"^^xsd:string .
_:b90
sp:varName "normalizedFacilityName"^^xsd:string .
_:b46
sp:varName "productNameRef"^^xsd:string .
_:b91
sp:varName "normalizedFlowName"^^xsd:string .
_:b37
sp:varName "productFlowName"^^xsd:string .
_:b78
sp:varName "productionFlow"^^xsd:string .
_:b81
sp:varName "relatedFacilityType"^^xsd:string .
_:b79
sp:varName "productionFlowDirectionInverseRelationshipType"^^xsd:string .
_:b47
sp:varName "normalizedFacilityName"^^xsd:string .
sp:varName "productionFacility"^^xsd:string .
_:b48
sp:varName "normalizedFlowName"^^xsd:string .
_:b35
sp:varName "productionFlow"^^xsd:string .
sp:varName "productionFacilityType"^^xsd:string .
_:b49
sp:varName "normalizedProductTypeName"^^xsd:string .
sp:varName "facilityName"^^xsd:string .
_:b34
sp:varName "productFlow"^^xsd:string .
_:b50
sp:varName "facilityRef"^^xsd:string .
_:b51
sp:varName "facilityNameRef"^^xsd:string .
_:b52
sp:varName "facilityKind"^^xsd:string .
_:b53
sp:varName "normalizedFacilityName"^^xsd:string .
_:b70
sp:varName "productionContextFacility"^^xsd:string .
_:b71
sp:varName "productionContextFacilityType"^^xsd:string .
_:b72
sp:varName "contextFacilityRef"^^xsd:string .
_:b73
sp:varName "contextFacilityName"^^xsd:string .
_:b74
sp:varName "contextFacilityKind"^^xsd:string .
_:b75
sp:varName "productionFlowsForAPeriod"^^xsd:string .
_:b76
sp:varName "temporalPartOfAProductionFacility"^^xsd:string .
_:b77
sp:varName "normalizedContextFacilityName"^^xsd:string .
_:b144
sp:varName "productionFlowsForAPeriod"^^xsd:string .
_:b145
sp:varName "productionFlowsName"^^xsd:string .
_:b146
sp:varName "dateStart"^^xsd:string .
_:b147
sp:varName "dateEnd"^^xsd:string .
......