David Price

More fix to use GRAPH for npd and erh

......@@ -4684,6 +4684,40 @@ ep-mpr-spin-lib:selectQuantityTypeUomScale
])
] .
ep-mpr-spin-lib:selectRDFTypes
rdf:type spin:Function ;
rdfs:label "select rdf:types of the thing from NPD, ERH and other"^^xsd:string ;
rdfs:subClassOf ep-mpr-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables ([ sp:varName "thingType"^^xsd:string
]) ;
sp:where ([ rdf:type sp:Union ;
sp:elements (([ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object
[ sp:varName "thingType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject spin:_arg1
]) ;
sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
]) ([ rdf:type sp:NamedGraph ;
sp:elements ([ sp:object
[ sp:varName "thingType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject spin:_arg1
]) ;
sp:graphNameNode <http://www.reportinghub.no/data/erh>
]) ([ sp:object
[ sp:varName "thingType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject spin:_arg1
]))
])
] .
ep-mpr-spin-lib:selectRatioScale
rdf:type spin:Function ;
rdfs:subClassOf ep-mpr-spin-lib:Function ;
......
......@@ -15,7 +15,7 @@
<http://www.reportinghub.no/ep/transform/transform-helper-schema>
rdf:type owl:Ontology ;
rdfs:comment "The Transform Helper Schema is the set of properties and classes used for the creation of temporary data used as part of the ERH transformations. All instances of classes and uses of these properties is deleted before the triples are stored in the RDF database."^^xsd:string ;
owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://www.epim.no/schemas/mprml/1> ;
owl:imports <http://spinrdf.org/spin> , <http://www.epim.no/schemas/mprml/1> , <http://www.reportinghub.no/ep/schema/1.0/activity> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
transhelp:buildRdlURI
......@@ -49,10 +49,10 @@ transhelp:domainOfPropertyMapsToMPREnumeration
rdfs:subPropertyOf transhelp:mapsTo .
transhelp:facilityIdentifier
rdf:type owl:FunctionalProperty , owl:DatatypeProperty .
rdf:type owl:DatatypeProperty , owl:FunctionalProperty .
transhelp:flowingStateMapsToMPREnumeration
rdf:type owl:ObjectProperty , owl:InverseFunctionalProperty ;
rdf:type owl:InverseFunctionalProperty , owl:ObjectProperty ;
rdfs:label "flowing state maps to MPR enumeration"^^xsd:string ;
rdfs:subPropertyOf transhelp:mapsTo .
......@@ -62,6 +62,9 @@ transhelp:forComment
rdfs:domain <http://www.reportinghub.no/ep/schema/activity#Activity> ;
rdfs:label "for comment"^^xsd:string .
transhelp:fromRule
rdf:type owl:DatatypeProperty .
transhelp:hasDerivedText
rdf:type owl:DatatypeProperty .
......@@ -71,25 +74,25 @@ transhelp:hasEquivalentInRDL
rdfs:label "has equivalent in RDL"^^xsd:string .
transhelp:interval
rdf:type owl:FunctionalProperty , owl:DatatypeProperty .
rdf:type owl:DatatypeProperty , owl:FunctionalProperty .
transhelp:intervalEnd
rdf:type owl:FunctionalProperty , owl:DatatypeProperty .
rdf:type owl:DatatypeProperty , owl:FunctionalProperty .
transhelp:intervalIdentifier
rdf:type owl:FunctionalProperty , owl:DatatypeProperty .
rdf:type owl:DatatypeProperty , owl:FunctionalProperty .
transhelp:intervalStart
rdf:type owl:FunctionalProperty , owl:DatatypeProperty .
rdf:type owl:DatatypeProperty , owl:FunctionalProperty .
transhelp:label
rdf:type owl:FunctionalProperty , owl:DatatypeProperty .
rdf:type owl:DatatypeProperty , owl:FunctionalProperty .
transhelp:mapsTo
rdf:type rdf:Property .
transhelp:materialClassMapsToMPREnumeration
rdf:type owl:ObjectProperty , owl:InverseFunctionalProperty ;
rdf:type owl:InverseFunctionalProperty , owl:ObjectProperty ;
rdfs:label "material class maps to MPR enumeration"^^xsd:string ;
rdfs:subPropertyOf transhelp:mapsTo .
......@@ -97,15 +100,15 @@ transhelp:necessaryIntervalString
rdf:type owl:DatatypeProperty .
transhelp:nominalInstant
rdf:type owl:FunctionalProperty , owl:DatatypeProperty .
rdf:type owl:DatatypeProperty , owl:FunctionalProperty .
transhelp:propertyMapsToMPREnumeration
rdf:type owl:ObjectProperty , owl:InverseFunctionalProperty ;
rdf:type owl:InverseFunctionalProperty , owl:ObjectProperty ;
rdfs:label "property maps to MPR enumeration"^^xsd:string ;
rdfs:subPropertyOf transhelp:mapsTo .
transhelp:quantitySpaceMapsToClassOfScale
rdf:type owl:ObjectProperty , owl:InverseFunctionalProperty , owl:FunctionalProperty ;
rdf:type owl:FunctionalProperty , owl:InverseFunctionalProperty , owl:ObjectProperty ;
rdfs:label "quantity space maps to class of scale"^^xsd:string ;
rdfs:subPropertyOf transhelp:mapsTo .
......
......@@ -17,23 +17,23 @@
<http://www.epim.no/schemas/mprml/1#Cs_businessAssociate>
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 90201 Set the approver"^^xsd:string ;
rdfs:comment "STEP 90250 Set the approver"^^xsd:string ;
sp:templates ([ sp:object _:b1 ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#issuer> ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#approver> ;
sp:subject
[ sp:varName "issueReport"^^xsd:string
[ sp:varName "approveReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/organization#PersonOrOrganization> ;
sp:predicate rdf:type ;
sp:subject _:b1
] [ sp:object
[ sp:varName "issuer"^^xsd:string
[ sp:varName "approver"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b1
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#issuedByRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#approverRef> ;
sp:subject
[ sp:varName "target"^^xsd:string
]
......@@ -47,41 +47,41 @@
] [ sp:object
[ sp:varName "report"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#issuedReport> ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#approvedReport> ;
sp:subject
[ sp:varName "issueReport"^^xsd:string
[ sp:varName "approveReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/activity#IssueAReport> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/activity#ApproveAReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "issueReport"^^xsd:string
[ sp:varName "approveReport"^^xsd:string
]
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "issuer"^^xsd:string
[ sp:varName "approver"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 90200 Set the approver"^^xsd:string ;
rdfs:comment "STEP 90251 Set the approver"^^xsd:string ;
sp:templates ([ sp:object _:b2 ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#approver> ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#issuer> ;
sp:subject
[ sp:varName "approveReport"^^xsd:string
[ sp:varName "issueReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/organization#PersonOrOrganization> ;
sp:predicate rdf:type ;
sp:subject _:b2
] [ sp:object
[ sp:varName "approver"^^xsd:string
[ sp:varName "issuer"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b2
]) ;
sp:where ([ sp:object spin:_this ;
sp:predicate <http://www.epim.no/schemas/mprml/1#approverRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#issuedByRef> ;
sp:subject
[ sp:varName "target"^^xsd:string
]
......@@ -95,24 +95,24 @@
] [ sp:object
[ sp:varName "report"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#approvedReport> ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#issuedReport> ;
sp:subject
[ sp:varName "approveReport"^^xsd:string
[ sp:varName "issueReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/activity#ApproveAReport> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/activity#IssueAReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "approveReport"^^xsd:string
[ sp:varName "issueReport"^^xsd:string
]
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "approver"^^xsd:string
[ sp:varName "issuer"^^xsd:string
]
])
] .
<http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-approval-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/schema/1.0/report> , <http://www.reportinghub.no/ep/schema/1.0/production-activity> , <http://www.reportinghub.no/ep/transform/transform-helper-schema> ;
owl:imports <http://spinrdf.org/spin> , <http://www.epim.no/schemas/mprml/1> , <http://www.reportinghub.no/ep/schema/1.0/production-activity> , <http://www.reportinghub.no/ep/schema/1.0/report> , <http://www.reportinghub.no/ep/transform/transform-helper-schema> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
......
......@@ -43,6 +43,9 @@ removed - where ?reportingFacilityType a ep-prodfac:ReportingFacilityType ."""^^
] ;
sp:predicate rdf:type ;
sp:subject _:b1
] [ sp:object "20201" ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#fromRule> ;
sp:subject _:b1
] [ sp:object
[ sp:varName "facilityAtWhichFlowIsMeasured"^^xsd:string
] ;
......@@ -109,12 +112,14 @@ removed - where ?reportingFacilityType a ep-prodfac:ReportingFacilityType ."""^^
sp:subject
[ sp:varName "facilityAtWhichFlowIsMeasured"^^xsd:string
]
] [ sp:object
[ sp:varName "reportingFacilityType"^^xsd:string
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:selectRDFTypes ;
sp:arg1 [ sp:varName "facilityAtWhichFlowIsMeasured"^^xsd:string
]
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "facilityAtWhichFlowIsMeasured"^^xsd:string
sp:variable
[ sp:varName "reportingFacilityType"^^xsd:string
]
])
] ;
......@@ -124,12 +129,18 @@ removed - where ?reportingFacilityType a ep-prodfac:ReportingFacilityType ."""^^
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b2
] [ sp:object "20202" ;
sp:predicate rdfs:comment ;
sp:subject _:b2
] [ sp:object _:b3 ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b2
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b3
] [ sp:object "20202" ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#fromRule> ;
sp:subject _:b3
] [ sp:object
[ sp:varName "facilityRef"^^xsd:string
] ;
......@@ -475,6 +486,9 @@ Nothing is done with the namingSystem!"""^^xsd:string ;
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#Flow> ;
sp:predicate rdf:type ;
sp:subject _:b5
] [ sp:object "20301a" ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#fromRule> ;
sp:subject _:b5
] [ sp:object
[ sp:varName "wholeLifeProductionFlow"^^xsd:string
] ;
......@@ -1297,6 +1311,9 @@ Nothing is done with the namingSystem!"""^^xsd:string ;
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#Inventory> ;
sp:predicate rdf:type ;
sp:subject _:b7
] [ sp:object "20303a" ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#fromRule> ;
sp:subject _:b7
] [ sp:object
[ sp:varName "wholeLifeProductionInventory"^^xsd:string
] ;
......@@ -1732,6 +1749,11 @@ Nothing is done with the namingSystem!"""^^xsd:string ;
sp:subject
[ sp:varName "temporalPartOfAProductionInventory"^^xsd:string
]
] [ sp:object "20303e" ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#fromRule> ;
sp:subject
[ sp:varName "temporalPartOfAProductionInventory"^^xsd:string
]
] [ sp:object
[ sp:varName "temporalPartDurationType"^^xsd:string
] ;
......@@ -2352,6 +2374,12 @@ Nothing is done with the namingSystem!"""^^xsd:string ;
sp:subject
[ sp:varName "facilityOfMeasurement"^^xsd:string
]
] [ sp:object "20330" ;
sp:predicate rdfs:comment ;
sp:subject _:b11
] [ sp:object "20330" ;
sp:predicate rdfs:comment ;
sp:subject _:b12
]) ;
sp:where ([ sp:object
[ sp:varName "productVolumeRef"^^xsd:string
......@@ -2832,6 +2860,9 @@ BIND (ep-dpr-spin-lib:buildProductFlowURI(?productionFlowName, ?productFlowURISu
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductFlow> ;
sp:predicate rdf:type ;
sp:subject _:b13
] [ sp:object "20400e" ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#fromRule> ;
sp:subject _:b13
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#Flow> ;
sp:predicate rdf:type ;
sp:subject _:b13
......@@ -3370,6 +3401,9 @@ BIND (ep-dpr-spin-lib:buildProductFlowURI(?productionFlowName, ?productFlowURISu
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject _:b14
] [ sp:object "20401e" ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#fromRule> ;
sp:subject _:b14
] [ sp:object
[ sp:varName "intervalStart"^^xsd:string
] ;
......@@ -4779,6 +4813,13 @@ BIND (ep-dpr-spin-lib:buildProductFlowURI(?productionFlowName, ?productFlowURISu
])
] .
ep-mpr-spin-lib:selectRDFTypes
spin:constraint
[ rdf:type spl:Argument ;
spl:predicate sp:arg1 ;
spl:valueType owl:Thing
] .
<http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-productVolume-v1.0>
rdf:type owl:Ontology ;
owl:imports <http://spinrdf.org/spin> , <http://www.epim.no/schemas/mprml/1> , <http://www.reportinghub.no/ep/dpr/spin/1.1/lib> , <http://www.reportinghub.no/ep/mpr/spin/1.1/lib> , <http://www.reportinghub.no/ep/schema/1.0/erhfacts> , <http://www.reportinghub.no/ep/transform/transform-helper-schema> ;
......