David Leal

Port URIs random

......@@ -23,7 +23,7 @@
<http://www.reportinghub.no/ep/mpr/spin/1.1/lib>
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/production> , <http://www.reportinghub.no/ep/schema/1.0/production-activity> , <http://www.reportinghub.no/ep/schema/1.0/production-equipment> , <http://www.reportinghub.no/ep/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/spin/1.1/lib> , <http://www.reportinghub.no/ep/schema/1.0/production-equipment> , <http://www.reportinghub.no/ep/schema/1.0/production-activity> , <http://www.reportinghub.no/ep/schema/1.0/production> , <http://www.epim.no/schemas/mprml/1> , <http://spinrdf.org/spin> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
ep-mpr-spin-lib:Function
......@@ -1586,6 +1586,40 @@ ep-mpr-spin-lib:selectFrequencyScale
])
] .
ep-mpr-spin-lib:selectIdFromReportingHubUri
rdf:type spin:Function ;
rdfs:label "select ID from ReportingHub URI"^^xsd:string ;
rdfs:subClassOf ep-mpr-spin-lib:Function ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables ([ sp:varName "id"^^xsd:string
]) ;
sp:where ([ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:eq ;
sp:arg1 [ rdf:type fn:substring ;
sp:arg1 spin:_arg1 ;
sp:arg2 0 ;
sp:arg3 5
] ;
sp:arg2 "https"
] ;
sp:arg2 [ rdf:type fn:substring ;
sp:arg1 spin:_arg1 ;
sp:arg2 8
] ;
sp:arg3 [ rdf:type fn:substring ;
sp:arg1 spin:_arg1 ;
sp:arg2 7
]
] ;
sp:variable
[ sp:varName "id"^^xsd:string
]
])
] .
ep-mpr-spin-lib:selectInjectedFluidType
rdf:type spin:Function ;
rdfs:label "select InjectedFluidType"^^xsd:string ;
......
# baseURI: http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-componentContent-v1.0
# imports: http://spinrdf.org/spin
# imports: http://www.epim.no/schemas/mprml/1
# imports: http://www.reportinghub.no/ep/mpr/spin/1.1/lib
# imports: http://www.reportinghub.no/ep/schema/1.0/core
# imports: http://www.reportinghub.no/ep/schema/1.0/flow
# imports: http://www.reportinghub.no/ep/schema/1.0/scale-maps-to-mpr-enumeration
......@@ -97,6 +98,17 @@
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:selectIdFromReportingHubUri ;
sp:arg1 [ rdf:type xsd:string ;
sp:arg1 [ sp:varName "measurementFacility"^^xsd:string
]
]
] ;
sp:variable
[ sp:varName "measurementFacilityId"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:iri ;
sp:arg1 [ rdf:type fn:concat ;
sp:arg1 [ rdf:type xsd:string ;
......@@ -104,9 +116,7 @@
]
] ;
sp:arg2 "/" ;
sp:arg3 [ rdf:type xsd:string ;
sp:arg1 [ sp:varName "measurementFacility"^^xsd:string
]
sp:arg3 [ sp:varName "measurementFacilityId"^^xsd:string
]
]
] ;
......@@ -117,79 +127,77 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 70100 record the component - actually flow and not inventory"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/flow#Flow> ;
rdfs:comment "STEP 70102 record the product flow components - where \"flow\" means inventory and not a flow"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/flow#Inventory> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "componentFlow"^^xsd:string
[ sp:varName "componentInventory"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "componentInventory"^^xsd:string
]
] [ sp:object
[ sp:varName "componentFlow"^^xsd:string
[ sp:varName "componentInventory"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#hasMixedPart> ;
sp:predicate <http://www.reportinghub.no/ep/schema/material#hasComponent> ;
sp:subject
[ sp:varName "wholeFlow"^^xsd:string
[ sp:varName "wholeInventory"^^xsd:string
]
] [ sp:object
[ sp:varName "intervalStart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "componentFlow"^^xsd:string
[ sp:varName "componentInventory"^^xsd:string
]
] [ sp:object
[ sp:varName "intervalEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "componentFlow"^^xsd:string
[ sp:varName "componentInventory"^^xsd:string
]
] [ sp:object
[ sp:varName "interval"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#existsThroughout> ;
sp:subject
[ sp:varName "componentFlow"^^xsd:string
[ sp:varName "componentInventory"^^xsd:string
]
] [ sp:object
[ sp:varName "temporalPartDurationType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "componentFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "wholeFlowSourceOrDestination"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#flowIntoOrOutOf> ;
sp:subject
[ sp:varName "componentFlow"^^xsd:string
[ sp:varName "componentInventory"^^xsd:string
]
] [ sp:object
[ sp:varName "componentFlow"^^xsd:string
[ sp:varName "componentInventory"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasSpatialPart> ;
sp:subject
[ sp:varName "wholeFlowContainingFacility"^^xsd:string
[ sp:varName "wholeInventoryFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "componentMaterialType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "componentFlow"^^xsd:string
[ sp:varName "componentInventory"^^xsd:string
]
] [ sp:object
[ sp:varName "componentName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject
[ sp:varName "componentFlow"^^xsd:string
[ sp:varName "componentInventory"^^xsd:string
]
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "componentFlow"^^xsd:string
[ sp:varName "componentInventory"^^xsd:string
]
] [ sp:object
[ sp:varName "intervalIdentifier"^^xsd:string
......@@ -252,12 +260,12 @@
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "wholeFlow"^^xsd:string
[ sp:varName "wholeInventory"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#Flow> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#Inventory> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "wholeFlow"^^xsd:string
[ sp:varName "wholeInventory"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
......@@ -276,7 +284,7 @@
[ rdf:type sp:iri ;
sp:arg1 [ rdf:type fn:concat ;
sp:arg1 [ rdf:type xsd:string ;
sp:arg1 [ sp:varName "wholeFlow"^^xsd:string
sp:arg1 [ sp:varName "wholeInventory"^^xsd:string
]
] ;
sp:arg2 [ sp:varName "separatedComponentURISuffix"^^xsd:string
......@@ -284,7 +292,7 @@
]
] ;
sp:variable
[ sp:varName "componentFlow"^^xsd:string
[ sp:varName "componentInventory"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
......@@ -292,7 +300,7 @@
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "wholeFlow"^^xsd:string
[ sp:varName "wholeInventory"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
......@@ -301,7 +309,7 @@
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "wholeFlow"^^xsd:string
[ sp:varName "wholeInventory"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
......@@ -310,7 +318,7 @@
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#existsThroughout> ;
sp:subject
[ sp:varName "wholeFlow"^^xsd:string
[ sp:varName "wholeInventory"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
......@@ -319,7 +327,7 @@
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "wholeFlow"^^xsd:string
[ sp:varName "wholeInventory"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#TemporalPartDurationType> ;
sp:predicate rdf:type ;
......@@ -329,20 +337,16 @@
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "wholeFlowSourceOrDestination"^^xsd:string
[ sp:varName "wholeInventory"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#flowIntoOrOutOf> ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasSpatialPart> ;
sp:subject
[ sp:varName "wholeFlow"^^xsd:string
[ sp:varName "wholeInventoryFacility"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "wholeFlow"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "wholeFlowContainingFacility"^^xsd:string
[ sp:varName "wholeInventoryFacility"^^xsd:string
]
])
])
......@@ -372,77 +376,79 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 70102 record the product flow components - where \"flow\" means inventory and not a flow"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/flow#Inventory> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "componentInventory"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
rdfs:comment "STEP 70100 record the component - actually flow and not inventory"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/flow#Flow> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "componentInventory"^^xsd:string
[ sp:varName "componentFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "componentInventory"^^xsd:string
[ sp:varName "componentFlow"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/material#hasComponent> ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#hasMixedPart> ;
sp:subject
[ sp:varName "wholeInventory"^^xsd:string
[ sp:varName "wholeFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "intervalStart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "componentInventory"^^xsd:string
[ sp:varName "componentFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "intervalEnd"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "componentInventory"^^xsd:string
[ sp:varName "componentFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "interval"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#existsThroughout> ;
sp:subject
[ sp:varName "componentInventory"^^xsd:string
[ sp:varName "componentFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "temporalPartDurationType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "componentInventory"^^xsd:string
[ sp:varName "componentFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "componentInventory"^^xsd:string
[ sp:varName "wholeFlowSourceOrDestination"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasSpatialPart> ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#flowIntoOrOutOf> ;
sp:subject
[ sp:varName "wholeInventoryFacility"^^xsd:string
[ sp:varName "componentFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "componentFlow"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject
[ sp:varName "wholeFlowContainingFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "componentMaterialType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "componentInventory"^^xsd:string
[ sp:varName "componentFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "componentName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject
[ sp:varName "componentInventory"^^xsd:string
[ sp:varName "componentFlow"^^xsd:string
]
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "componentInventory"^^xsd:string
[ sp:varName "componentFlow"^^xsd:string
]
] [ sp:object
[ sp:varName "intervalIdentifier"^^xsd:string
......@@ -505,12 +511,12 @@
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "wholeInventory"^^xsd:string
[ sp:varName "wholeFlow"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#Inventory> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#Flow> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "wholeInventory"^^xsd:string
[ sp:varName "wholeFlow"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
......@@ -529,7 +535,7 @@
[ rdf:type sp:iri ;
sp:arg1 [ rdf:type fn:concat ;
sp:arg1 [ rdf:type xsd:string ;
sp:arg1 [ sp:varName "wholeInventory"^^xsd:string
sp:arg1 [ sp:varName "wholeFlow"^^xsd:string
]
] ;
sp:arg2 [ sp:varName "separatedComponentURISuffix"^^xsd:string
......@@ -537,7 +543,7 @@
]
] ;
sp:variable
[ sp:varName "componentInventory"^^xsd:string
[ sp:varName "componentFlow"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
......@@ -545,7 +551,7 @@
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "wholeInventory"^^xsd:string
[ sp:varName "wholeFlow"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
......@@ -554,7 +560,7 @@
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "wholeInventory"^^xsd:string
[ sp:varName "wholeFlow"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
......@@ -563,7 +569,7 @@
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#existsThroughout> ;
sp:subject
[ sp:varName "wholeInventory"^^xsd:string
[ sp:varName "wholeFlow"^^xsd:string
]
])
] [ rdf:type sp:Optional ;
......@@ -572,7 +578,7 @@
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "wholeInventory"^^xsd:string
[ sp:varName "wholeFlow"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#TemporalPartDurationType> ;
sp:predicate rdf:type ;
......@@ -582,16 +588,20 @@
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "wholeInventory"^^xsd:string
[ sp:varName "wholeFlowSourceOrDestination"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#hasSpatialPart> ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#flowIntoOrOutOf> ;
sp:subject
[ sp:varName "wholeInventoryFacility"^^xsd:string
[ sp:varName "wholeFlow"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "wholeFlow"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#facilityContainsFlow> ;
sp:subject
[ sp:varName "wholeInventoryFacility"^^xsd:string
[ sp:varName "wholeFlowContainingFacility"^^xsd:string
]
])
])
......@@ -674,6 +684,17 @@
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:selectIdFromReportingHubUri ;
sp:arg1 [ rdf:type xsd:string ;
sp:arg1 [ sp:varName "measurementFacility"^^xsd:string
]
]
] ;
sp:variable
[ sp:varName "measurementFacilityId"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type sp:iri ;
sp:arg1 [ rdf:type fn:concat ;
sp:arg1 [ rdf:type xsd:string ;
......@@ -681,9 +702,7 @@
]
] ;
sp:arg2 "/" ;
sp:arg3 [ rdf:type xsd:string ;
sp:arg1 [ sp:varName "measurementFacility"^^xsd:string
]
sp:arg3 [ sp:varName "measurementFacilityId"^^xsd:string
]
]
] ;
......@@ -695,5 +714,5 @@
<http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-componentContent-v1.0>
rdf:type owl:Ontology ;
owl:imports <http://www.epim.no/schemas/mprml/1> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.reportinghub.no/ep/schema/1.0/flow> , <http://www.reportinghub.no/ep/schema/1.0/scale-maps-to-mpr-enumeration> ;
owl:imports <http://www.reportinghub.no/ep/mpr/spin/1.1/lib> , <http://www.reportinghub.no/ep/schema/1.0/scale-maps-to-mpr-enumeration> , <http://www.reportinghub.no/ep/schema/1.0/flow> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://spinrdf.org/spin> , <http://www.epim.no/schemas/mprml/1> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
......