David Leal

Access to flow facts now works

This diff could not be displayed because it is too large.
......@@ -23,13 +23,26 @@
<http://www.epim.no/schemas/mprml/1#FacilityIdentifierStruct>
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00012a Record the Facility that has the flows - not in the NPD Fact Pages - already in the file
Naming system supplied"""^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
rdfs:comment """STEP 00012c Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file
Naming system supplied
now anonymous - BIND (ep-dpr-spin-lib:buildSmallFacilityURI(?namingSystem, ?facilityName) AS ?facility) .
now context not in name"""^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Facility> ;
sp:predicate rdf:type ;
sp:subject _:b1
] [ sp:object
[ sp:varName "reportingFacilityType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b1
] [ sp:object
[ sp:varName "facilityNameWithContext"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject _:b1
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "facility"^^xsd:string
]
sp:subject _:b1
] [ sp:object
[ sp:varName "facilityLabel"^^xsd:string
] ;
......@@ -121,87 +134,6 @@ Naming system supplied"""^^xsd:string ;
sp:variable
[ sp:varName "facilityLabel"^^xsd:string
]
] [ sp:object
[ sp:varName "aFacilityIdentifierStructure"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "facility"^^xsd:string
]
] [ sp:object <http://www.epim.no/schemas/mprml/1#FacilityIdentifierStruct> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "aFacilityIdentifierStructure"^^xsd:string
]
] [ sp:object
[ sp:varName "facilityLabel"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
sp:subject
[ sp:varName "aFacilityIdentifierStructure"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00009 Record the Facility that has the flows - kind is \"company\" or \"commercial entity\" - assumed to be an ParentCompany
Nothing is done with the namingSystem!"""^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "company"^^xsd:string
]
] [ sp:object
[ sp:varName "companyLabel"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
sp:subject spin:_this
]) ;
sp:where ([ rdf:type sp:Union ;
sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_company> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_commercialentity> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]))
] [ sp:object
[ sp:varName "companyName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#ParentCompany> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "company"^^xsd:string
]
] [ sp:object
[ sp:varName "companyName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "company"^^xsd:string
]
] [ sp:object
[ sp:varName "companyId"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
sp:subject
[ sp:varName "company"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 "company-" ;
sp:arg2 [ sp:varName "companyId"^^xsd:string
]
] ;
sp:variable
[ sp:varName "companyLabel"^^xsd:string
]
])
] ;
spin:rule
......@@ -211,20 +143,20 @@ Naming system not supplied
now anonymous - BIND (ep-dpr-spin-lib:buildSmallFacilityURI(\"\", ?facilityName) AS ?facility) ."""^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Facility> ;
sp:predicate rdf:type ;
sp:subject _:b1
sp:subject _:b2
] [ sp:object
[ sp:varName "reportingFacilityType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b1
sp:subject _:b2
] [ sp:object
[ sp:varName "facilityName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject _:b1
sp:subject _:b2
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject _:b1
sp:subject _:b2
] [ sp:object
[ sp:varName "facilityLabel"^^xsd:string
] ;
......@@ -303,15 +235,32 @@ now anonymous - BIND (ep-dpr-spin-lib:buildSmallFacilityURI(\"\", ?facilityName)
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00007 Record the Facility that has the flows - kind is \"terminal\" - assumed to be a SurfaceFixedFacility
Nothing is done with the namingSystem!"""^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
rdfs:comment """STEP 00011 Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file - a terminal
Naming system supplied"""^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Facility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "terminal"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/geography#Terminal> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "terminal"^^xsd:string
]
] [ sp:object
[ sp:varName "facilityNameWithContext"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject
[ sp:varName "terminal"^^xsd:string
]
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "terminal"^^xsd:string
]
] [ sp:object
[ sp:varName "terminalLabel"^^xsd:string
[ sp:varName "facilityLabel"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
sp:subject spin:_this
......@@ -320,123 +269,251 @@ Nothing is done with the namingSystem!"""^^xsd:string ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "terminalName"^^xsd:string
[ sp:varName "facilityName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#SurfaceFixedFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "terminal"^^xsd:string
]
] [ sp:object
[ sp:varName "terminalName"^^xsd:string
[ sp:varName "namingSystem"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#namingSystem> ;
sp:subject spin:_this
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "terminal"^^xsd:string
[ sp:varName "something"^^xsd:string
]
] [ sp:object
[ sp:varName "terminalId"^^xsd:string
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 [ sp:varName "namingSystem"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
sp:subject
sp:arg2 "$" ;
sp:arg3 [ sp:varName "facilityName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "facilityNameWithContext"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 [ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "namingSystem"^^xsd:string
]
] ;
sp:arg2 "-" ;
sp:arg3 [ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "facilityName"^^xsd:string
]
]
] ;
sp:variable
[ sp:varName "normalizedFacilityNameWithContext"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildTerminalURI ;
sp:arg1 [ sp:varName "normalizedFacilityNameWithContext"^^xsd:string
]
] ;
sp:variable
[ sp:varName "terminal"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 "terminal-" ;
sp:arg2 [ sp:varName "terminalId"^^xsd:string
sp:arg2 [ sp:varName "normalizedFacilityNameWithContext"^^xsd:string
]
] ;
sp:variable
[ sp:varName "terminalLabel"^^xsd:string
[ sp:varName "facilityLabel"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00002 Record the Facility that has the flows - kind is \"wellbore\"
rdfs:comment """STEP 00010 Record the Facility that has the flows - kind is \"licence\"
Nothing is done with the namingSystem!"""^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "wellBore"^^xsd:string
[ sp:varName "licence"^^xsd:string
]
] [ sp:object
[ sp:varName "wellBoreLabel"^^xsd:string
[ sp:varName "licenceLabel"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
sp:subject spin:_this
]) ;
sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_wellbore> ;
sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_licence> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "wellBoreName"^^xsd:string
[ sp:varName "licenceName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ;
sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#Licence> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "wellBore"^^xsd:string
[ sp:varName "licence"^^xsd:string
]
] [ sp:object
[ sp:varName "wellBoreName"^^xsd:string
[ sp:varName "licenceName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "wellBore"^^xsd:string
[ sp:varName "licence"^^xsd:string
]
] [ sp:object
[ sp:varName "wellBoreId"^^xsd:string
[ sp:varName "licenceId"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
sp:subject
[ sp:varName "wellBore"^^xsd:string
[ sp:varName "livence"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 "wellbore-" ;
sp:arg2 [ sp:varName "wellBoreId"^^xsd:string
sp:arg1 "licence-" ;
sp:arg2 [ sp:varName "licenceId"^^xsd:string
]
] ;
sp:variable
[ sp:varName "wellBoreLabel"^^xsd:string
[ sp:varName "licenceLabel"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00012c Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file
Naming system supplied
now anonymous - BIND (ep-dpr-spin-lib:buildSmallFacilityURI(?namingSystem, ?facilityName) AS ?facility) .
now context not in name"""^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Facility> ;
sp:predicate rdf:type ;
sp:subject _:b2
rdfs:comment """STEP 00005 Record the Facility that has the flows - kind is \"well\"
Nothing is done with the namingSystem!"""^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "well"^^xsd:string
]
] [ sp:object
[ sp:varName "reportingFacilityType"^^xsd:string
[ sp:varName "wellLabel"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b2
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
sp:subject spin:_this
]) ;
sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_well> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "facilityNameWithContext"^^xsd:string
[ sp:varName "wellName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject _:b2
] [ sp:object spin:_this ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/well#Well> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "well"^^xsd:string
]
] [ sp:object
[ sp:varName "wellName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "well"^^xsd:string
]
] [ sp:object
[ sp:varName "wellId"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
sp:subject
[ sp:varName "well"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 "well-" ;
sp:arg2 [ sp:varName "wellId"^^xsd:string
]
] ;
sp:variable
[ sp:varName "wellLabel"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00002 Record the Facility that has the flows - kind is \"wellbore\"
Nothing is done with the namingSystem!"""^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject _:b2
sp:subject
[ sp:varName "wellBore"^^xsd:string
]
] [ sp:object
[ sp:varName "wellBoreLabel"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
sp:subject spin:_this
]) ;
sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_wellbore> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "wellBoreName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "wellBore"^^xsd:string
]
] [ sp:object
[ sp:varName "wellBoreName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "wellBore"^^xsd:string
]
] [ sp:object
[ sp:varName "wellBoreId"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
sp:subject
[ sp:varName "wellBore"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 "wellbore-" ;
sp:arg2 [ sp:varName "wellBoreId"^^xsd:string
]
] ;
sp:variable
[ sp:varName "wellBoreLabel"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00012a Record the Facility that has the flows - not in the NPD Fact Pages - already in the file
Naming system supplied"""^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "facility"^^xsd:string
]
] [ sp:object
[ sp:varName "facilityLabel"^^xsd:string
] ;
......@@ -528,422 +605,424 @@ now context not in name"""^^xsd:string ;
sp:variable
[ sp:varName "facilityLabel"^^xsd:string
]
] [ sp:object
[ sp:varName "aFacilityIdentifierStructure"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "facility"^^xsd:string
]
] [ sp:object <http://www.epim.no/schemas/mprml/1#FacilityIdentifierStruct> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "aFacilityIdentifierStructure"^^xsd:string
]
] [ sp:object
[ sp:varName "facilityLabel"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
sp:subject
[ sp:varName "aFacilityIdentifierStructure"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00006 Record the Facility that has the flows - kind is \"terminal\", \"pipeline\", \"flowline\", \"installation\", etc.
rdfs:comment """STEP 00003 Record the Facility that has the flows - kind is \"platform\" - assumed to be a SurfaceFixedFacility
Nothing is done with the namingSystem!"""^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "tuf"^^xsd:string
[ sp:varName "platform"^^xsd:string
]
] [ sp:object
[ sp:varName "tufLabel"^^xsd:string
[ sp:varName "platformLabel"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
sp:subject spin:_this
]) ;
sp:where ([ rdf:type sp:Union ;
sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_terminal> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_pipeline> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_flowline> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_installation> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_plant> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_processingfacility> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_trunkline> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_storage> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_plant-processing> ;
sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_platform> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]))
] [ sp:object
[ sp:varName "tufName"^^xsd:string
[ sp:varName "platformName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#TUF> ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#SurfaceFixedFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "tuf"^^xsd:string
[ sp:varName "platform"^^xsd:string
]
] [ sp:object
[ sp:varName "tufName"^^xsd:string
[ sp:varName "platformName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "tuf"^^xsd:string
[ sp:varName "platform"^^xsd:string
]
] [ sp:object
[ sp:varName "tufId"^^xsd:string
[ sp:varName "platformId"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
sp:subject
[ sp:varName "tuf"^^xsd:string
[ sp:varName "platform"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 "tuf-" ;
sp:arg2 [ sp:varName "tufId"^^xsd:string
sp:arg1 "platform-" ;
sp:arg2 [ sp:varName "platformId"^^xsd:string
]
] ;
sp:variable
[ sp:varName "tufLabel"^^xsd:string
[ sp:varName "platformLabel"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00001 Record the Facility that has the flows - kind is \"field\", etc.
rdfs:comment """STEP 00008 Record the Facility that has the flows - kind is \"company\" or \"commercial entity\" - assumed to be an OperatingCompany
Nothing is done with the namingSystem!"""^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "field"^^xsd:string
[ sp:varName "company"^^xsd:string
]
] [ sp:object
[ sp:varName "fieldLabel"^^xsd:string
[ sp:varName "companyLabel"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
sp:subject spin:_this
]) ;
sp:where ([ rdf:type sp:Union ;
sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field-part> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field-group> ;
sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_company> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field-area> ;
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_commercialentity> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]))
] [ sp:object
[ sp:varName "fieldNamex"^^xsd:string
[ sp:varName "companyName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Field> ;
sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#OperatingCompany> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "field"^^xsd:string
[ sp:varName "company"^^xsd:string
]
] [ sp:object
[ sp:varName "fieldName"^^xsd:string
[ sp:varName "companyName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "field"^^xsd:string
[ sp:varName "company"^^xsd:string
]
] [ sp:object
[ sp:varName "fieldId"^^xsd:string
[ sp:varName "companyId"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
sp:subject
[ sp:varName "field"^^xsd:string
[ sp:varName "company"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 "field-" ;
sp:arg2 [ sp:varName "fieldId"^^xsd:string
]
] ;
sp:variable
[ sp:varName "fieldLabel"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type smf:cast ;
arg:datatype xsd:string ;
sp:arg1 [ sp:varName "fieldNamex"^^xsd:string
sp:arg1 "company-" ;
sp:arg2 [ sp:varName "companyId"^^xsd:string
]
] ;
sp:variable
[ sp:varName "fieldName"^^xsd:string
[ sp:varName "companyLabel"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00005 Record the Facility that has the flows - kind is \"well\"
rdfs:comment """STEP 00004 Record the Facility that has the flows - kind is \"platform\" - assumed to be a MoveableFacility
Nothing is done with the namingSystem!"""^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "well"^^xsd:string
[ sp:varName "platform"^^xsd:string
]
] [ sp:object
[ sp:varName "wellLabel"^^xsd:string
[ sp:varName "platformLabel"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
sp:subject spin:_this
]) ;
sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_well> ;
sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_platform> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "wellName"^^xsd:string
[ sp:varName "platformName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/well#Well> ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#MoveableFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "well"^^xsd:string
[ sp:varName "platform"^^xsd:string
]
] [ sp:object
[ sp:varName "wellName"^^xsd:string
[ sp:varName "platformName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "well"^^xsd:string
[ sp:varName "platform"^^xsd:string
]
] [ sp:object
[ sp:varName "wellId"^^xsd:string
[ sp:varName "platformId"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
sp:subject
[ sp:varName "well"^^xsd:string
[ sp:varName "platform"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 "well-" ;
sp:arg2 [ sp:varName "wellId"^^xsd:string
sp:arg1 "platform-" ;
sp:arg2 [ sp:varName "platformId"^^xsd:string
]
] ;
sp:variable
[ sp:varName "wellLabel"^^xsd:string
[ sp:varName "platformLabel"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00003 Record the Facility that has the flows - kind is \"platform\" - assumed to be a SurfaceFixedFacility
rdfs:comment """STEP 00006 Record the Facility that has the flows - kind is \"terminal\", \"pipeline\", \"flowline\", \"installation\", etc.
Nothing is done with the namingSystem!"""^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "platform"^^xsd:string
[ sp:varName "tuf"^^xsd:string
]
] [ sp:object
[ sp:varName "platformLabel"^^xsd:string
[ sp:varName "tufLabel"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
sp:subject spin:_this
]) ;
sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_platform> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:where ([ rdf:type sp:Union ;
sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_terminal> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_pipeline> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_flowline> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_installation> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_plant> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_processingfacility> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_trunkline> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_storage> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_plant-processing> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]))
] [ sp:object
[ sp:varName "platformName"^^xsd:string
[ sp:varName "tufName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#SurfaceFixedFacility> ;
sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#TUF> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "platform"^^xsd:string
[ sp:varName "tuf"^^xsd:string
]
] [ sp:object
[ sp:varName "platformName"^^xsd:string
[ sp:varName "tufName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "platform"^^xsd:string
[ sp:varName "tuf"^^xsd:string
]
] [ sp:object
[ sp:varName "platformId"^^xsd:string
[ sp:varName "tufId"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
sp:subject
[ sp:varName "platform"^^xsd:string
[ sp:varName "tuf"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 "platform-" ;
sp:arg2 [ sp:varName "platformId"^^xsd:string
sp:arg1 "tuf-" ;
sp:arg2 [ sp:varName "tufId"^^xsd:string
]
] ;
sp:variable
[ sp:varName "platformLabel"^^xsd:string
[ sp:varName "tufLabel"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00004 Record the Facility that has the flows - kind is \"platform\" - assumed to be a MoveableFacility
rdfs:comment """STEP 00009 Record the Facility that has the flows - kind is \"company\" or \"commercial entity\" - assumed to be an ParentCompany
Nothing is done with the namingSystem!"""^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "platform"^^xsd:string
[ sp:varName "company"^^xsd:string
]
] [ sp:object
[ sp:varName "platformLabel"^^xsd:string
[ sp:varName "companyLabel"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
sp:subject spin:_this
]) ;
sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_platform> ;
sp:where ([ rdf:type sp:Union ;
sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_company> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_commercialentity> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]))
] [ sp:object
[ sp:varName "platformName"^^xsd:string
[ sp:varName "companyName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#MoveableFacility> ;
sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#ParentCompany> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "platform"^^xsd:string
[ sp:varName "company"^^xsd:string
]
] [ sp:object
[ sp:varName "platformName"^^xsd:string
[ sp:varName "companyName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "platform"^^xsd:string
[ sp:varName "company"^^xsd:string
]
] [ sp:object
[ sp:varName "platformId"^^xsd:string
[ sp:varName "companyId"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
sp:subject
[ sp:varName "platform"^^xsd:string
[ sp:varName "company"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 "platform-" ;
sp:arg2 [ sp:varName "platformId"^^xsd:string
sp:arg1 "company-" ;
sp:arg2 [ sp:varName "companyId"^^xsd:string
]
] ;
sp:variable
[ sp:varName "platformLabel"^^xsd:string
[ sp:varName "companyLabel"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00010 Record the Facility that has the flows - kind is \"licence\"
rdfs:comment """STEP 00001 Record the Facility that has the flows - kind is \"field\", etc.
Nothing is done with the namingSystem!"""^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "licence"^^xsd:string
[ sp:varName "field"^^xsd:string
]
] [ sp:object
[ sp:varName "licenceLabel"^^xsd:string
[ sp:varName "fieldLabel"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
sp:subject spin:_this
]) ;
sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_licence> ;
sp:where ([ rdf:type sp:Union ;
sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field-part> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field-group> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_field-area> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]))
] [ sp:object
[ sp:varName "licenceName"^^xsd:string
[ sp:varName "fieldName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#Licence> ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Field> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "licence"^^xsd:string
[ sp:varName "field"^^xsd:string
]
] [ sp:object
[ sp:varName "licenceName"^^xsd:string
[ sp:varName "fieldName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "licence"^^xsd:string
[ sp:varName "field"^^xsd:string
]
] [ sp:object
[ sp:varName "licenceId"^^xsd:string
[ sp:varName "fieldId"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
sp:subject
[ sp:varName "livence"^^xsd:string
[ sp:varName "field"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 "licence-" ;
sp:arg2 [ sp:varName "licenceId"^^xsd:string
sp:arg1 "field-" ;
sp:arg2 [ sp:varName "fieldId"^^xsd:string
]
] ;
sp:variable
[ sp:varName "licenceLabel"^^xsd:string
[ sp:varName "fieldLabel"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00011a Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file - a terminal
rdfs:comment """STEP 00012b Record the Facility that has the flows - not in the NPD Fact Pages - already in the file
Naming system not supplied"""^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Facility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "terminal"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/geography#Terminal> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "terminal"^^xsd:string
]
] [ sp:object
[ sp:varName "facilityName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject
[ sp:varName "terminal"^^xsd:string
]
] [ sp:object spin:_this ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "terminal"^^xsd:string
[ sp:varName "facility"^^xsd:string
]
] [ sp:object
[ sp:varName "facilityLabel"^^xsd:string
......@@ -951,9 +1030,13 @@ Naming system not supplied"""^^xsd:string ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
sp:subject spin:_this
]) ;
sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_terminal> ;
sp:where ([ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "facilityKind"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
])
] [ sp:object
[ sp:varName "facilityName"^^xsd:string
] ;
......@@ -975,6 +1058,15 @@ Naming system not supplied"""^^xsd:string ;
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:selectReportingFacilityType ;
sp:arg1 [ sp:varName "facilityKind"^^xsd:string
]
] ;
sp:variable
[ sp:varName "reportingFacilityType"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "facilityName"^^xsd:string
]
......@@ -984,53 +1076,60 @@ Naming system not supplied"""^^xsd:string ;
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildTerminalURI ;
sp:arg1 [ sp:varName "normalizedFacilityName"^^xsd:string
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ rdf:type spl:object ;
sp:arg1 [ sp:varName "reportingFacilityType"^^xsd:string
] ;
sp:arg2 rdfs:label
]
] ;
sp:variable
[ sp:varName "terminal"^^xsd:string
[ sp:varName "normalizedReportingFacilityTypeLabel"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 "terminal-" ;
sp:arg2 [ sp:varName "normalizedFacilityName"^^xsd:string
sp:arg1 [ sp:varName "normalizedReportingFacilityTypeLabel"^^xsd:string
] ;
sp:arg2 "-" ;
sp:arg3 [ sp:varName "normalizedFacilityName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "facilityLabel"^^xsd:string
]
])
] [ sp:object
[ sp:varName "aFacilityIdentifierStructure"^^xsd:string
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00011 Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file - a terminal
Naming system supplied"""^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Facility> ;
sp:predicate rdf:type ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "terminal"^^xsd:string
[ sp:varName "facility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/geography#Terminal> ;
] [ sp:object <http://www.epim.no/schemas/mprml/1#FacilityIdentifierStruct> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "terminal"^^xsd:string
[ sp:varName "aFacilityIdentifierStructure"^^xsd:string
]
] [ sp:object
[ sp:varName "facilityNameWithContext"^^xsd:string
[ sp:varName "facilityLabel"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
sp:subject
[ sp:varName "terminal"^^xsd:string
[ sp:varName "aFacilityIdentifierStructure"^^xsd:string
]
] [ sp:object spin:_this ;
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00007 Record the Facility that has the flows - kind is \"terminal\" - assumed to be a SurfaceFixedFacility
Nothing is done with the namingSystem!"""^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "terminal"^^xsd:string
]
] [ sp:object
[ sp:varName "facilityLabel"^^xsd:string
[ sp:varName "terminalLabel"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
sp:subject spin:_this
......@@ -1039,79 +1138,69 @@ Naming system supplied"""^^xsd:string ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "facilityName"^^xsd:string
[ sp:varName "terminalName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "namingSystem"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#namingSystem> ;
sp:subject spin:_this
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#SurfaceFixedFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "something"^^xsd:string
]
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 [ sp:varName "namingSystem"^^xsd:string
] ;
sp:arg2 "$" ;
sp:arg3 [ sp:varName "facilityName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "facilityNameWithContext"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 [ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "namingSystem"^^xsd:string
]
] ;
sp:arg2 "-" ;
sp:arg3 [ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "facilityName"^^xsd:string
]
[ sp:varName "terminal"^^xsd:string
]
] [ sp:object
[ sp:varName "terminalName"^^xsd:string
] ;
sp:variable
[ sp:varName "normalizedFacilityNameWithContext"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildTerminalURI ;
sp:arg1 [ sp:varName "normalizedFacilityNameWithContext"^^xsd:string
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "terminal"^^xsd:string
]
] [ sp:object
[ sp:varName "terminalId"^^xsd:string
] ;
sp:variable
sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
sp:subject
[ sp:varName "terminal"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 "terminal-" ;
sp:arg2 [ sp:varName "normalizedFacilityNameWithContext"^^xsd:string
sp:arg2 [ sp:varName "terminalId"^^xsd:string
]
] ;
sp:variable
[ sp:varName "facilityLabel"^^xsd:string
[ sp:varName "terminalLabel"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00012b Record the Facility that has the flows - not in the NPD Fact Pages - already in the file
rdfs:comment """STEP 00011a Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file - a terminal
Naming system not supplied"""^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Facility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "terminal"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/geography#Terminal> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "terminal"^^xsd:string
]
] [ sp:object
[ sp:varName "facilityName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject
[ sp:varName "terminal"^^xsd:string
]
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "facility"^^xsd:string
[ sp:varName "terminal"^^xsd:string
]
] [ sp:object
[ sp:varName "facilityLabel"^^xsd:string
......@@ -1119,13 +1208,9 @@ Naming system not supplied"""^^xsd:string ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
sp:subject spin:_this
]) ;
sp:where ([ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "facilityKind"^^xsd:string
] ;
sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_terminal> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
])
] [ sp:object
[ sp:varName "facilityName"^^xsd:string
] ;
......@@ -1147,15 +1232,6 @@ Naming system not supplied"""^^xsd:string ;
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:selectReportingFacilityType ;
sp:arg1 [ sp:varName "facilityKind"^^xsd:string
]
] ;
sp:variable
[ sp:varName "reportingFacilityType"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "facilityName"^^xsd:string
]
......@@ -1165,113 +1241,27 @@ Naming system not supplied"""^^xsd:string ;
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ rdf:type spl:object ;
sp:arg1 [ sp:varName "reportingFacilityType"^^xsd:string
] ;
sp:arg2 rdfs:label
[ rdf:type ep-dpr-spin-lib:buildTerminalURI ;
sp:arg1 [ sp:varName "normalizedFacilityName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "normalizedReportingFacilityTypeLabel"^^xsd:string
[ sp:varName "terminal"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 [ sp:varName "normalizedReportingFacilityTypeLabel"^^xsd:string
] ;
sp:arg2 "-" ;
sp:arg3 [ sp:varName "normalizedFacilityName"^^xsd:string
sp:arg1 "terminal-" ;
sp:arg2 [ sp:varName "normalizedFacilityName"^^xsd:string
]
] ;
sp:variable
[ sp:varName "facilityLabel"^^xsd:string
]
] [ sp:object
[ sp:varName "aFacilityIdentifierStructure"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "facility"^^xsd:string
]
] [ sp:object <http://www.epim.no/schemas/mprml/1#FacilityIdentifierStruct> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "aFacilityIdentifierStructure"^^xsd:string
]
] [ sp:object
[ sp:varName "facilityLabel"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
sp:subject
[ sp:varName "aFacilityIdentifierStructure"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00008 Record the Facility that has the flows - kind is \"company\" or \"commercial entity\" - assumed to be an OperatingCompany
Nothing is done with the namingSystem!"""^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "company"^^xsd:string
]
] [ sp:object
[ sp:varName "companyLabel"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText> ;
sp:subject spin:_this
]) ;
sp:where ([ rdf:type sp:Union ;
sp:elements (([ sp:object <http://www.epim.no/schemas/mprml/1#RF_company> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]) ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_commercialentity> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]))
] [ sp:object
[ sp:varName "companyName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#OperatingCompany> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "company"^^xsd:string
]
] [ sp:object
[ sp:varName "companyName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "company"^^xsd:string
]
] [ sp:object
[ sp:varName "companyId"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
sp:subject
[ sp:varName "company"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 "company-" ;
sp:arg2 [ sp:varName "companyId"^^xsd:string
]
] ;
sp:variable
[ sp:varName "companyLabel"^^xsd:string
]
])
] .
<http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-facilityIdentifierStructure-v1.1.1>
rdf:type owl:Ontology ;
owl:imports <http://spinrdf.org/spin> , <http://www.epim.no/schemas/mprml/1> , <http://www.reportinghub.no/ep/mpr/spin/1.1/lib> , <http://www.reportinghub.no/ep/dpr/spin/1.1/lib> , <http://www.reportinghub.no/ep/transform/transform-helper-schema> ;
owl:imports <http://www.reportinghub.no/ep/transform/transform-helper-schema> , <http://www.reportinghub.no/ep/dpr/spin/1.1/lib> , <http://www.reportinghub.no/ep/mpr/spin/1.1/lib> , <http://www.epim.no/schemas/mprml/1> , <http://spinrdf.org/spin> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
......