David Leal

Better processing of MPR organizations and facilities

......@@ -17,65 +17,39 @@
<http://www.epim.no/schemas/mprml/1#FacilityIdentifierStruct>
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 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/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "tuf"^^xsd:string
[ sp:varName "well"^^xsd:string
]
] [ sp:object
[ sp:varName "tufName"^^xsd:string
[ sp:varName "wellName"^^xsd:string
] ;
sp:predicate rdfs:label ;
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_well> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]))
] [ sp:object
[ sp:varName "tufName"^^xsd:string
[ sp:varName "wellName"^^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/well#Well> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "tuf"^^xsd:string
[ sp:varName "well"^^xsd:string
]
] [ sp:object
[ sp:varName "tufName"^^xsd:string
[ sp:varName "wellName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "tuf"^^xsd:string
[ sp:varName "well"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
......@@ -123,44 +97,39 @@ Nothing is done with the namingSystem!"""^^xsd:string ;
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00007 Record the Facility that has the flows - kind is \"company\" or \"commercial entity\" - assumed to be an OperatingCompany
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/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "company"^^xsd:string
[ sp:varName "platform"^^xsd:string
]
] [ sp:object
[ sp:varName "companyName"^^xsd:string
[ sp:varName "platformName"^^xsd:string
] ;
sp:predicate rdfs:label ;
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: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 "companyName"^^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#OperatingCompany> ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#SurfaceFixedFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "company"^^xsd:string
[ sp:varName "platform"^^xsd:string
]
] [ sp:object
[ sp:varName "companyName"^^xsd:string
[ sp:varName "platformName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "company"^^xsd:string
[ sp:varName "platform"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
......@@ -168,39 +137,44 @@ Nothing is done with the namingSystem!"""^^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 00007 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/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "well"^^xsd:string
[ sp:varName "company"^^xsd:string
]
] [ sp:object
[ sp:varName "wellName"^^xsd:string
[ sp:varName "companyName"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject spin:_this
]) ;
sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_well> ;
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 "wellName"^^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/well#Well> ;
sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#OperatingCompany> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "well"^^xsd:string
[ sp:varName "company"^^xsd:string
]
] [ sp:object
[ sp:varName "wellName"^^xsd:string
[ sp:varName "companyName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "well"^^xsd:string
[ sp:varName "company"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
......@@ -248,154 +222,150 @@ Nothing is done with the namingSystem!"""^^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
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 <http://www.reportinghub.no/ep/schema/facility#Facility> ;
sp:predicate rdf:type ;
sp:subject _:b1
] [ sp:object
[ sp:varName "productionFacilityType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b1
] [ sp:object
[ sp:varName "facilityName"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject _:b1
] [ sp:object spin:_this ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b1
sp:subject
[ sp:varName "platform"^^xsd:string
]
] [ sp:object
[ sp:varName "facilityName"^^xsd:string
[ sp:varName "platformName"^^xsd:string
] ;
sp:predicate rdfs:label ;
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_platform> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
])
] [ sp:object
[ sp:varName "facilityName"^^xsd:string
[ sp:varName "platformName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#MoveableFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "something"^^xsd:string
]
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:selectProductionFacilityType ;
sp:arg1 [ sp:varName "facilityKind"^^xsd:string
[ sp:varName "platform"^^xsd:string
]
] [ sp:object
[ sp:varName "platformName"^^xsd:string
] ;
sp:variable
[ sp:varName "productionFacilityType"^^xsd:string
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "platform"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment """STEP 00010 Record the Facility that has the flows - not in the NPD Fact Pages - already in the file
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/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "facility"^^xsd:string
[ sp:varName "tuf"^^xsd:string
]
]) ;
sp:where ([ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "facilityKind"^^xsd:string
] [ sp:object
[ sp:varName "tufName"^^xsd:string
] ;
sp:predicate rdfs:label ;
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:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject spin:_this
]))
] [ sp:object
[ sp:varName "facilityName"^^xsd:string
[ sp:varName "tufName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "something"^^xsd:string
]
])
] [ sp:object
[ sp:varName "aFacilityIdentifierStructure"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "facility"^^xsd:string
]
] [ sp:object <http://www.epim.no/schemas/mprml/1#FacilityIdentifierStruct> ;
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#TUF> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "aFacilityIdentifierStructure"^^xsd:string
[ sp:varName "tuf"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacilityType"^^xsd:string
[ sp:varName "tufName"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "facility"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:selectProductionFacilityType ;
sp:arg1 [ sp:varName "facilityKind"^^xsd:string
]
] ;
sp:variable
[ sp:varName "productionFacilityType"^^xsd:string
[ sp:varName "tuf"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
])
] ;
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 00008 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/schema/core#derivedFrom> ;
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 rdfs:label ;
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#SurfaceFixedFacility> ;
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:graphNameNode <http://www.reportinghub.no/np/data/npd>
......@@ -403,87 +373,117 @@ Nothing is done with the namingSystem!"""^^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 00011 Record the Facility that has the flows - not in the NPD Fact Pages - not already in the file
Nothing is done with the namingSystem!"""^^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 _:b1
] [ sp:object
[ sp:varName "productionFacilityType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject _:b1
] [ sp:object
[ sp:varName "facilityName"^^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/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "platform"^^xsd:string
]
sp:subject _:b1
] [ sp:object
[ sp:varName "platformName"^^xsd:string
[ sp:varName "facilityName"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject spin:_this
]) ;
sp:where ([ sp:object <http://www.epim.no/schemas/mprml/1#RF_platform> ;
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 "platformName"^^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#MoveableFacility> ;
sp:predicate rdf:type ;
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "platform"^^xsd:string
[ sp:varName "something"^^xsd:string
]
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:selectProductionFacilityType ;
sp:arg1 [ sp:varName "facilityKind"^^xsd:string
]
] [ sp:object
[ sp:varName "platformName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "platform"^^xsd:string
sp:variable
[ sp:varName "productionFacilityType"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
])
] ;
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 ParentCompany
rdfs:comment """STEP 00010 Record the Facility that has the flows - not in the NPD Fact Pages - already in the file
Nothing is done with the namingSystem!"""^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "company"^^xsd:string
[ sp:varName "facility"^^xsd:string
]
] [ sp:object
[ sp:varName "companyName"^^xsd:string
] ;
sp:predicate rdfs:label ;
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: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 "companyName"^^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/np/schema/npd#ParentCompany> ;
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "something"^^xsd:string
]
])
] [ sp:object
[ sp:varName "aFacilityIdentifierStructure"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#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 "company"^^xsd:string
[ sp:varName "aFacilityIdentifierStructure"^^xsd:string
]
] [ sp:object
[ sp:varName "companyName"^^xsd:string
[ sp:varName "productionFacilityType"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "company"^^xsd:string
[ sp:varName "facility"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:selectProductionFacilityType ;
sp:arg1 [ sp:varName "facilityKind"^^xsd:string
]
] ;
sp:variable
[ sp:varName "productionFacilityType"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
])
] ;
spin:rule
......@@ -540,5 +540,5 @@ Nothing is done with the namingSystem!"""^^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> ;
owl:imports <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 .
......
......@@ -6,8 +6,6 @@
@prefix : <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-organization-v1.1.1#> .
@prefix arg: <http://spinrdf.org/arg#> .
@prefix npd: <http://www.reportinghub.no/ep/schema/npd#> .
@prefix npdata: <http://www.reportinghub.no/ep/data/> .
@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#> .
......@@ -17,25 +15,63 @@
@prefix spl: <http://spinrdf.org/spl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://www.epim.no/schemas/mprml/1#RefNameString>
<http://www.epim.no/schemas/mprml/1#Cs_businessAssociate>
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 00023 Set organization - not in NPD fact pages but already defined in the file"^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
rdfs:comment "STEP 00044 Set organization - define organization not in the NPD fact pages."^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ;
sp:predicate rdf:type ;
sp:subject _:b1
] [ sp:object
[ sp:varName "organizationName"^^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/schema/core#derivedFrom> ;
sp:subject _:b1
]) ;
sp:where ([ sp:object
[ sp:varName "organizationName"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#name> ;
sp:subject spin:_this
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "organization"^^xsd:string
[ sp:varName "somethingElse"^^xsd:string
]
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#buyerRef> ;
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "something"^^xsd:string
[ sp:varName "organization"^^xsd:string
]
] [ sp:object
[ sp:varName "organizationName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject
[ sp:varName "organization"^^xsd:string
]
])
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 00043 Set organization - not in NPD fact pages but already defined in the file"^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "organization"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "organizationName"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#name> ;
sp:subject spin:_this
] [ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ;
sp:predicate rdf:type ;
......@@ -53,25 +89,51 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 00025 Set organization - parent company in NPD fact pages"^^xsd:string ;
rdfs:comment "STEP 00042 Set organization - operating company in NPD fact pages"^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "organization"^^xsd:string
]
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#ownerRef> ;
sp:where ([ sp:object
[ sp:varName "organizationName"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#name> ;
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 "something"^^xsd:string
[ sp:varName "organization"^^xsd:string
]
] [ sp:object
[ sp:varName "organizationName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "organization"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 00041 Set organization - parent company in NPD fact pages"^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "organization"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "organizationName"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#name> ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object npd:ParentCompany ;
sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#ParentCompany> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "organization"^^xsd:string
......@@ -79,14 +141,16 @@
] [ sp:object
[ sp:varName "organizationName"^^xsd:string
] ;
sp:predicate npd:name ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "organization"^^xsd:string
]
]) ;
sp:graphNameNode npdata:npd
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
])
] ;
] .
<http://www.epim.no/schemas/mprml/1#RefNameString>
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 00026 Set organization - operating company in NPD fact pages"^^xsd:string ;
......@@ -107,7 +171,7 @@
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object npd:OperatingCompany ;
sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#OperatingCompany> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "organization"^^xsd:string
......@@ -115,17 +179,17 @@
] [ sp:object
[ sp:varName "organizationName"^^xsd:string
] ;
sp:predicate npd:name ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "organization"^^xsd:string
]
]) ;
sp:graphNameNode npdata:npd
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 00027 Set organization - not in NPD fact pages but already defined in the file"^^xsd:string ;
rdfs:comment "STEP 00022 Set organization - operating company in NPD fact pages"^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
......@@ -133,7 +197,7 @@
]
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#ownerRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#buyerRef> ;
sp:subject
[ sp:varName "something"^^xsd:string
]
......@@ -142,7 +206,8 @@
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ;
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#OperatingCompany> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "organization"^^xsd:string
......@@ -150,29 +215,31 @@
] [ sp:object
[ sp:varName "organizationName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "organization"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 00024 Set organization - define organization not in the NPD fact pages."^^xsd:string ;
rdfs:comment "STEP 00032 Set organization - define organization not in the NPD fact pages."^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ;
sp:predicate rdf:type ;
sp:subject _:b1
sp:subject _:b2
] [ sp:object
[ sp:varName "organizationName"^^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/schema/core#derivedFrom> ;
sp:subject _:b1
sp:subject _:b2
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#buyerRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#sellerRef> ;
sp:subject
[ sp:varName "something"^^xsd:string
]
......@@ -206,21 +273,21 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 00032 Set organization - define organization not in the NPD fact pages."^^xsd:string ;
rdfs:comment "STEP 00028 Set organization - define organization not in the NPD fact pages."^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ;
sp:predicate rdf:type ;
sp:subject _:b2
sp:subject _:b3
] [ sp:object
[ sp:varName "organizationName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject _:b2
sp:subject _:b3
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b2
sp:subject _:b3
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#sellerRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#ownerRef> ;
sp:subject
[ sp:varName "something"^^xsd:string
]
......@@ -254,7 +321,7 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 00022 Set organization - operating company in NPD fact pages"^^xsd:string ;
rdfs:comment "STEP 00021 Set organization - parent company in NPD fact pages"^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
......@@ -272,7 +339,7 @@
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object npd:OperatingCompany ;
sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#ParentCompany> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "organization"^^xsd:string
......@@ -280,20 +347,25 @@
] [ sp:object
[ sp:varName "organizationName"^^xsd:string
] ;
sp:predicate npd:name ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "organization"^^xsd:string
]
]) ;
sp:graphNameNode npdata:npd
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 00021 Set organization - parent company in NPD fact pages"^^xsd:string ;
sp:templates () ;
rdfs:comment "STEP 00025 Set organization - parent company in NPD fact pages"^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "organization"^^xsd:string
]
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#buyerRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#ownerRef> ;
sp:subject
[ sp:varName "something"^^xsd:string
]
......@@ -303,7 +375,7 @@
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object npd:ParentCompany ;
sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#ParentCompany> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "organization"^^xsd:string
......@@ -311,31 +383,31 @@
] [ sp:object
[ sp:varName "organizationName"^^xsd:string
] ;
sp:predicate npd:name ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "organization"^^xsd:string
]
]) ;
sp:graphNameNode npdata:npd
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 00028 Set organization - define organization not in the NPD fact pages."^^xsd:string ;
rdfs:comment "STEP 00024 Set organization - define organization not in the NPD fact pages."^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ;
sp:predicate rdf:type ;
sp:subject _:b3
sp:subject _:b4
] [ sp:object
[ sp:varName "organizationName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject _:b3
sp:subject _:b4
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject _:b3
sp:subject _:b4
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#ownerRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#buyerRef> ;
sp:subject
[ sp:varName "something"^^xsd:string
]
......@@ -369,7 +441,7 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 00030 Set organization - operating company in NPD fact pages"^^xsd:string ;
rdfs:comment "STEP 00023 Set organization - not in NPD fact pages but already defined in the file"^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
......@@ -377,7 +449,7 @@
]
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#sellerRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#buyerRef> ;
sp:subject
[ sp:varName "something"^^xsd:string
]
......@@ -386,8 +458,7 @@
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object npd:OperatingCompany ;
] [ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "organization"^^xsd:string
......@@ -395,17 +466,15 @@
] [ sp:object
[ sp:varName "organizationName"^^xsd:string
] ;
sp:predicate npd:name ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject
[ sp:varName "organization"^^xsd:string
]
]) ;
sp:graphNameNode npdata:npd
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 00031 Set organization - not in NPD fact pages but already defined in the file"^^xsd:string ;
rdfs:comment "STEP 00027 Set organization - not in NPD fact pages but already defined in the file"^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
......@@ -413,7 +482,7 @@
]
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#sellerRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#ownerRef> ;
sp:subject
[ sp:varName "something"^^xsd:string
]
......@@ -456,7 +525,43 @@
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object npd:ParentCompany ;
sp:elements ([ sp:object <http://www.reportinghub.no/np/schema/npd#ParentCompany> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "organization"^^xsd:string
]
] [ sp:object
[ sp:varName "organizationName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "organization"^^xsd:string
]
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 00030 Set organization - operating company in NPD fact pages"^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "organization"^^xsd:string
]
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#sellerRef> ;
sp:subject
[ sp:varName "something"^^xsd:string
]
] [ sp:object
[ sp:varName "organizationName"^^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 "organization"^^xsd:string
......@@ -464,16 +569,49 @@
] [ sp:object
[ sp:varName "organizationName"^^xsd:string
] ;
sp:predicate npd:name ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "organization"^^xsd:string
]
]) ;
sp:graphNameNode npdata:npd
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 00031 Set organization - not in NPD fact pages but already defined in the file"^^xsd:string ;
sp:templates ([ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "organization"^^xsd:string
]
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#sellerRef> ;
sp:subject
[ sp:varName "something"^^xsd:string
]
] [ sp:object
[ sp:varName "organizationName"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject spin:_this
] [ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "organization"^^xsd:string
]
] [ sp:object
[ sp:varName "organizationName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject
[ sp:varName "organization"^^xsd:string
]
])
] .
<http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-organization-v1.1.1>
rdf:type owl:Ontology ;
owl:imports <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: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> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
......
......@@ -19,6 +19,67 @@
<http://www.epim.no/schemas/mprml/1#A_Global-Objects>
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10010 Add the contextFacility"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "contextFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
sp:subject
[ sp:varName "productionFacility"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "contextRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "contectFacilityRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextFacilityRef> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "contextFacilityRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "contextFacility"^^xsd:string
]
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001c Create the interval identifier - date from context"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "date"^^xsd:string
......@@ -65,10 +126,8 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001d Create the interval identifier - dateEnd from context"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
rdfs:comment "STEP 10001e Create the interval identifier - no date"^^xsd:string ;
sp:templates ([ sp:object "noDate" ;
sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ;
sp:subject spin:_this
]) ;
......@@ -82,13 +141,15 @@
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "date"^^xsd:string
......@@ -111,77 +172,68 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001p Create the ProductionReport - no installation"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/production-report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "intervalIdentifier"^^xsd:string
rdfs:comment "STEP 10001d Create the interval identifier - dateEnd from context"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ;
sp:subject spin:_this
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
]) ;
sp:where ([ sp:object
[ sp:varName "contextRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "name"^^xsd:string
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "date"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#date> ;
sp:subject
[ sp:varName "installationRef"^^xsd:string
[ sp:varName "contextRef"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "productionOperationRef"^^xsd:string
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productionOperation> ;
sp:predicate rdf:type ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
])
])
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10020 Add the operator"^^xsd:string ;
sp:templates ([ sp:object _:b1 ;
sp:predicate <http://www.reportinghub.no/ep/schema/facility#facilityOperator> ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ;
sp:predicate rdf:type ;
sp:subject _:b1
] [ sp:object
[ sp:varName "name"^^xsd:string
[ sp:varName "operator"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "installationRef"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b1
]) ;
sp:where ([ sp:object
[ sp:varName "contextRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
......@@ -192,39 +244,36 @@
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
[ sp:varName "operatorRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#operatorRef> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "name"^^xsd:string
[ sp:varName "operatorRef"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "installationRef"^^xsd:string
]
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 "noInstallation"
] ;
sp:variable
[ sp:varName "normalizedName"^^xsd:string
[ sp:varName "operator"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:buildProductionReportURI ;
sp:arg1 [ sp:varName "normalizedName"^^xsd:string
] ;
sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
] ;
sp:variable
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
])
] ;
spin:rule
......@@ -275,12 +324,25 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001m Create the ProductionReport - extract the name from context/installation"^^xsd:string ;
rdfs:comment "STEP 10001o Create the ProductionReport - extract the name from productVolume/installation"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/production-report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object _:b2 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b2
] [ sp:object
[ sp:varName "installation"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b2
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
......@@ -293,6 +355,50 @@
sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "installation"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "productionOperationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productionOperation> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "contextRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
......@@ -309,6 +415,7 @@
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spl:object ;
......@@ -334,8 +441,10 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001e Create the interval identifier - no date"^^xsd:string ;
sp:templates ([ sp:object "noDate" ;
rdfs:comment "STEP 10001b Create the interval identifier - date and dateEnd from context"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "intervalIdentifier"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ;
sp:subject spin:_this
]) ;
......@@ -349,24 +458,13 @@
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
] [ sp:object
[ sp:varName "date"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#date> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "dateStart"^^xsd:string
......@@ -376,16 +474,47 @@
[ sp:varName "contextRef"^^xsd:string
]
])
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:buildIntervalIdentifier ;
sp:arg1 [ sp:varName "date"^^xsd:string
] ;
sp:arg2 [ sp:varName "dateEnd"^^xsd:string
]
] ;
sp:variable
[ sp:varName "intervalIdentifier"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001o Create the ProductionReport - extract the name from productVolume/installation"^^xsd:string ;
rdfs:comment "STEP 10001n Create the ProductionReport - extract the name from productionOperation/installation"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/production-report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object _:b3 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b3
] [ sp:object
[ sp:varName "installation"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b3
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
......@@ -398,32 +527,7 @@
sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "name"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "installationRef"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "productionOperationRef"^^xsd:string
[ sp:varName "productionOperationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
......@@ -440,13 +544,12 @@
[ sp:varName "productionOperationRef"^^xsd:string
]
] [ sp:object
[ sp:varName "name"^^xsd:string
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "installationRef"^^xsd:string
[ sp:varName "installation"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "contextRef"^^xsd:string
......@@ -459,19 +562,12 @@
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
[ sp:varName "something"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "name"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "installationRef"^^xsd:string
]
])
] [ rdf:type sp:Bind ;
sp:expression
......@@ -498,123 +594,130 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001z Add the report kind, issue date and title"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "reportKind"^^xsd:string
] ;
rdfs:comment "STEP 10001p Create the ProductionReport - no installation"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/production-report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/production-report#ProductionReport> ;
sp:predicate rdfs:subClassOf ;
] [ sp:object _:b4 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:subject
[ sp:varName "reportKind"^^xsd:string
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/production-report#ProductionReportKind> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b4
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "reportKind"^^xsd:string
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object
[ sp:varName "kind"^^xsd:string
]) ;
sp:where ([ sp:object
[ sp:varName "intervalIdentifier"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "reportKind"^^xsd:string
]
] [ sp:object
[ sp:varName "issueDate"^^xsd:string
sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ;
sp:subject spin:_this
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/production-report#issuedAt> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "title"^^xsd:string
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
[ sp:varName "productVolumeRef"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "contextRef"^^xsd:string
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "productionOperationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ;
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productionOperation> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
[ sp:varName "productionOperationRef"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "kind"^^xsd:string
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kind> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
[ sp:varName "productionOperationRef"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "issueDate"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#issueDate> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "titleRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#titleRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "title"^^xsd:string
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "titleRef"^^xsd:string
[ sp:varName "contextRef"^^xsd:string
]
])
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "kind"^^xsd:string
]
sp:arg1 "noInstallation"
] ;
sp:variable
[ sp:varName "normalizedKind"^^xsd:string
[ sp:varName "normalizedName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionReportKindURI ;
sp:arg1 [ sp:varName "normalizedKind"^^xsd:string
[ rdf:type ep-mpr-spin-lib:buildProductionReportURI ;
sp:arg1 [ sp:varName "normalizedName"^^xsd:string
] ;
sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string
]
] ;
sp:variable
[ sp:varName "reportKind"^^xsd:string
[ sp:varName "productionReport"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001n Create the ProductionReport - extract the name from productionOperation/installation"^^xsd:string ;
rdfs:comment "STEP 10001m Create the ProductionReport - extract the name from context/installation"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/production-report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object _:b5 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b5
] [ sp:object
[ sp:varName "installation"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b5
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
......@@ -627,24 +730,6 @@
sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "productionOperationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#objectRef> ;
sp:subject spin:_this
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productionOperation> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "contextRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
......@@ -662,13 +747,12 @@
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "name"^^xsd:string
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "installationRef"^^xsd:string
[ sp:varName "installation"^^xsd:string
]
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spl:object ;
......@@ -694,12 +778,45 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001b Create the interval identifier - date and dateEnd from context"^^xsd:string ;
rdfs:comment "STEP 10001z Add the report kind, issue date and title"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "intervalIdentifier"^^xsd:string
[ sp:varName "reportKind"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/production-core#intervalIdentifier> ;
sp:subject spin:_this
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/production-report#ProductionReport> ;
sp:predicate rdfs:subClassOf ;
sp:subject
[ sp:varName "reportKind"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/production-report#ProductionReportKind> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "reportKind"^^xsd:string
]
] [ sp:object
[ sp:varName "kind"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "reportKind"^^xsd:string
]
] [ sp:object
[ sp:varName "issueDate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/production-report#issuedAt> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object
[ sp:varName "title"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "contextRef"^^xsd:string
......@@ -711,44 +828,67 @@
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "date"^^xsd:string
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "kind"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#date> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kind> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ rdf:type sp:NotExists ;
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "dateStart"^^xsd:string
[ sp:varName "issueDate"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#issueDate> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "titleRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#titleRef> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "title"^^xsd:string
] ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "titleRef"^^xsd:string
]
])
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:buildIntervalIdentifier ;
sp:arg1 [ sp:varName "date"^^xsd:string
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 [ sp:varName "kind"^^xsd:string
]
] ;
sp:arg2 [ sp:varName "dateEnd"^^xsd:string
sp:variable
[ sp:varName "normalizedKind"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-dpr-spin-lib:buildProductionReportKindURI ;
sp:arg1 [ sp:varName "normalizedKind"^^xsd:string
]
] ;
sp:variable
[ sp:varName "intervalIdentifier"^^xsd:string
[ sp:varName "reportKind"^^xsd:string
]
])
] .
<http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productionReport-v1.0>
rdf:type owl:Ontology ;
owl:imports <http://www.reportinghub.no/ep/mpr/spin/1.1/lib> , <http://www.epim.no/schemas/mprml/1> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/dpr/spin/1.1/lib> ;
owl:imports <http://www.reportinghub.no/ep/dpr/spin/1.1/lib> , <http://spinrdf.org/spin> , <http://www.epim.no/schemas/mprml/1> , <http://www.reportinghub.no/ep/mpr/spin/1.1/lib> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
......