David Price

Merge branch 'master' into mprg-31pm

......@@ -13,7 +13,7 @@
<http://www.reportinghub.no/ep/schema/1.0/report>
rdf:type owl:Ontology ;
owl:imports <http://www.reportinghub.no/np/schema/1.0/npd> , <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.reportinghub.no/ep/schema/1.0/equipment> , <http://www.reportinghub.no/ep/schema/1.0/well> ;
owl:imports <http://www.reportinghub.no/ep/schema/1.0/well> , <http://www.reportinghub.no/ep/schema/1.0/equipment> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://www.reportinghub.no/np/schema/1.0/npd> ;
owl:versionInfo "0.1.0"^^xsd:string .
ep-report:DailyDrillingReport
......@@ -31,12 +31,12 @@ ep-report:DailyProductionReport
rdfs:subClassOf ep-report:ProductionReport .
ep-report:DailyReport
rdf:type owl:Class , ep-report:ReportPeriodType ;
rdf:type ep-report:ReportPeriodType , owl:Class ;
rdfs:label "daily report"^^xsd:string ;
rdfs:subClassOf ep-report:Report .
ep-report:FinalDailyDrillingReport
rdf:type ep-report:DailyDrillingReportFinalisationType , owl:Class ;
rdf:type owl:Class , ep-report:DailyDrillingReportFinalisationType ;
rdfs:label "final daily drilling report"^^xsd:string ;
rdfs:subClassOf ep-report:DailyDrillingReport .
......@@ -51,7 +51,7 @@ ep-report:MonthlyProductionReport
rdfs:subClassOf ep-report:ProductionReport .
ep-report:MonthlyReport
rdf:type owl:Class , ep-report:ReportPeriodType ;
rdf:type ep-report:ReportPeriodType , owl:Class ;
rdfs:label "monthly report"^^xsd:string ;
rdfs:subClassOf ep-report:Report .
......@@ -60,13 +60,8 @@ ep-report:NonProductivetimeReport
rdfs:subClassOf ep-report:Report ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:allValuesFrom xsd:dateTime ;
owl:onProperty ep-report:createdAt
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:cardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty ep-report:createdAt
owl:onProperty ep-report:reportOn
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
......@@ -76,16 +71,21 @@ ep-report:NonProductivetimeReport
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:cardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty ep-report:reportOn
owl:onProperty ep-report:createdAt
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:allValuesFrom xsd:dateTime ;
owl:onProperty ep-report:createdAt
] .
ep-report:NormalDailyDrillingReport
rdf:type ep-report:DailyDrillingReportFinalisationType , owl:Class ;
rdf:type owl:Class , ep-report:DailyDrillingReportFinalisationType ;
rdfs:label "normal daily drilling report"^^xsd:string ;
rdfs:subClassOf ep-report:DailyDrillingReport .
ep-report:PreliminaryDailyDrillingReport
rdf:type ep-report:DailyDrillingReportFinalisationType , owl:Class ;
rdf:type owl:Class , ep-report:DailyDrillingReportFinalisationType ;
rdfs:label "preliminary daily drilling report"^^xsd:string ;
rdfs:subClassOf ep-report:DailyDrillingReport .
......@@ -129,8 +129,8 @@ ep-report:ReportAliasIdentifier
rdfs:subClassOf owl:Thing ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:minCardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty ep-report:aliasName
owl:cardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty ep-report:isAliasFor
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
......@@ -139,17 +139,17 @@ ep-report:ReportAliasIdentifier
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:cardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty ep-report:isAliasFor
owl:minCardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty ep-report:aliasName
] .
ep-report:ReportForInstant
rdf:type owl:Class , ep-report:ReportPeriodType ;
rdf:type ep-report:ReportPeriodType , owl:Class ;
rdfs:label "report for instant"^^xsd:string ;
rdfs:subClassOf ep-report:Report .
ep-report:ReportMonthToDate
rdf:type owl:Class , ep-report:ReportPeriodType ;
rdf:type ep-report:ReportPeriodType , owl:Class ;
rdfs:label "report month to date"^^xsd:string ;
rdfs:subClassOf ep-report:Report .
......@@ -159,7 +159,7 @@ ep-report:ReportPeriodType
rdfs:subClassOf owl:Class .
ep-report:ReportYearToDate
rdf:type owl:Class , ep-report:ReportPeriodType ;
rdf:type ep-report:ReportPeriodType , owl:Class ;
rdfs:label "report year to date"^^xsd:string ;
rdfs:subClassOf ep-report:Report .
......@@ -168,27 +168,27 @@ ep-report:WeeklyDrillingReport
rdfs:subClassOf ep-report:Report ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:allValuesFrom ep-report:DailyDrillingReport ;
owl:onProperty ep-report:reportOn
owl:cardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty ep-report:createdAt
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:cardinality "7"^^xsd:nonNegativeInteger ;
owl:onProperty ep-report:reportOn
owl:allValuesFrom xsd:dateTime ;
owl:onProperty ep-report:createdAt
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:allValuesFrom xsd:dateTime ;
owl:onProperty ep-report:createdAt
owl:cardinality "7"^^xsd:nonNegativeInteger ;
owl:onProperty ep-report:reportOn
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:cardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty ep-report:createdAt
owl:allValuesFrom ep-report:DailyDrillingReport ;
owl:onProperty ep-report:reportOn
] .
ep-report:WeeklyReport
rdf:type owl:Class , ep-report:ReportPeriodType ;
rdf:type ep-report:ReportPeriodType , owl:Class ;
rdfs:label "weekly report"^^xsd:string ;
rdfs:subClassOf ep-report:Report .
......@@ -198,7 +198,7 @@ ep-report:WellTestReport
rdfs:subClassOf ep-report:Report .
ep-report:YearlyReport
rdf:type owl:Class , ep-report:ReportPeriodType ;
rdf:type ep-report:ReportPeriodType , owl:Class ;
rdfs:label "yearly report"^^xsd:string ;
rdfs:subClassOf ep-report:Report .
......@@ -211,12 +211,12 @@ ep-report:aliasOwner
rdfs:range <http://www.reportinghub.no/np/schema/npd#Individual> .
ep-report:createdAt
rdf:type owl:DatatypeProperty , owl:FunctionalProperty ;
rdf:type owl:FunctionalProperty , owl:DatatypeProperty ;
rdfs:domain ep-report:Report ;
rdfs:label "created at"^^xsd:string .
ep-report:dailyDrillingReportNumber
rdf:type owl:DatatypeProperty , owl:FunctionalProperty ;
rdf:type owl:FunctionalProperty , owl:DatatypeProperty ;
rdfs:domain ep-report:DailyDrillingReport ;
rdfs:label "daily drilling report number"^^xsd:string .
......@@ -241,7 +241,7 @@ ep-report:disclaimer
rdfs:range xsd:string .
ep-report:hasContent
rdf:type owl:DatatypeProperty , owl:FunctionalProperty ;
rdf:type owl:FunctionalProperty , owl:DatatypeProperty ;
rdfs:domain ep-report:Report ;
rdfs:label "has content"^^xsd:string .
......@@ -250,12 +250,12 @@ ep-report:isAliasFor
rdfs:range <http://www.reportinghub.no/np/schema/npd#Individual> .
ep-report:issuedAt
rdf:type owl:DatatypeProperty , owl:FunctionalProperty ;
rdf:type owl:FunctionalProperty , owl:DatatypeProperty ;
rdfs:domain ep-report:Report ;
rdfs:label "issued at"^^xsd:string .
ep-report:nameAsDatumObject
rdf:type owl:DatatypeProperty , owl:FunctionalProperty ;
rdf:type owl:FunctionalProperty , owl:DatatypeProperty ;
rdfs:domain <http://www.reportinghub.no/ep/schema/core#PhysicalObject> ;
rdfs:label "name as datum object"^^xsd:string .
......@@ -263,3 +263,9 @@ ep-report:reportOn
rdf:type owl:ObjectProperty ;
rdfs:domain ep-report:Report ;
rdfs:label "report on"^^xsd:string .
ep-report:reportSubmittedBy
rdf:type owl:FunctionalProperty , owl:ObjectProperty ;
rdfs:domain ep-report:Report ;
rdfs:label "report submitted by"^^xsd:string ;
rdfs:range <http://www.reportinghub.no/ep/schema/core#PhysicalObject> .
......
......@@ -20,10 +20,8 @@
<http://www.epim.no/schemas/mprml/1#A_Global-Objects>
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001a Create the inteval identifier - dateStart and dateEnd from context"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "intervalIdentifier"^^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/transform/transform-helper-schema#intervalIdentifier> ;
sp:subject spin:_this
]) ;
......@@ -37,10 +35,51 @@
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dateStart"^^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: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
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
])
] ;
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
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
sp:subject spin:_this
]) ;
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
]
......@@ -51,125 +90,82 @@
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:buildIntervalIdentifier ;
sp:arg1 [ sp:varName "dateStart"^^xsd:string
] ;
sp:arg2 [ sp:varName "dateEnd"^^xsd:string
]
] ;
sp:variable
[ sp:varName "intervalIdentifier"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ 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
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
])
] ;
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/report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object _:b1 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
rdfs:comment "STEP 10001z Add the issue date and title"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "month"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#issuedAt> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b1
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
] [ sp:object
[ sp:varName "title"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object
[ sp:varName "contextRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject _:b1
]) ;
sp:where ([ sp:object
[ sp:varName "intervalIdentifier"^^xsd:string
[ sp:varName "contextRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#contextRef> ;
sp:subject spin:_this
] [ rdf:type sp:NotExists ;
sp:elements ([ 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 "something"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "productVolumeRef"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ rdf:type sp:Optional ;
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 "somethingElse"^^xsd:string
[ sp:varName "month"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#month> ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
[ sp:varName "contextRef"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "contextRef"^^xsd:string
[ sp:varName "titleRef"^^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:predicate <http://www.epim.no/schemas/mprml/1#titleRef> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "somethingElseElse"^^xsd:string
[ sp:varName "title"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
[ sp:varName "titleRef"^^xsd:string
]
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-spin-lib:normalizeString ;
sp:arg1 "noInstallation"
] ;
sp:variable
[ sp:varName "normalizedName"^^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:variable
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
])
......@@ -217,7 +213,7 @@
] [ sp:object
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportSubmittedBy> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
......@@ -292,217 +288,111 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001z Add the issue date and title"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "month"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#issuedAt> ;
rdfs:comment "STEP 10001n Set the submitting installation"^^xsd:string ;
sp:templates ([ sp:object _:b1 ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportSubmittedBy> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject _:b1
] [ sp:object
[ sp:varName "title"^^xsd:string
[ sp:varName "installation"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
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> ;
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
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "month"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#month> ;
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: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/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
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/report#ProductionReport> ;
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_report> ;
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:varName "contextRef"^^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:varName "installationRef"^^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/transform/transform-helper-schema#derivedFrom> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "contextRef"^^xsd:string
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject _:b2
]) ;
sp:where ([ sp:object
sp:subject
[ sp:varName "installation"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001a Create the inteval identifier - dateStart and dateEnd from context"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "intervalIdentifier"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
sp:subject spin:_this
] [ 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 "dateStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
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.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
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 "something"^^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> ;
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 "somethingElse"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spl:object ;
sp:arg1 [ sp:varName "installationRef"^^xsd:string
] ;
sp:arg2 <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText>
] ;
sp:variable
[ sp:varName "normalizedInstallationName"^^xsd:string
[ sp:varName "contextRef"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:buildProductionReportURI ;
sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string
[ rdf:type ep-mpr-spin-lib:buildIntervalIdentifier ;
sp:arg1 [ sp:varName "dateStart"^^xsd:string
] ;
sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string
sp:arg2 [ sp:varName "dateEnd"^^xsd:string
]
] ;
sp:variable
[ sp:varName "productionReport"^^xsd:string
[ sp:varName "intervalIdentifier"^^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 productVolume/installation where the installation is a field"^^xsd:string ;
sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/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/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object
[ sp:varName "contextRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject _:b3
]) ;
sp:where ([ sp:object
[ sp:varName "intervalIdentifier"^^xsd:string
......@@ -510,21 +400,21 @@
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "productionOperationRef"^^xsd:string
[ 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_productionOperation> ;
] [ sp:object <http://www.epim.no/schemas/mprml/1#Obj_productVolume> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionOperationRef"^^xsd:string
[ 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 "productionOperationRef"^^xsd:string
[ sp:varName "productVolumeRef"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
......@@ -533,25 +423,11 @@
sp:subject
[ sp:varName "installation"^^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> ;
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 "something"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
] [ sp:object <http://www.epim.no/schemas/mprml/1#RF_field> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#kindRef> ;
sp:subject
[ sp:varName "installationRef"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spl:object ;
......@@ -577,58 +453,20 @@
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001e Create the interval identifier - no date"^^xsd:string ;
sp:templates ([ sp:object "noDate" ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
sp:subject spin:_this
]) ;
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 ;
rdfs:comment "STEP 10020 Add the operator"^^xsd:string ;
sp:templates ([ sp:object _:b2 ;
sp:predicate <http://www.reportinghub.no/ep/schema/facility#facilityOperator> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^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: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
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:subject
[ sp:varName "contextRef"^^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
] [ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ;
sp:predicate rdf:type ;
sp:subject _:b2
] [ sp:object
[ sp:varName "operator"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
sp:subject spin:_this
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b2
]) ;
sp:where ([ sp:object
[ sp:varName "contextRef"^^xsd:string
......@@ -641,121 +479,43 @@
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "date"^^xsd:string
[ sp:varName "operatorRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#date> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#operatorRef> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
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
]
])
])
] ;
spin:rule
[ rdf:type sp:Construct ;
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/report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object _:b4 ;
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 _:b4
] [ sp:object
[ sp:varName "installation"^^xsd:string
[ sp:varName "operatorRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b4
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
[ sp:varName "operator"^^xsd:string
]
] [ sp:object
[ sp:varName "contextRef"^^xsd:string
] ;
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject _:b4
]) ;
sp:where ([ sp:object
[ sp:varName "intervalIdentifier"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
sp:subject spin:_this
] [ 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:varName "productionReport"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#installationRef> ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportSubmittedBy> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object
[ sp:varName "installationRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "installation"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spl:object ;
sp:arg1 [ sp:varName "installationRef"^^xsd:string
] ;
sp:arg2 <http://www.reportinghub.no/ep/transform/transform-helper-schema#hasDerivedText>
] ;
sp:variable
[ sp:varName "normalizedInstallationName"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ep-mpr-spin-lib:buildProductionReportURI ;
sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string
] ;
sp:arg2 [ sp:varName "intervalIdentifier"^^xsd:string
]
] ;
sp:variable
[ sp:varName "productionReport"^^xsd:string
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10001d Create the interval identifier - dateEnd from context"^^xsd:string ;
rdfs:comment "STEP 10001c Create the interval identifier - date from context"^^xsd:string ;
sp:templates ([ sp:object
[ sp:varName "dateEnd"^^xsd:string
[ sp:varName "date"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#intervalIdentifier> ;
sp:subject spin:_this
......@@ -771,94 +531,34 @@
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "dateEnd"^^xsd:string
[ sp:varName "date"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
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 "date"^^xsd:string
[ sp:varName "dateStart"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#date> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object
[ sp:varName "dateStart"^^xsd:string
[ sp:varName "dateEnd"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateStart> ;
sp:predicate <http://www.epim.no/schemas/mprml/1#dateEnd> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
])
])
] ;
spin:rule
[ rdf:type sp:Construct ;
rdfs:comment "STEP 10020 Add the operator"^^xsd:string ;
sp:templates ([ sp:object _:b5 ;
sp:predicate <http://www.reportinghub.no/ep/schema/facility#facilityOperator> ;
sp:subject
[ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/organization#Organization> ;
sp:predicate rdf:type ;
sp:subject _:b5
] [ sp:object
[ sp:varName "operator"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject _:b5
]) ;
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 "operatorRef"^^xsd:string
] ;
sp:predicate <http://www.epim.no/schemas/mprml/1#operatorRef> ;
sp:subject
[ sp:varName "contextRef"^^xsd:string
]
] [ sp:object
[ sp:varName "operatorRef"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
sp:subject
[ sp:varName "operator"^^xsd:string
]
] [ sp:object spin:_this ;
sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#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
]
])
] .
<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> , <http://www.reportinghub.no/ep/transform/transform-helper-schema> ;
owl:imports <http://www.reportinghub.no/ep/transform/transform-helper-schema> , <http://www.reportinghub.no/ep/dpr/spin/1.1/lib> , <http://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 .
......