David Leal

New function in DPR-lib.

...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
20 20
21 <http://www.reportinghub.no/ep/dpr/spin/1.1/lib> 21 <http://www.reportinghub.no/ep/dpr/spin/1.1/lib>
22 rdf:type owl:Ontology ; 22 rdf:type owl:Ontology ;
23 - owl:imports <http://www.reportinghub.no/ep/schema/1.0/production-core> , <http://www.witsml.org/schemas/131/addendum/combo> , <http://www.reportinghub.no/ep/schema/1.0/production> , <http://spinrdf.org/spin> ; 23 + owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/production> , <http://www.witsml.org/schemas/131/addendum/combo> , <http://www.reportinghub.no/ep/schema/1.0/production-core> ;
24 owl:versionInfo "Created with TopBraid Composer"^^xsd:string . 24 owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
25 25
26 ep-dpr-spin-lib:BuildDailyProductionReportURI 26 ep-dpr-spin-lib:BuildDailyProductionReportURI
...@@ -197,6 +197,29 @@ arg3 is end date"""^^xsd:string ; ...@@ -197,6 +197,29 @@ arg3 is end date"""^^xsd:string ;
197 ]) 197 ])
198 ] . 198 ] .
199 199
200 +ep-dpr-spin-lib:buildDailyProductionReportURI
201 + rdf:type spin:Function ;
202 + rdfs:subClassOf ep-dpr-spin-lib:Function ;
203 + spin:body
204 + [ rdf:type sp:Select ;
205 + rdfs:comment """arg1 is the name of the report
206 +arg2 is the report date"""^^xsd:string ;
207 + sp:resultVariables ([ sp:varName "uri"^^xsd:string
208 + ]) ;
209 + sp:where ([ rdf:type sp:Bind ;
210 + sp:expression
211 + [ rdf:type ep-spin-lib:buildURI ;
212 + sp:arg1 "https://www.reportinghub.no/ep/data/dailyProductionReport/" ;
213 + sp:arg2 spin:_arg1 ;
214 + sp:arg3 "$" ;
215 + sp:arg4 spin:_arg2
216 + ] ;
217 + sp:variable
218 + [ sp:varName "uri"^^xsd:string
219 + ]
220 + ])
221 + ] .
222 +
200 ep-dpr-spin-lib:buildFacilityURI 223 ep-dpr-spin-lib:buildFacilityURI
201 rdf:type spin:Function ; 224 rdf:type spin:Function ;
202 rdfs:subClassOf ep-dpr-spin-lib:Function ; 225 rdfs:subClassOf ep-dpr-spin-lib:Function ;
...@@ -4001,6 +4024,78 @@ ep-dpr-spin-lib:selectProductType ...@@ -4001,6 +4024,78 @@ ep-dpr-spin-lib:selectProductType
4001 ]) 4024 ])
4002 ] . 4025 ] .
4003 4026
4027 +ep-dpr-spin-lib:selectProductionActivityType
4028 + rdf:type spin:Function ;
4029 + rdfs:subClassOf ep-dpr-spin-lib:Function ;
4030 + spin:body
4031 + [ rdf:type sp:Select ;
4032 + sp:resultVariables ([ sp:varName "productionActivityType"^^xsd:string
4033 + ]) ;
4034 + sp:where ([ rdf:type sp:Bind ;
4035 + sp:expression
4036 + [ rdf:type sp:if ;
4037 + sp:arg1 [ rdf:type sp:eq ;
4038 + sp:arg1 spin:_arg1 ;
4039 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#OK_production>
4040 + ] ;
4041 + sp:arg2 <http://www.reportinghub.no/ep/schema/activity#ProductionActivity> ;
4042 + sp:arg3 [ rdf:type sp:if ;
4043 + sp:arg1 [ rdf:type sp:eq ;
4044 + sp:arg1 spin:_arg1 ;
4045 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#OK_maintenance>
4046 + ] ;
4047 + sp:arg2 <http://www.reportinghub.no/ep/schema/production-activity#MaintenanceActivity> ;
4048 + sp:arg3 [ rdf:type sp:if ;
4049 + sp:arg1 [ rdf:type sp:eq ;
4050 + sp:arg1 spin:_arg1 ;
4051 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#OK_powerstationfailure>
4052 + ] ;
4053 + sp:arg2 <http://www.reportinghub.no/ep/schema/production-activity#PowerStationFailure> ;
4054 + sp:arg3 [ rdf:type sp:if ;
4055 + sp:arg1 [ rdf:type sp:eq ;
4056 + sp:arg1 spin:_arg1 ;
4057 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#OK_deviations>
4058 + ] ;
4059 + sp:arg2 <http://www.reportinghub.no/ep/schema/production-activity#Deviation> ;
4060 + sp:arg3 [ rdf:type sp:if ;
4061 + sp:arg1 [ rdf:type sp:eq ;
4062 + sp:arg1 spin:_arg1 ;
4063 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#OK_airtraffic>
4064 + ] ;
4065 + sp:arg2 <http://www.reportinghub.no/ep/schema/production-activity#AirTrafficOperation> ;
4066 + sp:arg3 [ rdf:type sp:if ;
4067 + sp:arg1 [ rdf:type sp:eq ;
4068 + sp:arg1 spin:_arg1 ;
4069 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#OK_construction>
4070 + ] ;
4071 + sp:arg2 <http://www.reportinghub.no/ep/schema/production-activity#ConstructionOperation> ;
4072 + sp:arg3 [ rdf:type sp:if ;
4073 + sp:arg1 [ rdf:type sp:eq ;
4074 + sp:arg1 spin:_arg1 ;
4075 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#OK_well>
4076 + ] ;
4077 + sp:arg2 <http://www.reportinghub.no/ep/schema/activity#WellOperation> ;
4078 + sp:arg3 [ rdf:type sp:if ;
4079 + sp:arg1 [ rdf:type sp:eq ;
4080 + sp:arg1 spin:_arg1 ;
4081 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#OK_other>
4082 + ] ;
4083 + sp:arg2 <http://www.reportinghub.no/ep/schema/production-activity#OtherProductionActivity> ;
4084 + sp:arg3 <http://www.reportinghub.no/ep/schema/activity#ProductionActivity>
4085 + ]
4086 + ]
4087 + ]
4088 + ]
4089 + ]
4090 + ]
4091 + ]
4092 + ] ;
4093 + sp:variable
4094 + [ sp:varName "productionActivityType"^^xsd:string
4095 + ]
4096 + ])
4097 + ] .
4098 +
4004 ep-dpr-spin-lib:selectProductionFacilityType 4099 ep-dpr-spin-lib:selectProductionFacilityType
4005 rdf:type spin:Function ; 4100 rdf:type spin:Function ;
4006 rdfs:label "select ProductionFacilityType"^^xsd:string ; 4101 rdfs:label "select ProductionFacilityType"^^xsd:string ;
...@@ -4477,68 +4572,6 @@ ep-dpr-spin-lib:selectProductionFlowPurposeType ...@@ -4477,68 +4572,6 @@ ep-dpr-spin-lib:selectProductionFlowPurposeType
4477 ]) 4572 ])
4478 ] . 4573 ] .
4479 4574
4480 -ep-dpr-spin-lib:selectProductionOperationPartType
4481 - rdf:type spin:Function ;
4482 - rdfs:subClassOf ep-dpr-spin-lib:Function ;
4483 - spin:body
4484 - [ rdf:type sp:Select ;
4485 - sp:resultVariables (_:b28) ;
4486 - sp:where ([ rdf:type sp:Bind ;
4487 - sp:expression
4488 - [ rdf:type sp:if ;
4489 - sp:arg1 [ rdf:type sp:eq ;
4490 - sp:arg1 spin:_arg1 ;
4491 - sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#OK_production>
4492 - ] ;
4493 - sp:arg2 <http://www.reportinghub.no/ep/schema/activity#ProductionActivity> ;
4494 - sp:arg3 [ rdf:type sp:if ;
4495 - sp:arg1 [ rdf:type sp:eq ;
4496 - sp:arg1 spin:_arg1 ;
4497 - sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#OK_maintenance>
4498 - ] ;
4499 - sp:arg2 <http://www.reportinghub.no/ep/schema/production-activity#MaintenanceActivity> ;
4500 - sp:arg3 [ rdf:type sp:if ;
4501 - sp:arg1 [ rdf:type sp:eq ;
4502 - sp:arg1 spin:_arg1 ;
4503 - sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#OK_powerstationfailure>
4504 - ] ;
4505 - sp:arg2 <http://www.reportinghub.no/ep/schema/production-activity#PowerStationFailure> ;
4506 - sp:arg3 [ rdf:type sp:if ;
4507 - sp:arg1 [ rdf:type sp:eq ;
4508 - sp:arg1 spin:_arg1 ;
4509 - sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#OK_deviations>
4510 - ] ;
4511 - sp:arg2 <http://www.reportinghub.no/ep/schema/production-activity#Deviation> ;
4512 - sp:arg3 [ rdf:type sp:if ;
4513 - sp:arg1 [ rdf:type sp:eq ;
4514 - sp:arg1 spin:_arg1 ;
4515 - sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#OK_airtraffic>
4516 - ] ;
4517 - sp:arg2 <http://www.reportinghub.no/ep/schema/production-activity#AirTrafficOperation> ;
4518 - sp:arg3 [ rdf:type sp:if ;
4519 - sp:arg1 [ rdf:type sp:eq ;
4520 - sp:arg1 spin:_arg1 ;
4521 - sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#OK_construction>
4522 - ] ;
4523 - sp:arg2 <http://www.reportinghub.no/ep/schema/production-activity#ConstructionOperation> ;
4524 - sp:arg3 [ rdf:type sp:if ;
4525 - sp:arg1 [ rdf:type sp:eq ;
4526 - sp:arg1 spin:_arg1 ;
4527 - sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#TU_s>
4528 - ] ;
4529 - sp:arg2 <http://www.reportinghub.no/ep/schema/core#second> ;
4530 - sp:arg3 <http://www.reportinghub.no/ep/schema/production-activity#PartOfProductionActivity>
4531 - ]
4532 - ]
4533 - ]
4534 - ]
4535 - ]
4536 - ]
4537 - ] ;
4538 - sp:variable _:b28
4539 - ])
4540 - ] .
4541 -
4542 ep-dpr-spin-lib:selectProductivityIndexScale 4575 ep-dpr-spin-lib:selectProductivityIndexScale
4543 rdf:type spin:Function ; 4576 rdf:type spin:Function ;
4544 rdfs:subClassOf ep-dpr-spin-lib:Function ; 4577 rdfs:subClassOf ep-dpr-spin-lib:Function ;
...@@ -4638,7 +4671,7 @@ ep-dpr-spin-lib:selectRelationshipToMeasure ...@@ -4638,7 +4671,7 @@ ep-dpr-spin-lib:selectRelationshipToMeasure
4638 rdfs:subClassOf ep-dpr-spin-lib:Function ; 4671 rdfs:subClassOf ep-dpr-spin-lib:Function ;
4639 spin:body 4672 spin:body
4640 [ rdf:type sp:Select ; 4673 [ rdf:type sp:Select ;
4641 - sp:resultVariables (_:b29) ; 4674 + sp:resultVariables (_:b28) ;
4642 sp:where ([ rdf:type sp:Bind ; 4675 sp:where ([ rdf:type sp:Bind ;
4643 sp:expression 4676 sp:expression
4644 [ rdf:type sp:if ; 4677 [ rdf:type sp:if ;
...@@ -4712,7 +4745,7 @@ ep-dpr-spin-lib:selectRelationshipToMeasure ...@@ -4712,7 +4745,7 @@ ep-dpr-spin-lib:selectRelationshipToMeasure
4712 ] 4745 ]
4713 ] 4746 ]
4714 ] ; 4747 ] ;
4715 - sp:variable _:b29 4748 + sp:variable _:b28
4716 ]) 4749 ])
4717 ] . 4750 ] .
4718 4751
...@@ -4721,7 +4754,7 @@ ep-dpr-spin-lib:selectSafetyActivityType ...@@ -4721,7 +4754,7 @@ ep-dpr-spin-lib:selectSafetyActivityType
4721 rdfs:subClassOf ep-dpr-spin-lib:Function ; 4754 rdfs:subClassOf ep-dpr-spin-lib:Function ;
4722 spin:body 4755 spin:body
4723 [ rdf:type sp:Select ; 4756 [ rdf:type sp:Select ;
4724 - sp:resultVariables (_:b30) ; 4757 + sp:resultVariables (_:b29) ;
4725 sp:where ([ rdf:type sp:Bind ; 4758 sp:where ([ rdf:type sp:Bind ;
4726 sp:expression 4759 sp:expression
4727 [ rdf:type sp:if ; 4760 [ rdf:type sp:if ;
...@@ -4865,7 +4898,7 @@ ep-dpr-spin-lib:selectSafetyActivityType ...@@ -4865,7 +4898,7 @@ ep-dpr-spin-lib:selectSafetyActivityType
4865 ] 4898 ]
4866 ] 4899 ]
4867 ] ; 4900 ] ;
4868 - sp:variable _:b30 4901 + sp:variable _:b29
4869 ]) 4902 ])
4870 ] . 4903 ] .
4871 4904
...@@ -4875,7 +4908,7 @@ ep-dpr-spin-lib:selectSpecificVolumeScale ...@@ -4875,7 +4908,7 @@ ep-dpr-spin-lib:selectSpecificVolumeScale
4875 rdfs:subClassOf ep-dpr-spin-lib:Function ; 4908 rdfs:subClassOf ep-dpr-spin-lib:Function ;
4876 spin:body 4909 spin:body
4877 [ rdf:type sp:Select ; 4910 [ rdf:type sp:Select ;
4878 - sp:resultVariables (_:b31) ; 4911 + sp:resultVariables (_:b30) ;
4879 sp:where ([ rdf:type sp:Bind ; 4912 sp:where ([ rdf:type sp:Bind ;
4880 sp:expression 4913 sp:expression
4881 [ rdf:type sp:if ; 4914 [ rdf:type sp:if ;
...@@ -4886,7 +4919,7 @@ ep-dpr-spin-lib:selectSpecificVolumeScale ...@@ -4886,7 +4919,7 @@ ep-dpr-spin-lib:selectSpecificVolumeScale
4886 sp:arg2 <http://www.reportinghub.no/ep/schema/core#fractionByVolume> ; 4919 sp:arg2 <http://www.reportinghub.no/ep/schema/core#fractionByVolume> ;
4887 sp:arg3 <http://www.reportinghub.no/ep/schema/core#undefinedScale> 4920 sp:arg3 <http://www.reportinghub.no/ep/schema/core#undefinedScale>
4888 ] ; 4921 ] ;
4889 - sp:variable _:b31 4922 + sp:variable _:b30
4890 ]) 4923 ])
4891 ] . 4924 ] .
4892 4925
...@@ -4896,7 +4929,7 @@ ep-dpr-spin-lib:selectTemperatureScale ...@@ -4896,7 +4929,7 @@ ep-dpr-spin-lib:selectTemperatureScale
4896 rdfs:subClassOf ep-dpr-spin-lib:Function ; 4929 rdfs:subClassOf ep-dpr-spin-lib:Function ;
4897 spin:body 4930 spin:body
4898 [ rdf:type sp:Select ; 4931 [ rdf:type sp:Select ;
4899 - sp:resultVariables (_:b32) ; 4932 + sp:resultVariables (_:b31) ;
4900 sp:where ([ rdf:type sp:Bind ; 4933 sp:where ([ rdf:type sp:Bind ;
4901 sp:expression 4934 sp:expression
4902 [ rdf:type sp:if ; 4935 [ rdf:type sp:if ;
...@@ -4914,7 +4947,7 @@ ep-dpr-spin-lib:selectTemperatureScale ...@@ -4914,7 +4947,7 @@ ep-dpr-spin-lib:selectTemperatureScale
4914 sp:arg3 <http://www.reportinghub.no/ep/schema/core#undefinedScale> 4947 sp:arg3 <http://www.reportinghub.no/ep/schema/core#undefinedScale>
4915 ] 4948 ]
4916 ] ; 4949 ] ;
4917 - sp:variable _:b32 4950 + sp:variable _:b31
4918 ]) 4951 ])
4919 ] . 4952 ] .
4920 4953
...@@ -4924,7 +4957,7 @@ ep-dpr-spin-lib:selectTemporalPartOfAFlowDurationType ...@@ -4924,7 +4957,7 @@ ep-dpr-spin-lib:selectTemporalPartOfAFlowDurationType
4924 rdfs:subClassOf ep-dpr-spin-lib:Function ; 4957 rdfs:subClassOf ep-dpr-spin-lib:Function ;
4925 spin:body 4958 spin:body
4926 [ rdf:type sp:Select ; 4959 [ rdf:type sp:Select ;
4927 - sp:resultVariables (_:b33) ; 4960 + sp:resultVariables (_:b32) ;
4928 sp:where ([ rdf:type sp:Bind ; 4961 sp:where ([ rdf:type sp:Bind ;
4929 sp:expression 4962 sp:expression
4930 [ rdf:type sp:if ; 4963 [ rdf:type sp:if ;
...@@ -4998,7 +5031,7 @@ ep-dpr-spin-lib:selectTemporalPartOfAFlowDurationType ...@@ -4998,7 +5031,7 @@ ep-dpr-spin-lib:selectTemporalPartOfAFlowDurationType
4998 ] 5031 ]
4999 ] 5032 ]
5000 ] ; 5033 ] ;
5001 - sp:variable _:b33 5034 + sp:variable _:b32
5002 ]) 5035 ])
5003 ] . 5036 ] .
5004 5037
...@@ -5007,7 +5040,7 @@ ep-dpr-spin-lib:selectTemporalPartOfActivityDurationType ...@@ -5007,7 +5040,7 @@ ep-dpr-spin-lib:selectTemporalPartOfActivityDurationType
5007 rdfs:subClassOf ep-dpr-spin-lib:Function ; 5040 rdfs:subClassOf ep-dpr-spin-lib:Function ;
5008 spin:body 5041 spin:body
5009 [ rdf:type sp:Select ; 5042 [ rdf:type sp:Select ;
5010 - sp:resultVariables (_:b34) ; 5043 + sp:resultVariables (_:b33) ;
5011 sp:where ([ rdf:type sp:Bind ; 5044 sp:where ([ rdf:type sp:Bind ;
5012 sp:expression 5045 sp:expression
5013 [ rdf:type sp:if ; 5046 [ rdf:type sp:if ;
...@@ -5081,7 +5114,7 @@ ep-dpr-spin-lib:selectTemporalPartOfActivityDurationType ...@@ -5081,7 +5114,7 @@ ep-dpr-spin-lib:selectTemporalPartOfActivityDurationType
5081 ] 5114 ]
5082 ] 5115 ]
5083 ] ; 5116 ] ;
5084 - sp:variable _:b34 5117 + sp:variable _:b33
5085 ]) 5118 ])
5086 ] . 5119 ] .
5087 5120
...@@ -5091,7 +5124,7 @@ ep-dpr-spin-lib:selectVolumeAtStandardTemperaturePressureType ...@@ -5091,7 +5124,7 @@ ep-dpr-spin-lib:selectVolumeAtStandardTemperaturePressureType
5091 rdfs:subClassOf ep-dpr-spin-lib:Function ; 5124 rdfs:subClassOf ep-dpr-spin-lib:Function ;
5092 spin:body 5125 spin:body
5093 [ rdf:type sp:Select ; 5126 [ rdf:type sp:Select ;
5094 - sp:resultVariables (_:b35) ; 5127 + sp:resultVariables (_:b34) ;
5095 sp:where ([ rdf:type sp:Bind ; 5128 sp:where ([ rdf:type sp:Bind ;
5096 sp:expression 5129 sp:expression
5097 [ rdf:type sp:if ; 5130 [ rdf:type sp:if ;
...@@ -5116,7 +5149,7 @@ ep-dpr-spin-lib:selectVolumeAtStandardTemperaturePressureType ...@@ -5116,7 +5149,7 @@ ep-dpr-spin-lib:selectVolumeAtStandardTemperaturePressureType
5116 ] 5149 ]
5117 ] 5150 ]
5118 ] ; 5151 ] ;
5119 - sp:variable _:b35 5152 + sp:variable _:b34
5120 ]) 5153 ])
5121 ] . 5154 ] .
5122 5155
...@@ -5126,7 +5159,7 @@ ep-dpr-spin-lib:selectVolumeFlowRateAtStandardTemperaturePressureType ...@@ -5126,7 +5159,7 @@ ep-dpr-spin-lib:selectVolumeFlowRateAtStandardTemperaturePressureType
5126 rdfs:subClassOf ep-dpr-spin-lib:Function ; 5159 rdfs:subClassOf ep-dpr-spin-lib:Function ;
5127 spin:body 5160 spin:body
5128 [ rdf:type sp:Select ; 5161 [ rdf:type sp:Select ;
5129 - sp:resultVariables (_:b36) ; 5162 + sp:resultVariables (_:b35) ;
5130 sp:where ([ rdf:type sp:Bind ; 5163 sp:where ([ rdf:type sp:Bind ;
5131 sp:expression 5164 sp:expression
5132 [ rdf:type sp:if ; 5165 [ rdf:type sp:if ;
...@@ -5151,7 +5184,7 @@ ep-dpr-spin-lib:selectVolumeFlowRateAtStandardTemperaturePressureType ...@@ -5151,7 +5184,7 @@ ep-dpr-spin-lib:selectVolumeFlowRateAtStandardTemperaturePressureType
5151 ] 5184 ]
5152 ] 5185 ]
5153 ] ; 5186 ] ;
5154 - sp:variable _:b36 5187 + sp:variable _:b35
5155 ]) 5188 ])
5156 ] . 5189 ] .
5157 5190
...@@ -5161,7 +5194,7 @@ ep-dpr-spin-lib:selectVolumeFlowRateScale ...@@ -5161,7 +5194,7 @@ ep-dpr-spin-lib:selectVolumeFlowRateScale
5161 rdfs:subClassOf ep-dpr-spin-lib:Function ; 5194 rdfs:subClassOf ep-dpr-spin-lib:Function ;
5162 spin:body 5195 spin:body
5163 [ rdf:type sp:Select ; 5196 [ rdf:type sp:Select ;
5164 - sp:resultVariables (_:b37) ; 5197 + sp:resultVariables (_:b36) ;
5165 sp:where ([ rdf:type sp:Bind ; 5198 sp:where ([ rdf:type sp:Bind ;
5166 sp:expression 5199 sp:expression
5167 [ rdf:type sp:if ; 5200 [ rdf:type sp:if ;
...@@ -5186,7 +5219,7 @@ ep-dpr-spin-lib:selectVolumeFlowRateScale ...@@ -5186,7 +5219,7 @@ ep-dpr-spin-lib:selectVolumeFlowRateScale
5186 ] 5219 ]
5187 ] 5220 ]
5188 ] ; 5221 ] ;
5189 - sp:variable _:b37 5222 + sp:variable _:b36
5190 ]) 5223 ])
5191 ] . 5224 ] .
5192 5225
...@@ -5196,7 +5229,7 @@ ep-dpr-spin-lib:selectVolumeScale ...@@ -5196,7 +5229,7 @@ ep-dpr-spin-lib:selectVolumeScale
5196 rdfs:subClassOf ep-dpr-spin-lib:Function ; 5229 rdfs:subClassOf ep-dpr-spin-lib:Function ;
5197 spin:body 5230 spin:body
5198 [ rdf:type sp:Select ; 5231 [ rdf:type sp:Select ;
5199 - sp:resultVariables (_:b38) ; 5232 + sp:resultVariables (_:b37) ;
5200 sp:where ([ rdf:type sp:Bind ; 5233 sp:where ([ rdf:type sp:Bind ;
5201 sp:expression 5234 sp:expression
5202 [ rdf:type sp:if ; 5235 [ rdf:type sp:if ;
...@@ -5424,7 +5457,7 @@ ep-dpr-spin-lib:selectVolumeScale ...@@ -5424,7 +5457,7 @@ ep-dpr-spin-lib:selectVolumeScale
5424 ] 5457 ]
5425 ] 5458 ]
5426 ] ; 5459 ] ;
5427 - sp:variable _:b38 5460 + sp:variable _:b37
5428 ]) 5461 ])
5429 ] . 5462 ] .
5430 5463
...@@ -5480,54 +5513,6 @@ ep-dpr-spin-lib:selectWellTestReasonType ...@@ -5480,54 +5513,6 @@ ep-dpr-spin-lib:selectWellTestReasonType
5480 ]) 5513 ])
5481 ] . 5514 ] .
5482 5515
5483 -_:b38
5484 - sp:varName "volumeScale"^^xsd:string .
5485 -
5486 -_:b37
5487 - sp:varName "volumeFlowRateScale"^^xsd:string .
5488 -
5489 -_:b36
5490 - sp:varName "volumeFlowRateAtStdType"^^xsd:string .
5491 -
5492 -_:b35
5493 - sp:varName "volumeAtStdType"^^xsd:string .
5494 -
5495 -_:b34
5496 - sp:varName "prodActType"^^xsd:string .
5497 -
5498 -_:b33
5499 - sp:varName "temporalPartOfAFlowDurationType"^^xsd:string .
5500 -
5501 -_:b32
5502 - sp:varName "temperatureScale"^^xsd:string .
5503 -
5504 -_:b31
5505 - sp:varName "specificVolumeScale"^^xsd:string .
5506 -
5507 -_:b30
5508 - sp:varName "safetyActivityType"^^xsd:string .
5509 -
5510 -_:b29
5511 - sp:varName "relationshipToMeasure"^^xsd:string .
5512 -
5513 -_:b28
5514 - sp:varName "popType"^^xsd:string .
5515 -
5516 -_:b27
5517 - sp:varName "productionFlowPurposeType"^^xsd:string .
5518 -
5519 -_:b26
5520 - sp:varName "productionFlowDirectionRelationshipType"^^xsd:string .
5521 -
5522 -_:b25
5523 - sp:varName "productionFlowDirectionRelationshipType"^^xsd:string .
5524 -
5525 -_:b24
5526 - sp:varName "productionFlowDefinitionType"^^xsd:string .
5527 -
5528 -_:b23
5529 - sp:varName "productionFacilityType"^^xsd:string .
5530 -
5531 _:b22 5516 _:b22
5532 sp:varName "productType"^^xsd:string . 5517 sp:varName "productType"^^xsd:string .
5533 5518
...@@ -5584,3 +5569,48 @@ _:b3 sp:varName "UUID"^^xsd:string . ...@@ -5584,3 +5569,48 @@ _:b3 sp:varName "UUID"^^xsd:string .
5584 _:b2 sp:varName "uri"^^xsd:string . 5569 _:b2 sp:varName "uri"^^xsd:string .
5585 5570
5586 _:b1 sp:varName "uri"^^xsd:string . 5571 _:b1 sp:varName "uri"^^xsd:string .
5572 +
5573 +_:b27
5574 + sp:varName "productionFlowPurposeType"^^xsd:string .
5575 +
5576 +_:b26
5577 + sp:varName "productionFlowDirectionRelationshipType"^^xsd:string .
5578 +
5579 +_:b25
5580 + sp:varName "productionFlowDirectionRelationshipType"^^xsd:string .
5581 +
5582 +_:b24
5583 + sp:varName "productionFlowDefinitionType"^^xsd:string .
5584 +
5585 +_:b28
5586 + sp:varName "relationshipToMeasure"^^xsd:string .
5587 +
5588 +_:b23
5589 + sp:varName "productionFacilityType"^^xsd:string .
5590 +
5591 +_:b29
5592 + sp:varName "safetyActivityType"^^xsd:string .
5593 +
5594 +_:b30
5595 + sp:varName "specificVolumeScale"^^xsd:string .
5596 +
5597 +_:b31
5598 + sp:varName "temperatureScale"^^xsd:string .
5599 +
5600 +_:b32
5601 + sp:varName "temporalPartOfAFlowDurationType"^^xsd:string .
5602 +
5603 +_:b33
5604 + sp:varName "prodActType"^^xsd:string .
5605 +
5606 +_:b34
5607 + sp:varName "volumeAtStdType"^^xsd:string .
5608 +
5609 +_:b35
5610 + sp:varName "volumeFlowRateAtStdType"^^xsd:string .
5611 +
5612 +_:b36
5613 + sp:varName "volumeFlowRateScale"^^xsd:string .
5614 +
5615 +_:b37
5616 + sp:varName "volumeScale"^^xsd:string .
......
...@@ -21,152 +21,112 @@ ...@@ -21,152 +21,112 @@
21 21
22 <http://www.reportinghub.no/ep/transform/1.0/dpr/dailyProductionActivity> 22 <http://www.reportinghub.no/ep/transform/1.0/dpr/dailyProductionActivity>
23 rdf:type owl:Ontology ; 23 rdf:type owl:Ontology ;
24 - owl:imports <http://www.reportinghub.no/ep/schema/1.0/production-well> , <http://www.reportinghub.no/ep/dpr/spin/1.1/lib> , <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://www.reportinghub.no/ep/schema/1.0/production-core> , <http://www.witsml.org/schemas/131/addendum/combo> , <http://spinrdf.org/spin> ; 24 + owl:imports <http://spinrdf.org/spin> , <http://www.witsml.org/schemas/131/addendum/combo> , <http://www.reportinghub.no/ep/schema/1.0/production-core> , <http://www.reportinghub.no/ep/schema/1.0/activity> , <http://www.reportinghub.no/ep/dpr/spin/1.1/lib> , <http://www.reportinghub.no/ep/schema/1.0/production-well> ;
25 owl:versionInfo "Created with TopBraid Composer"^^xsd:string . 25 owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
26 26
27 <http://www.witsml.org/schemas/131/addendum/combo#A_Global-WITSMLComposite> 27 <http://www.witsml.org/schemas/131/addendum/combo#A_Global-WITSMLComposite>
28 spin:rule 28 spin:rule
29 [ rdf:type sp:Construct ; 29 [ rdf:type sp:Construct ;
30 - rdfs:comment "STEP 10003 Set the overall daily activity installation and its operator"^^xsd:string ; 30 + rdfs:comment "STEP 10001 Create the DailyProductionReport"^^xsd:string ;
31 - sp:templates ([ sp:object _:b1 ; 31 + sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/production-report#DailyProductionReport> ;
32 - sp:predicate <http://www.reportinghub.no/ep/schema/production-activity#productionOperator> ; 32 + sp:predicate rdf:type ;
33 sp:subject 33 sp:subject
34 - [ sp:varName "dailyProductionActivity"^^xsd:string 34 + [ sp:varName "dailyProductionReport"^^xsd:string
35 ] 35 ]
36 - ] [ sp:object <http://www.reportinghub.no/ep/schema/organization#Company> ;
37 - sp:predicate rdf:type ;
38 - sp:subject _:b1
39 - ] [ sp:object <http://www.reportinghub.no/np/schema/npd#OperatingCompany> ;
40 - sp:predicate rdf:type ;
41 - sp:subject _:b1
42 ] [ sp:object 36 ] [ sp:object
43 - [ sp:varName "operatorName"^^xsd:string 37 + [ sp:varName "docName"^^xsd:string
44 ] ; 38 ] ;
45 sp:predicate rdfs:label ; 39 sp:predicate rdfs:label ;
46 - sp:subject _:b1
47 - ] [ sp:object _:b2 ;
48 - sp:predicate <http://www.reportinghub.no/ep/schema/production-activity#onProductionFacility> ;
49 sp:subject 40 sp:subject
50 - [ sp:varName "dailyProductionActivity"^^xsd:string 41 + [ sp:varName "dailyProductionReport"^^xsd:string
51 ] 42 ]
52 - ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
53 - sp:predicate rdf:type ;
54 - sp:subject _:b2
55 ] [ sp:object 43 ] [ sp:object
56 - [ sp:varName "productionInstallation"^^xsd:string 44 + [ sp:varName "docDate"^^xsd:string
57 ] ; 45 ] ;
58 - sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; 46 + sp:predicate <http://www.reportinghub.no/ep/schema/production-report#dateCoveredByReport> ;
59 - sp:subject _:b2
60 - ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
61 - sp:predicate rdf:type ;
62 sp:subject 47 sp:subject
63 - [ sp:varName "productionInstallation"^^xsd:string 48 + [ sp:varName "dailyProductionReport"^^xsd:string
64 ] 49 ]
65 ] [ sp:object 50 ] [ sp:object
66 - [ sp:varName "productionInstallationType"^^xsd:string 51 + [ sp:varName "fileCreationDate"^^xsd:string
67 ] ; 52 ] ;
68 - sp:predicate rdf:type ; 53 + sp:predicate <http://www.reportinghub.no/ep/schema/report#createdAt> ;
69 - sp:subject
70 - [ sp:varName "productionInstallation"^^xsd:string
71 - ]
72 - ]) ;
73 - sp:where ([ sp:object spin:_this ;
74 - sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
75 sp:subject 54 sp:subject
76 [ sp:varName "dailyProductionReport"^^xsd:string 55 [ sp:varName "dailyProductionReport"^^xsd:string
77 ] 56 ]
78 - ] [ sp:object 57 + ] [ sp:object spin:_this ;
79 - [ sp:varName "dailyProductionActivity"^^xsd:string 58 + sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
80 - ] ;
81 - sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
82 sp:subject 59 sp:subject
83 [ sp:varName "dailyProductionReport"^^xsd:string 60 [ sp:varName "dailyProductionReport"^^xsd:string
84 ] 61 ]
85 - ] [ sp:object 62 + ]) ;
86 - [ sp:varName "productionOperationSetRef"^^xsd:string 63 + sp:where ([ sp:object
64 + [ sp:varName "documentInfoRef"^^xsd:string
87 ] ; 65 ] ;
88 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#productionOperationSetRef> ; 66 + sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#documentInfoRef> ;
89 sp:subject spin:_this 67 sp:subject spin:_this
90 ] [ sp:object 68 ] [ sp:object
91 - [ sp:varName "productionOperationRef"^^xsd:string 69 + [ sp:varName "documentNameRef"^^xsd:string
92 - ] ;
93 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#productionOperationRef> ;
94 - sp:subject
95 - [ sp:varName "productionOperationSetRef"^^xsd:string
96 - ]
97 - ] [ rdf:type sp:Optional ;
98 - sp:elements ([ sp:object
99 - [ sp:varName "installationRef"^^xsd:string
100 ] ; 70 ] ;
101 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#installationRef> ; 71 + sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#documentNameRef> ;
102 sp:subject 72 sp:subject
103 - [ sp:varName "productionOperationRef"^^xsd:string 73 + [ sp:varName "documentInfoRef"^^xsd:string
104 ] 74 ]
105 ] [ sp:object 75 ] [ sp:object
106 - [ sp:varName "installationName"^^xsd:string 76 + [ sp:varName "documentName"^^xsd:string
107 ] ; 77 ] ;
108 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 78 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
109 sp:subject 79 sp:subject
110 - [ sp:varName "installationRef"^^xsd:string 80 + [ sp:varName "documentNameRef"^^xsd:string
111 ] 81 ]
112 - ] [ rdf:type sp:Optional ; 82 + ] [ sp:object
113 - sp:elements ([ sp:object 83 + [ sp:varName "documentDate"^^xsd:string
114 - [ sp:varName "installationKind"^^xsd:string
115 ] ; 84 ] ;
116 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kindRef> ; 85 + sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#documentDate> ;
117 sp:subject 86 sp:subject
118 - [ sp:varName "installationRef"^^xsd:string 87 + [ sp:varName "documentInfoRef"^^xsd:string
119 ] 88 ]
120 - ])
121 - ])
122 ] [ rdf:type sp:Optional ; 89 ] [ rdf:type sp:Optional ;
123 sp:elements ([ sp:object 90 sp:elements ([ sp:object
124 - [ sp:varName "operator"^^xsd:string 91 + [ sp:varName "fileCreationInformationRef"^^xsd:string
125 ] ; 92 ] ;
126 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#operatorRef> ; 93 + sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#fileCreationInformationRef> ;
127 sp:subject 94 sp:subject
128 - [ sp:varName "productionOperationRef"^^xsd:string 95 + [ sp:varName "documentInfoRe"^^xsd:string
129 ] 96 ]
130 ] [ sp:object 97 ] [ sp:object
131 - [ sp:varName "operatorName"^^xsd:string 98 + [ sp:varName "fileCreationDate"^^xsd:string
132 ] ; 99 ] ;
133 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#name> ; 100 + sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#fileCreationDate> ;
134 sp:subject 101 sp:subject
135 - [ sp:varName "operator"^^xsd:string 102 + [ sp:varName "fileCreationInformationRef"^^xsd:string
136 ] 103 ]
137 ]) 104 ])
138 ] [ rdf:type sp:Bind ; 105 ] [ rdf:type sp:Bind ;
139 sp:expression 106 sp:expression
140 [ rdf:type ep-spin-lib:normalizeString ; 107 [ rdf:type ep-spin-lib:normalizeString ;
141 - sp:arg1 [ sp:varName "installationName"^^xsd:string 108 + sp:arg1 [ sp:varName "documentName"^^xsd:string
142 ] 109 ]
143 ] ; 110 ] ;
144 sp:variable 111 sp:variable
145 - [ sp:varName "normalizedInstallationName"^^xsd:string 112 + [ sp:varName "normalizedDocumentName"^^xsd:string
146 ] 113 ]
147 ] [ rdf:type sp:Bind ; 114 ] [ rdf:type sp:Bind ;
148 sp:expression 115 sp:expression
149 - [ rdf:type ep-dpr-spin-lib:buildProductionFacilityURI ; 116 + [ rdf:type ep-dpr-spin-lib:buildDailyProductionReportURI ;
150 - sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string 117 + sp:arg1 [ sp:varName "normalizedDocumentName"^^xsd:string
151 - ]
152 ] ; 118 ] ;
153 - sp:variable 119 + sp:arg2 [ sp:varName "documentDate"^^xsd:string
154 - [ sp:varName "productionInstallation"^^xsd:string
155 - ]
156 - ] [ rdf:type sp:Bind ;
157 - sp:expression
158 - [ rdf:type ep-dpr-spin-lib:selectProductionFacilityType ;
159 - sp:arg1 [ sp:varName "installationKind"^^xsd:string
160 ] 120 ]
161 ] ; 121 ] ;
162 sp:variable 122 sp:variable
163 - [ sp:varName "productionInstallationType"^^xsd:string 123 + [ sp:varName "dailyProductionReport"^^xsd:string
164 ] 124 ]
165 ]) 125 ])
166 ] ; 126 ] ;
167 spin:rule 127 spin:rule
168 [ rdf:type sp:Construct ; 128 [ rdf:type sp:Construct ;
169 - rdfs:comment """STEP 10002b Create the DailyProductionActivity - start and end dates 129 + rdfs:comment """STEP 10002a Create the DailyProductionActivity - start and end date-times
170 The DPR transform will fall in a heap unless productionOperation/installationRef is supplied. The XML schema says it is optional."""^^xsd:string ; 130 The DPR transform will fall in a heap unless productionOperation/installationRef is supplied. The XML schema says it is optional."""^^xsd:string ;
171 sp:templates ([ sp:object 131 sp:templates ([ sp:object
172 [ sp:varName "dailyProductionActivity"^^xsd:string 132 [ sp:varName "dailyProductionActivity"^^xsd:string
...@@ -181,14 +141,14 @@ The DPR transform will fall in a heap unless productionOperation/installationRef ...@@ -181,14 +141,14 @@ The DPR transform will fall in a heap unless productionOperation/installationRef
181 [ sp:varName "dailyProductionActivity"^^xsd:string 141 [ sp:varName "dailyProductionActivity"^^xsd:string
182 ] 142 ]
183 ] [ sp:object 143 ] [ sp:object
184 - [ sp:varName "startDate"^^xsd:string 144 + [ sp:varName "startDateTime"^^xsd:string
185 ] ; 145 ] ;
186 sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; 146 sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
187 sp:subject 147 sp:subject
188 [ sp:varName "dailyProductionActivity"^^xsd:string 148 [ sp:varName "dailyProductionActivity"^^xsd:string
189 ] 149 ]
190 ] [ sp:object 150 ] [ sp:object
191 - [ sp:varName "endDate"^^xsd:string 151 + [ sp:varName "endDateTime"^^xsd:string
192 ] ; 152 ] ;
193 sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; 153 sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
194 sp:subject 154 sp:subject
...@@ -200,7 +160,7 @@ The DPR transform will fall in a heap unless productionOperation/installationRef ...@@ -200,7 +160,7 @@ The DPR transform will fall in a heap unless productionOperation/installationRef
200 [ sp:varName "annualProductionActivityToDate"^^xsd:string 160 [ sp:varName "annualProductionActivityToDate"^^xsd:string
201 ] 161 ]
202 ] [ sp:object 162 ] [ sp:object
203 - [ sp:varName "endDate"^^xsd:string 163 + [ sp:varName "endDateTime"^^xsd:string
204 ] ; 164 ] ;
205 sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; 165 sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
206 sp:subject 166 sp:subject
...@@ -219,7 +179,7 @@ The DPR transform will fall in a heap unless productionOperation/installationRef ...@@ -219,7 +179,7 @@ The DPR transform will fall in a heap unless productionOperation/installationRef
219 [ sp:varName "dailyProductionActivity"^^xsd:string 179 [ sp:varName "dailyProductionActivity"^^xsd:string
220 ] 180 ]
221 ] [ sp:object 181 ] [ sp:object
222 - [ sp:varName "endDate"^^xsd:string 182 + [ sp:varName "endDateTime"^^xsd:string
223 ] ; 183 ] ;
224 sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; 184 sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
225 sp:subject 185 sp:subject
...@@ -272,16 +232,16 @@ The DPR transform will fall in a heap unless productionOperation/installationRef ...@@ -272,16 +232,16 @@ The DPR transform will fall in a heap unless productionOperation/installationRef
272 [ sp:varName "installationRef"^^xsd:string 232 [ sp:varName "installationRef"^^xsd:string
273 ] 233 ]
274 ] [ sp:object 234 ] [ sp:object
275 - [ sp:varName "startDate"^^xsd:string 235 + [ sp:varName "startDateTime"^^xsd:string
276 ] ; 236 ] ;
277 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dateStart> ; 237 + sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dTimStart> ;
278 sp:subject 238 sp:subject
279 [ sp:varName "productionOperationRef"^^xsd:string 239 [ sp:varName "productionOperationRef"^^xsd:string
280 ] 240 ]
281 ] [ sp:object 241 ] [ sp:object
282 - [ sp:varName "endDate"^^xsd:string 242 + [ sp:varName "endDateTime"^^xsd:string
283 ] ; 243 ] ;
284 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dateEnd> ; 244 + sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dTimEnd> ;
285 sp:subject 245 sp:subject
286 [ sp:varName "productionOperationRef"^^xsd:string 246 [ sp:varName "productionOperationRef"^^xsd:string
287 ] 247 ]
...@@ -301,7 +261,7 @@ The DPR transform will fall in a heap unless productionOperation/installationRef ...@@ -301,7 +261,7 @@ The DPR transform will fall in a heap unless productionOperation/installationRef
301 ] ; 261 ] ;
302 sp:arg2 [ sp:varName "startDateTime"^^xsd:string 262 sp:arg2 [ sp:varName "startDateTime"^^xsd:string
303 ] ; 263 ] ;
304 - sp:arg3 [ sp:varName "endDate"^^xsd:string 264 + sp:arg3 [ sp:varName "endDateTime"^^xsd:string
305 ] 265 ]
306 ] ; 266 ] ;
307 sp:variable 267 sp:variable
...@@ -312,7 +272,7 @@ The DPR transform will fall in a heap unless productionOperation/installationRef ...@@ -312,7 +272,7 @@ The DPR transform will fall in a heap unless productionOperation/installationRef
312 [ rdf:type ep-dpr-spin-lib:buildAnnualProductionActivityToEndOfPeriodURI ; 272 [ rdf:type ep-dpr-spin-lib:buildAnnualProductionActivityToEndOfPeriodURI ;
313 sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string 273 sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string
314 ] ; 274 ] ;
315 - sp:arg2 [ sp:varName "endDate"^^xsd:string 275 + sp:arg2 [ sp:varName "endDateTime"^^xsd:string
316 ] 276 ]
317 ] ; 277 ] ;
318 sp:variable 278 sp:variable
...@@ -323,7 +283,7 @@ The DPR transform will fall in a heap unless productionOperation/installationRef ...@@ -323,7 +283,7 @@ The DPR transform will fall in a heap unless productionOperation/installationRef
323 [ rdf:type ep-dpr-spin-lib:buildProductionActivityToDateURI ; 283 [ rdf:type ep-dpr-spin-lib:buildProductionActivityToDateURI ;
324 sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string 284 sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string
325 ] ; 285 ] ;
326 - sp:arg2 [ sp:varName "endDate"^^xsd:string 286 + sp:arg2 [ sp:varName "endDateTime"^^xsd:string
327 ] 287 ]
328 ] ; 288 ] ;
329 sp:variable 289 sp:variable
...@@ -333,106 +293,7 @@ The DPR transform will fall in a heap unless productionOperation/installationRef ...@@ -333,106 +293,7 @@ The DPR transform will fall in a heap unless productionOperation/installationRef
333 ] ; 293 ] ;
334 spin:rule 294 spin:rule
335 [ rdf:type sp:Construct ; 295 [ rdf:type sp:Construct ;
336 - rdfs:comment "STEP 10001 Create the DailyProductionReport"^^xsd:string ; 296 + rdfs:comment """STEP 10002b Create the DailyProductionActivity - start and end dates
337 - sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/production-report#DailyProductionReport> ;
338 - sp:predicate rdf:type ;
339 - sp:subject
340 - [ sp:varName "dailyProductionReport"^^xsd:string
341 - ]
342 - ] [ sp:object
343 - [ sp:varName "docName"^^xsd:string
344 - ] ;
345 - sp:predicate rdfs:label ;
346 - sp:subject
347 - [ sp:varName "dailyProductionReport"^^xsd:string
348 - ]
349 - ] [ sp:object
350 - [ sp:varName "docDate"^^xsd:string
351 - ] ;
352 - sp:predicate <http://www.reportinghub.no/ep/schema/production-report#dateCoveredByReport> ;
353 - sp:subject
354 - [ sp:varName "dailyProductionReport"^^xsd:string
355 - ]
356 - ] [ sp:object
357 - [ sp:varName "fileCreationDate"^^xsd:string
358 - ] ;
359 - sp:predicate <http://www.reportinghub.no/ep/schema/report#createdAt> ;
360 - sp:subject
361 - [ sp:varName "dailyProductionReport"^^xsd:string
362 - ]
363 - ] [ sp:object spin:_this ;
364 - sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
365 - sp:subject
366 - [ sp:varName "dailyProductionReport"^^xsd:string
367 - ]
368 - ]) ;
369 - sp:where ([ sp:object
370 - [ sp:varName "documentInfoRef"^^xsd:string
371 - ] ;
372 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#documentInfoRef> ;
373 - sp:subject spin:_this
374 - ] [ sp:object
375 - [ sp:varName "documentNameRef"^^xsd:string
376 - ] ;
377 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#documentNameRef> ;
378 - sp:subject
379 - [ sp:varName "documentInfoRef"^^xsd:string
380 - ]
381 - ] [ sp:object
382 - [ sp:varName "documentName"^^xsd:string
383 - ] ;
384 - sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
385 - sp:subject
386 - [ sp:varName "documentNameRef"^^xsd:string
387 - ]
388 - ] [ sp:object
389 - [ sp:varName "documentDate"^^xsd:string
390 - ] ;
391 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#documentDate> ;
392 - sp:subject
393 - [ sp:varName "documentInfoRef"^^xsd:string
394 - ]
395 - ] [ rdf:type sp:Optional ;
396 - sp:elements ([ sp:object
397 - [ sp:varName "fileCreationInformationRef"^^xsd:string
398 - ] ;
399 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#fileCreationInformationRef> ;
400 - sp:subject
401 - [ sp:varName "documentInfoRe"^^xsd:string
402 - ]
403 - ] [ sp:object
404 - [ sp:varName "fileCreationDate"^^xsd:string
405 - ] ;
406 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#fileCreationDate> ;
407 - sp:subject
408 - [ sp:varName "fileCreationInformationRef"^^xsd:string
409 - ]
410 - ])
411 - ] [ rdf:type sp:Bind ;
412 - sp:expression
413 - [ rdf:type ep-spin-lib:normalizeString ;
414 - sp:arg1 [ sp:varName "documentName"^^xsd:string
415 - ]
416 - ] ;
417 - sp:variable
418 - [ sp:varName "normalizedDocumentName"^^xsd:string
419 - ]
420 - ] [ rdf:type sp:Bind ;
421 - sp:expression
422 - [ rdf:type ep-spin-lib:buildDailyProductionReportURI ;
423 - sp:arg1 [ sp:varName "normalizedDocumentName"^^xsd:string
424 - ] ;
425 - sp:arg2 [ sp:varName "documentDate"^^xsd:string
426 - ]
427 - ] ;
428 - sp:variable
429 - [ sp:varName "dailyProductionReport"^^xsd:string
430 - ]
431 - ])
432 - ] ;
433 - spin:rule
434 - [ rdf:type sp:Construct ;
435 - rdfs:comment """STEP 10002a Create the DailyProductionActivity - start and end date-times
436 The DPR transform will fall in a heap unless productionOperation/installationRef is supplied. The XML schema says it is optional."""^^xsd:string ; 297 The DPR transform will fall in a heap unless productionOperation/installationRef is supplied. The XML schema says it is optional."""^^xsd:string ;
437 sp:templates ([ sp:object 298 sp:templates ([ sp:object
438 [ sp:varName "dailyProductionActivity"^^xsd:string 299 [ sp:varName "dailyProductionActivity"^^xsd:string
...@@ -447,14 +308,14 @@ The DPR transform will fall in a heap unless productionOperation/installationRef ...@@ -447,14 +308,14 @@ The DPR transform will fall in a heap unless productionOperation/installationRef
447 [ sp:varName "dailyProductionActivity"^^xsd:string 308 [ sp:varName "dailyProductionActivity"^^xsd:string
448 ] 309 ]
449 ] [ sp:object 310 ] [ sp:object
450 - [ sp:varName "startDateTime"^^xsd:string 311 + [ sp:varName "startDate"^^xsd:string
451 ] ; 312 ] ;
452 sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ; 313 sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
453 sp:subject 314 sp:subject
454 [ sp:varName "dailyProductionActivity"^^xsd:string 315 [ sp:varName "dailyProductionActivity"^^xsd:string
455 ] 316 ]
456 ] [ sp:object 317 ] [ sp:object
457 - [ sp:varName "endDateTime"^^xsd:string 318 + [ sp:varName "endDate"^^xsd:string
458 ] ; 319 ] ;
459 sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; 320 sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
460 sp:subject 321 sp:subject
...@@ -466,7 +327,7 @@ The DPR transform will fall in a heap unless productionOperation/installationRef ...@@ -466,7 +327,7 @@ The DPR transform will fall in a heap unless productionOperation/installationRef
466 [ sp:varName "annualProductionActivityToDate"^^xsd:string 327 [ sp:varName "annualProductionActivityToDate"^^xsd:string
467 ] 328 ]
468 ] [ sp:object 329 ] [ sp:object
469 - [ sp:varName "endDateTime"^^xsd:string 330 + [ sp:varName "endDate"^^xsd:string
470 ] ; 331 ] ;
471 sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; 332 sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
472 sp:subject 333 sp:subject
...@@ -485,7 +346,7 @@ The DPR transform will fall in a heap unless productionOperation/installationRef ...@@ -485,7 +346,7 @@ The DPR transform will fall in a heap unless productionOperation/installationRef
485 [ sp:varName "dailyProductionActivity"^^xsd:string 346 [ sp:varName "dailyProductionActivity"^^xsd:string
486 ] 347 ]
487 ] [ sp:object 348 ] [ sp:object
488 - [ sp:varName "endDateTime"^^xsd:string 349 + [ sp:varName "endDate"^^xsd:string
489 ] ; 350 ] ;
490 sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ; 351 sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
491 sp:subject 352 sp:subject
...@@ -538,16 +399,16 @@ The DPR transform will fall in a heap unless productionOperation/installationRef ...@@ -538,16 +399,16 @@ The DPR transform will fall in a heap unless productionOperation/installationRef
538 [ sp:varName "installationRef"^^xsd:string 399 [ sp:varName "installationRef"^^xsd:string
539 ] 400 ]
540 ] [ sp:object 401 ] [ sp:object
541 - [ sp:varName "startDateTime"^^xsd:string 402 + [ sp:varName "startDate"^^xsd:string
542 ] ; 403 ] ;
543 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dTimStart> ; 404 + sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dateStart> ;
544 sp:subject 405 sp:subject
545 [ sp:varName "productionOperationRef"^^xsd:string 406 [ sp:varName "productionOperationRef"^^xsd:string
546 ] 407 ]
547 ] [ sp:object 408 ] [ sp:object
548 - [ sp:varName "endDateTime"^^xsd:string 409 + [ sp:varName "endDate"^^xsd:string
549 ] ; 410 ] ;
550 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dTimEnd> ; 411 + sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dateEnd> ;
551 sp:subject 412 sp:subject
552 [ sp:varName "productionOperationRef"^^xsd:string 413 [ sp:varName "productionOperationRef"^^xsd:string
553 ] 414 ]
...@@ -567,7 +428,7 @@ The DPR transform will fall in a heap unless productionOperation/installationRef ...@@ -567,7 +428,7 @@ The DPR transform will fall in a heap unless productionOperation/installationRef
567 ] ; 428 ] ;
568 sp:arg2 [ sp:varName "startDateTime"^^xsd:string 429 sp:arg2 [ sp:varName "startDateTime"^^xsd:string
569 ] ; 430 ] ;
570 - sp:arg3 [ sp:varName "endDateTime"^^xsd:string 431 + sp:arg3 [ sp:varName "endDate"^^xsd:string
571 ] 432 ]
572 ] ; 433 ] ;
573 sp:variable 434 sp:variable
...@@ -578,7 +439,7 @@ The DPR transform will fall in a heap unless productionOperation/installationRef ...@@ -578,7 +439,7 @@ The DPR transform will fall in a heap unless productionOperation/installationRef
578 [ rdf:type ep-dpr-spin-lib:buildAnnualProductionActivityToEndOfPeriodURI ; 439 [ rdf:type ep-dpr-spin-lib:buildAnnualProductionActivityToEndOfPeriodURI ;
579 sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string 440 sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string
580 ] ; 441 ] ;
581 - sp:arg2 [ sp:varName "endDateTime"^^xsd:string 442 + sp:arg2 [ sp:varName "endDate"^^xsd:string
582 ] 443 ]
583 ] ; 444 ] ;
584 sp:variable 445 sp:variable
...@@ -589,11 +450,150 @@ The DPR transform will fall in a heap unless productionOperation/installationRef ...@@ -589,11 +450,150 @@ The DPR transform will fall in a heap unless productionOperation/installationRef
589 [ rdf:type ep-dpr-spin-lib:buildProductionActivityToDateURI ; 450 [ rdf:type ep-dpr-spin-lib:buildProductionActivityToDateURI ;
590 sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string 451 sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string
591 ] ; 452 ] ;
592 - sp:arg2 [ sp:varName "endDateTime"^^xsd:string 453 + sp:arg2 [ sp:varName "endDate"^^xsd:string
593 ] 454 ]
594 ] ; 455 ] ;
595 sp:variable 456 sp:variable
596 [ sp:varName "productionActivityToDate"^^xsd:string 457 [ sp:varName "productionActivityToDate"^^xsd:string
597 ] 458 ]
598 ]) 459 ])
460 + ] ;
461 + spin:rule
462 + [ rdf:type sp:Construct ;
463 + rdfs:comment "STEP 10003 Set the overall daily activity installation and its operator"^^xsd:string ;
464 + sp:templates ([ sp:object _:b1 ;
465 + sp:predicate <http://www.reportinghub.no/ep/schema/production-activity#productionOperator> ;
466 + sp:subject
467 + [ sp:varName "dailyProductionActivity"^^xsd:string
468 + ]
469 + ] [ sp:object <http://www.reportinghub.no/ep/schema/organization#Company> ;
470 + sp:predicate rdf:type ;
471 + sp:subject _:b1
472 + ] [ sp:object <http://www.reportinghub.no/np/schema/npd#OperatingCompany> ;
473 + sp:predicate rdf:type ;
474 + sp:subject _:b1
475 + ] [ sp:object
476 + [ sp:varName "operatorName"^^xsd:string
477 + ] ;
478 + sp:predicate rdfs:label ;
479 + sp:subject _:b1
480 + ] [ sp:object _:b2 ;
481 + sp:predicate <http://www.reportinghub.no/ep/schema/production-activity#onProductionFacility> ;
482 + sp:subject
483 + [ sp:varName "dailyProductionActivity"^^xsd:string
484 + ]
485 + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
486 + sp:predicate rdf:type ;
487 + sp:subject _:b2
488 + ] [ sp:object
489 + [ sp:varName "productionInstallation"^^xsd:string
490 + ] ;
491 + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
492 + sp:subject _:b2
493 + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
494 + sp:predicate rdf:type ;
495 + sp:subject
496 + [ sp:varName "productionInstallation"^^xsd:string
497 + ]
498 + ] [ sp:object
499 + [ sp:varName "productionInstallationType"^^xsd:string
500 + ] ;
501 + sp:predicate rdf:type ;
502 + sp:subject
503 + [ sp:varName "productionInstallation"^^xsd:string
504 + ]
505 + ]) ;
506 + sp:where ([ sp:object spin:_this ;
507 + sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
508 + sp:subject
509 + [ sp:varName "dailyProductionReport"^^xsd:string
510 + ]
511 + ] [ sp:object
512 + [ sp:varName "dailyProductionActivity"^^xsd:string
513 + ] ;
514 + sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
515 + sp:subject
516 + [ sp:varName "dailyProductionReport"^^xsd:string
517 + ]
518 + ] [ sp:object
519 + [ sp:varName "productionOperationSetRef"^^xsd:string
520 + ] ;
521 + sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#productionOperationSetRef> ;
522 + sp:subject spin:_this
523 + ] [ sp:object
524 + [ sp:varName "productionOperationRef"^^xsd:string
525 + ] ;
526 + sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#productionOperationRef> ;
527 + sp:subject
528 + [ sp:varName "productionOperationSetRef"^^xsd:string
529 + ]
530 + ] [ rdf:type sp:Optional ;
531 + sp:elements ([ sp:object
532 + [ sp:varName "installationRef"^^xsd:string
533 + ] ;
534 + sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#installationRef> ;
535 + sp:subject
536 + [ sp:varName "productionOperationRef"^^xsd:string
537 + ]
538 + ] [ sp:object
539 + [ sp:varName "installationName"^^xsd:string
540 + ] ;
541 + sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
542 + sp:subject
543 + [ sp:varName "installationRef"^^xsd:string
544 + ]
545 + ] [ rdf:type sp:Optional ;
546 + sp:elements ([ sp:object
547 + [ sp:varName "installationKind"^^xsd:string
548 + ] ;
549 + sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kindRef> ;
550 + sp:subject
551 + [ sp:varName "installationRef"^^xsd:string
552 + ]
553 + ])
554 + ])
555 + ] [ rdf:type sp:Optional ;
556 + sp:elements ([ sp:object
557 + [ sp:varName "operator"^^xsd:string
558 + ] ;
559 + sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#operatorRef> ;
560 + sp:subject
561 + [ sp:varName "productionOperationRef"^^xsd:string
562 + ]
563 + ] [ sp:object
564 + [ sp:varName "operatorName"^^xsd:string
565 + ] ;
566 + sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#name> ;
567 + sp:subject
568 + [ sp:varName "operator"^^xsd:string
569 + ]
570 + ])
571 + ] [ rdf:type sp:Bind ;
572 + sp:expression
573 + [ rdf:type ep-spin-lib:normalizeString ;
574 + sp:arg1 [ sp:varName "installationName"^^xsd:string
575 + ]
576 + ] ;
577 + sp:variable
578 + [ sp:varName "normalizedInstallationName"^^xsd:string
579 + ]
580 + ] [ rdf:type sp:Bind ;
581 + sp:expression
582 + [ rdf:type ep-dpr-spin-lib:buildProductionFacilityURI ;
583 + sp:arg1 [ sp:varName "normalizedInstallationName"^^xsd:string
584 + ]
585 + ] ;
586 + sp:variable
587 + [ sp:varName "productionInstallation"^^xsd:string
588 + ]
589 + ] [ rdf:type sp:Bind ;
590 + sp:expression
591 + [ rdf:type ep-dpr-spin-lib:selectProductionFacilityType ;
592 + sp:arg1 [ sp:varName "installationKind"^^xsd:string
593 + ]
594 + ] ;
595 + sp:variable
596 + [ sp:varName "productionInstallationType"^^xsd:string
597 + ]
598 + ])
599 ] . 599 ] .
......