David Leal

Minor bug fixes

...@@ -156,7 +156,7 @@ ep-dpr-spin-lib:buildChemicalTypeURI ...@@ -156,7 +156,7 @@ ep-dpr-spin-lib:buildChemicalTypeURI
156 sp:where ([ rdf:type sp:Bind ; 156 sp:where ([ rdf:type sp:Bind ;
157 sp:expression 157 sp:expression
158 [ rdf:type ep-spin-lib:buildURI ; 158 [ rdf:type ep-spin-lib:buildURI ;
159 - sp:arg1 "https://www.reportinghub.no/ep/data/chemical/" ; 159 + sp:arg1 "https://www.reportinghub.no/ep/data/chemicalType/" ;
160 sp:arg2 [ rdf:type ep-spin-lib:normalizeString ; 160 sp:arg2 [ rdf:type ep-spin-lib:normalizeString ;
161 sp:arg1 spin:_arg1 161 sp:arg1 spin:_arg1
162 ] 162 ]
...@@ -641,30 +641,13 @@ ep-dpr-spin-lib:buildProductionFlowName ...@@ -641,30 +641,13 @@ ep-dpr-spin-lib:buildProductionFlowName
641 ]) ; 641 ]) ;
642 sp:where ([ rdf:type sp:Bind ; 642 sp:where ([ rdf:type sp:Bind ;
643 sp:expression 643 sp:expression
644 - [ rdf:type sp:if ; 644 + [ rdf:type fn:concat ;
645 - sp:arg1 [ rdf:type sp:eq ;
646 - sp:arg1 spin:_arg3 ;
647 - sp:arg2 ""
648 - ] ;
649 - sp:arg2 [ rdf:type fn:concat ;
650 sp:arg1 spin:_arg1 ; 645 sp:arg1 spin:_arg1 ;
651 sp:arg2 "$" ; 646 sp:arg2 "$" ;
652 sp:arg3 [ rdf:type ep-spin-lib:normalizeString ; 647 sp:arg3 [ rdf:type ep-spin-lib:normalizeString ;
653 sp:arg1 spin:_arg2 648 sp:arg1 spin:_arg2
654 ] 649 ]
655 ] ; 650 ] ;
656 - sp:arg3 [ rdf:type fn:concat ;
657 - sp:arg1 spin:_arg1 ;
658 - sp:arg2 "$" ;
659 - sp:arg3 [ rdf:type ep-spin-lib:normalizeString ;
660 - sp:arg1 spin:_arg2
661 - ] ;
662 - sp:arg4 "$" ;
663 - sp:arg5 [ rdf:type ep-spin-lib:normalizeString ;
664 - sp:arg1 spin:_arg3
665 - ]
666 - ]
667 - ] ;
668 sp:variable 651 sp:variable
669 [ sp:varName "name"^^xsd:string 652 [ sp:varName "name"^^xsd:string
670 ] 653 ]
...@@ -681,12 +664,7 @@ ep-dpr-spin-lib:buildProductionFlowURI ...@@ -681,12 +664,7 @@ ep-dpr-spin-lib:buildProductionFlowURI
681 ]) ; 664 ]) ;
682 sp:where ([ rdf:type sp:Bind ; 665 sp:where ([ rdf:type sp:Bind ;
683 sp:expression 666 sp:expression
684 - [ rdf:type sp:if ; 667 + [ rdf:type ep-spin-lib:buildURI ;
685 - sp:arg1 [ rdf:type sp:eq ;
686 - sp:arg1 spin:_arg3 ;
687 - sp:arg2 ""
688 - ] ;
689 - sp:arg2 [ rdf:type ep-spin-lib:buildURI ;
690 sp:arg1 "https://www.reportinghub.no/ep/data/productionFlow/" ; 668 sp:arg1 "https://www.reportinghub.no/ep/data/productionFlow/" ;
691 sp:arg2 [ rdf:type fn:concat ; 669 sp:arg2 [ rdf:type fn:concat ;
692 sp:arg1 spin:_arg1 ; 670 sp:arg1 spin:_arg1 ;
...@@ -694,17 +672,6 @@ ep-dpr-spin-lib:buildProductionFlowURI ...@@ -694,17 +672,6 @@ ep-dpr-spin-lib:buildProductionFlowURI
694 sp:arg3 spin:_arg2 672 sp:arg3 spin:_arg2
695 ] 673 ]
696 ] ; 674 ] ;
697 - sp:arg3 [ rdf:type ep-spin-lib:buildURI ;
698 - sp:arg1 "https://www.reportinghub.no/ep/data/productionFlow/" ;
699 - sp:arg2 [ rdf:type fn:concat ;
700 - sp:arg1 spin:_arg1 ;
701 - sp:arg2 "$" ;
702 - sp:arg3 spin:_arg2 ;
703 - sp:arg4 "$" ;
704 - sp:arg5 spin:_arg3
705 - ]
706 - ]
707 - ] ;
708 sp:variable 675 sp:variable
709 [ sp:varName "uri"^^xsd:string 676 [ sp:varName "uri"^^xsd:string
710 ] 677 ]
...@@ -765,19 +732,12 @@ ep-dpr-spin-lib:buildProductionInventoryName ...@@ -765,19 +732,12 @@ ep-dpr-spin-lib:buildProductionInventoryName
765 ]) ; 732 ]) ;
766 sp:where ([ rdf:type sp:Bind ; 733 sp:where ([ rdf:type sp:Bind ;
767 sp:expression 734 sp:expression
768 - [ rdf:type sp:if ; 735 + [ rdf:type fn:concat ;
769 - sp:arg1 [ rdf:type sp:eq ;
770 - sp:arg1 spin:_arg2 ;
771 - sp:arg2 ""
772 - ] ;
773 - sp:arg2 spin:_arg1 ;
774 - sp:arg3 [ rdf:type fn:concat ;
775 sp:arg1 spin:_arg1 ; 736 sp:arg1 spin:_arg1 ;
776 sp:arg2 "$" ; 737 sp:arg2 "$" ;
777 sp:arg3 [ rdf:type ep-spin-lib:normalizeString ; 738 sp:arg3 [ rdf:type ep-spin-lib:normalizeString ;
778 sp:arg1 spin:_arg2 739 sp:arg1 spin:_arg2
779 ] 740 ]
780 - ]
781 ] ; 741 ] ;
782 sp:variable 742 sp:variable
783 [ sp:varName "name"^^xsd:string 743 [ sp:varName "name"^^xsd:string
...@@ -795,23 +755,13 @@ ep-dpr-spin-lib:buildProductionInventoryURI ...@@ -795,23 +755,13 @@ ep-dpr-spin-lib:buildProductionInventoryURI
795 ]) ; 755 ]) ;
796 sp:where ([ rdf:type sp:Bind ; 756 sp:where ([ rdf:type sp:Bind ;
797 sp:expression 757 sp:expression
798 - [ rdf:type sp:if ; 758 + [ rdf:type ep-spin-lib:buildURI ;
799 - sp:arg1 [ rdf:type sp:eq ;
800 - sp:arg1 spin:_arg2 ;
801 - sp:arg2 ""
802 - ] ;
803 - sp:arg2 [ rdf:type ep-spin-lib:buildURI ;
804 - sp:arg1 "https://www.reportinghub.no/ep/data/productionInventory/" ;
805 - sp:arg2 spin:_arg1
806 - ] ;
807 - sp:arg3 [ rdf:type ep-spin-lib:buildURI ;
808 sp:arg1 "https://www.reportinghub.no/ep/data/productionInventory/" ; 759 sp:arg1 "https://www.reportinghub.no/ep/data/productionInventory/" ;
809 sp:arg2 [ rdf:type fn:concat ; 760 sp:arg2 [ rdf:type fn:concat ;
810 sp:arg1 spin:_arg1 ; 761 sp:arg1 spin:_arg1 ;
811 sp:arg2 "$" ; 762 sp:arg2 "$" ;
812 sp:arg3 spin:_arg2 763 sp:arg3 spin:_arg2
813 ] 764 ]
814 - ]
815 ] ; 765 ] ;
816 sp:variable 766 sp:variable
817 [ sp:varName "uri"^^xsd:string 767 [ sp:varName "uri"^^xsd:string
...@@ -7553,59 +7503,59 @@ ep-dpr-spin-lib:selectWorkScale ...@@ -7553,59 +7503,59 @@ ep-dpr-spin-lib:selectWorkScale
7553 ]) 7503 ])
7554 ] . 7504 ] .
7555 7505
7556 -_:b10 7506 +_:b22
7557 - sp:varName "uri"^^xsd:string . 7507 + sp:varName "volumeFlowRateAtStdType"^^xsd:string .
7558 7508
7559 -_:b11 7509 +_:b21
7560 - sp:varName "uri"^^xsd:string . 7510 + sp:varName "specificVolumeScale"^^xsd:string .
7561 7511
7562 -_:b12 7512 +_:b20
7563 - sp:varName "uri"^^xsd:string . 7513 + sp:varName "safetyActivityType"^^xsd:string .
7564 7514
7565 -_:b13 7515 +_:b19
7566 - sp:varName "uri"^^xsd:string . 7516 + sp:varName "productionFlowPurposeType"^^xsd:string .
7567 7517
7568 -_:b14 7518 +_:b18
7569 - sp:varName "densityScale"^^xsd:string . 7519 + sp:varName "productionFlowDirectionRelationshipType"^^xsd:string .
7570 7520
7571 -_:b15 7521 +_:b17
7572 - sp:varName "productionFacilityType"^^xsd:string . 7522 + sp:varName "productionFlowDirectionRelationshipType"^^xsd:string .
7573 7523
7574 _:b16 7524 _:b16
7575 sp:varName "productionFlowDefinitionType"^^xsd:string . 7525 sp:varName "productionFlowDefinitionType"^^xsd:string .
7576 7526
7577 -_:b17 7527 +_:b15
7578 - sp:varName "productionFlowDirectionRelationshipType"^^xsd:string . 7528 + sp:varName "productionFacilityType"^^xsd:string .
7579 7529
7580 -_:b18 7530 +_:b14
7581 - sp:varName "productionFlowDirectionRelationshipType"^^xsd:string . 7531 + sp:varName "densityScale"^^xsd:string .
7582 7532
7583 -_:b19 7533 +_:b13
7584 - sp:varName "productionFlowPurposeType"^^xsd:string . 7534 + sp:varName "uri"^^xsd:string .
7585 7535
7586 -_:b20 7536 +_:b12
7587 - sp:varName "safetyActivityType"^^xsd:string . 7537 + sp:varName "uri"^^xsd:string .
7588 7538
7589 -_:b21 7539 +_:b11
7590 - sp:varName "specificVolumeScale"^^xsd:string . 7540 + sp:varName "uri"^^xsd:string .
7591 7541
7592 -_:b22 7542 +_:b10
7593 - sp:varName "volumeFlowRateAtStdType"^^xsd:string . 7543 + sp:varName "uri"^^xsd:string .
7594 7544
7595 -_:b1 sp:varName "uri"^^xsd:string . 7545 +_:b9 sp:varName "uri"^^xsd:string .
7596 7546
7597 -_:b2 sp:varName "UUID"^^xsd:string . 7547 +_:b8 sp:varName "uri"^^xsd:string .
7598 7548
7599 -_:b3 sp:varName "uri"^^xsd:string . 7549 +_:b7 sp:varName "uri"^^xsd:string .
7600 7550
7601 -_:b4 sp:varName "uri"^^xsd:string . 7551 +_:b6 sp:varName "uri"^^xsd:string .
7602 7552
7603 _:b5 sp:varName "uri"^^xsd:string . 7553 _:b5 sp:varName "uri"^^xsd:string .
7604 7554
7605 -_:b6 sp:varName "uri"^^xsd:string . 7555 +_:b4 sp:varName "uri"^^xsd:string .
7606 7556
7607 -_:b7 sp:varName "uri"^^xsd:string . 7557 +_:b3 sp:varName "uri"^^xsd:string .
7608 7558
7609 -_:b8 sp:varName "uri"^^xsd:string . 7559 +_:b2 sp:varName "UUID"^^xsd:string .
7610 7560
7611 -_:b9 sp:varName "uri"^^xsd:string . 7561 +_:b1 sp:varName "uri"^^xsd:string .
......
...@@ -19,46 +19,25 @@ ...@@ -19,46 +19,25 @@
19 <http://www.epim.no/schemas/mprml/1#Cs_geographicContext> 19 <http://www.epim.no/schemas/mprml/1#Cs_geographicContext>
20 spin:rule 20 spin:rule
21 [ rdf:type sp:Construct ; 21 [ rdf:type sp:Construct ;
22 - rdfs:comment "STEP 90105 Set the geographic context - offshore location"^^xsd:string ; 22 + rdfs:comment "STEP 90103 Set the geographic context - state"^^xsd:string ;
23 - sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/geography#OffshoreLocation> ; 23 + sp:templates ([ sp:object
24 - sp:predicate rdf:type ; 24 + [ sp:varName "state"^^xsd:string
25 - sp:subject
26 - [ sp:varName "locationOfProductionFacility"^^xsd:string
27 - ]
28 - ] [ sp:object
29 - [ sp:varName "quadrant"^^xsd:string
30 - ] ;
31 - sp:predicate <http://www.reportinghub.no/ep/schema/geography#hasNorthSeaQuadrantId> ;
32 - sp:subject
33 - [ sp:varName "locationOfProductionFacility"^^xsd:string
34 - ]
35 - ] [ sp:object
36 - [ sp:varName "blockSuffix"^^xsd:string
37 - ] ;
38 - sp:predicate <http://www.reportinghub.no/ep/schema/geography#hasNorthSeaBlockSuffixId> ;
39 - sp:subject
40 - [ sp:varName "locationOfProductionFacility"^^xsd:string
41 - ]
42 - ] [ sp:object
43 - [ sp:varName "areaName"^^xsd:string
44 ] ; 25 ] ;
45 - sp:predicate <http://www.reportinghub.no/ep/schema/geography#hasAreaName> ; 26 + sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
46 sp:subject 27 sp:subject
47 - [ sp:varName "locationOfProductionFacility"^^xsd:string 28 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
48 ] 29 ]
49 - ] [ sp:object 30 + ] [ sp:object <http://www.reportinghub.no/ep/schema/geography#State> ;
50 - [ sp:varName "areaNameNorthSeaOffshore"^^xsd:string 31 + sp:predicate rdf:type ;
51 - ] ;
52 - sp:predicate <http://www.reportinghub.no/ep/schema/geography#hasNorthSeaAreaName> ;
53 sp:subject 32 sp:subject
54 - [ sp:varName "locationOfProductionFacility"^^xsd:string 33 + [ sp:varName "state"^^xsd:string
55 ] 34 ]
56 ] [ sp:object 35 ] [ sp:object
57 - [ sp:varName "commentOffshoreLocation"^^xsd:string 36 + [ sp:varName "stateName"^^xsd:string
58 ] ; 37 ] ;
59 - sp:predicate <http://www.reportinghub.no/ep/schema/geography#hasOffshoreLocationComment> ; 38 + sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
60 sp:subject 39 sp:subject
61 - [ sp:varName "locationOfProductionFacility"^^xsd:string 40 + [ sp:varName "state"^^xsd:string
62 ] 41 ]
63 ]) ; 42 ]) ;
64 sp:where ([ sp:object spin:_this ; 43 sp:where ([ sp:object spin:_this ;
...@@ -67,60 +46,70 @@ ...@@ -67,60 +46,70 @@
67 [ sp:varName "target"^^xsd:string 46 [ sp:varName "target"^^xsd:string
68 ] 47 ]
69 ] [ sp:object 48 ] [ sp:object
70 - [ sp:varName "offshoreLocationRef"^^xsd:string 49 + [ sp:varName "stateName"^^xsd:string
71 ] ; 50 ] ;
72 - sp:predicate <http://www.epim.no/schemas/mprml/1#offshoreLocationRef> ; 51 + sp:predicate <http://www.epim.no/schemas/mprml/1#state> ;
73 sp:subject spin:_this 52 sp:subject spin:_this
74 ] [ sp:object 53 ] [ sp:object
75 - [ sp:varName "northSeaOffshoreRef"^^xsd:string 54 + [ sp:varName "target"^^xsd:string
76 ] ; 55 ] ;
77 - sp:predicate <http://www.epim.no/schemas/mprml/1#northSeaOffshoreRef> ; 56 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
78 sp:subject 57 sp:subject
79 - [ sp:varName "offshoreLocationRef"^^xsd:string 58 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
80 ] 59 ]
81 - ] [ sp:object 60 + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
82 - [ sp:varName "quadrant"^^xsd:string 61 + sp:predicate rdf:type ;
83 - ] ;
84 - sp:predicate <http://www.epim.no/schemas/mprml/1#quadrant> ;
85 sp:subject 62 sp:subject
86 - [ sp:varName "northSeaOffshoreRef"^^xsd:string 63 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
64 + ]
65 + ] [ rdf:type sp:Bind ;
66 + sp:expression
67 + [ rdf:type ep-spin-lib:normalizeString ;
68 + sp:arg1 [ sp:varName "stateName"^^xsd:string
87 ] 69 ]
88 - ] [ rdf:type sp:Optional ;
89 - sp:elements ([ sp:object
90 - [ sp:varName "areaNameNorthSeaOffshore"^^xsd:string
91 ] ; 70 ] ;
92 - sp:predicate <http://www.epim.no/schemas/mprml/1#areaName> ; 71 + sp:variable
93 - sp:subject 72 + [ sp:varName "normalizedStateName"^^xsd:string
94 - [ sp:varName "northSeaOffshoreRef"^^xsd:string 73 + ]
74 + ] [ rdf:type sp:Bind ;
75 + sp:expression
76 + [ rdf:type ep-dpr-spin-lib:buildStateURI ;
77 + sp:arg1 [ sp:varName "normalizedStateName"^^xsd:string
95 ] 78 ]
96 - ])
97 - ] [ rdf:type sp:Optional ;
98 - sp:elements ([ sp:object
99 - [ sp:varName "blockSuffix"^^xsd:string
100 ] ; 79 ] ;
101 - sp:predicate <http://www.epim.no/schemas/mprml/1#blockSuffix> ; 80 + sp:variable
102 - sp:subject 81 + [ sp:varName "state"^^xsd:string
103 - [ sp:varName "northSeaOffshoreRef"^^xsd:string
104 ] 82 ]
105 ]) 83 ])
106 - ] [ rdf:type sp:Optional ;
107 - sp:elements ([ sp:object
108 - [ sp:varName "areaName"^^xsd:string
109 ] ; 84 ] ;
110 - sp:predicate <http://www.epim.no/schemas/mprml/1#areaName> ; 85 + spin:rule
86 + [ rdf:type sp:Construct ;
87 + rdfs:comment "STEP 90104 Set the geographic context - field"^^xsd:string ;
88 + sp:templates ([ sp:object
89 + [ sp:varName "field"^^xsd:string
90 + ] ;
91 + sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
111 sp:subject 92 sp:subject
112 - [ sp:varName "offshoreLocationRef"^^xsd:string 93 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
113 ] 94 ]
114 - ]) 95 + ]) ;
115 - ] [ rdf:type sp:Optional ; 96 + sp:where ([ sp:object spin:_this ;
116 - sp:elements ([ sp:object 97 + sp:predicate <http://www.epim.no/schemas/mprml/1#geographicContextRef> ;
117 - [ sp:varName "commentOffshoreLocation"^^xsd:string 98 + sp:subject
99 + [ sp:varName "target"^^xsd:string
100 + ]
101 + ] [ sp:object
102 + [ sp:varName "fieldRef"^^xsd:string
118 ] ; 103 ] ;
119 - sp:predicate <http://www.epim.no/schemas/mprml/1#comment> ; 104 + sp:predicate <http://www.epim.no/schemas/mprml/1#fieldRef> ;
105 + sp:subject spin:_this
106 + ] [ sp:object
107 + [ sp:varName "fieldName"^^xsd:string
108 + ] ;
109 + sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
120 sp:subject 110 sp:subject
121 - [ sp:varName "offshoreLocationRef"^^xsd:string 111 + [ sp:varName "fieldRef"^^xsd:string
122 ] 112 ]
123 - ])
124 ] [ sp:object 113 ] [ sp:object
125 [ sp:varName "target"^^xsd:string 114 [ sp:varName "target"^^xsd:string
126 ] ; 115 ] ;
...@@ -133,44 +122,56 @@ ...@@ -133,44 +122,56 @@
133 sp:subject 122 sp:subject
134 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 123 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
135 ] 124 ]
125 + ] [ rdf:type sp:NamedGraph ;
126 + sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Field> ;
127 + sp:predicate rdf:type ;
128 + sp:subject
129 + [ sp:varName "field"^^xsd:string
130 + ]
136 ] [ sp:object 131 ] [ sp:object
137 - [ sp:varName "locationOfProductionFacility"^^xsd:string 132 + [ sp:varName "fieldName"^^xsd:string
138 ] ; 133 ] ;
139 - sp:predicate <http://www.reportinghub.no/ep/schema/geography#nominallyLocatedAt> ; 134 + sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
140 sp:subject 135 sp:subject
141 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 136 + [ sp:varName "field"^^xsd:string
142 ] 137 ]
138 + ]) ;
139 + sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
143 ]) 140 ])
144 ] ; 141 ] ;
145 spin:rule 142 spin:rule
146 [ rdf:type sp:Construct ; 143 [ rdf:type sp:Construct ;
147 - rdfs:comment "STEP 90101 Set the geographic context - need a PartOfTheSurfaceOfTheEarth if any geographicContext"^^xsd:string ; 144 + rdfs:comment "STEP 90102 Set the geographic context - country"^^xsd:string ;
148 - sp:templates ([ sp:object _:b1 ; 145 + sp:templates ([ sp:object
149 - sp:predicate <http://www.reportinghub.no/ep/schema/geography#nominallyLocatedAt> ; 146 + [ sp:varName "country"^^xsd:string
147 + ] ;
148 + sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
150 sp:subject 149 sp:subject
151 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 150 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
152 ] 151 ]
153 - ] [ sp:object <http://www.reportinghub.no/ep/schema/geography#PartOfTheSurfaceOfTheEarth> ; 152 + ] [ sp:object <http://www.reportinghub.no/ep/schema/geography#Country> ;
154 sp:predicate rdf:type ; 153 sp:predicate rdf:type ;
155 - sp:subject _:b1 154 + sp:subject
155 + [ sp:varName "country"^^xsd:string
156 + ]
156 ] [ sp:object 157 ] [ sp:object
157 - [ sp:varName "comment"^^xsd:string 158 + [ sp:varName "countryName"^^xsd:string
158 ] ; 159 ] ;
159 - sp:predicate <http://www.reportinghub.no/ep/schema/core#description> ; 160 + sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ;
160 - sp:subject _:b1 161 + sp:subject
162 + [ sp:varName "country"^^xsd:string
163 + ]
161 ]) ; 164 ]) ;
162 sp:where ([ sp:object spin:_this ; 165 sp:where ([ sp:object spin:_this ;
163 sp:predicate <http://www.epim.no/schemas/mprml/1#geographicContextRef> ; 166 sp:predicate <http://www.epim.no/schemas/mprml/1#geographicContextRef> ;
164 sp:subject 167 sp:subject
165 [ sp:varName "target"^^xsd:string 168 [ sp:varName "target"^^xsd:string
166 ] 169 ]
167 - ] [ rdf:type sp:Optional ; 170 + ] [ sp:object
168 - sp:elements ([ sp:object 171 + [ sp:varName "countryName"^^xsd:string
169 - [ sp:varName "comment"^^xsd:string
170 ] ; 172 ] ;
171 - sp:predicate <http://www.epim.no/schemas/mprml/1#comment> ; 173 + sp:predicate <http://www.epim.no/schemas/mprml/1#country> ;
172 sp:subject spin:_this 174 sp:subject spin:_this
173 - ])
174 ] [ sp:object 175 ] [ sp:object
175 [ sp:varName "target"^^xsd:string 176 [ sp:varName "target"^^xsd:string
176 ] ; 177 ] ;
...@@ -183,6 +184,24 @@ ...@@ -183,6 +184,24 @@
183 sp:subject 184 sp:subject
184 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 185 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
185 ] 186 ]
187 + ] [ rdf:type sp:Bind ;
188 + sp:expression
189 + [ rdf:type ep-spin-lib:normalizeString ;
190 + sp:arg1 [ sp:varName "countryName"^^xsd:string
191 + ]
192 + ] ;
193 + sp:variable
194 + [ sp:varName "normalizedCountryName"^^xsd:string
195 + ]
196 + ] [ rdf:type sp:Bind ;
197 + sp:expression
198 + [ rdf:type ep-dpr-spin-lib:buildCountryURI ;
199 + sp:arg1 [ sp:varName "normalizedCountryName"^^xsd:string
200 + ]
201 + ] ;
202 + sp:variable
203 + [ sp:varName "country"^^xsd:string
204 + ]
186 ]) 205 ])
187 ] ; 206 ] ;
188 spin:rule 207 spin:rule
...@@ -261,37 +280,33 @@ ...@@ -261,37 +280,33 @@
261 ] ; 280 ] ;
262 spin:rule 281 spin:rule
263 [ rdf:type sp:Construct ; 282 [ rdf:type sp:Construct ;
264 - rdfs:comment "STEP 90102 Set the geographic context - country"^^xsd:string ; 283 + rdfs:comment "STEP 90101 Set the geographic context - need a PartOfTheSurfaceOfTheEarth if any geographicContext"^^xsd:string ;
265 - sp:templates ([ sp:object 284 + sp:templates ([ sp:object _:b1 ;
266 - [ sp:varName "country"^^xsd:string 285 + sp:predicate <http://www.reportinghub.no/ep/schema/geography#nominallyLocatedAt> ;
267 - ] ;
268 - sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
269 sp:subject 286 sp:subject
270 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 287 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
271 ] 288 ]
272 - ] [ sp:object <http://www.reportinghub.no/ep/schema/geography#Country> ; 289 + ] [ sp:object <http://www.reportinghub.no/ep/schema/geography#PartOfTheSurfaceOfTheEarth> ;
273 sp:predicate rdf:type ; 290 sp:predicate rdf:type ;
274 - sp:subject 291 + sp:subject _:b1
275 - [ sp:varName "country"^^xsd:string
276 - ]
277 ] [ sp:object 292 ] [ sp:object
278 - [ sp:varName "countryName"^^xsd:string 293 + [ sp:varName "comment"^^xsd:string
279 ] ; 294 ] ;
280 - sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ; 295 + sp:predicate <http://www.reportinghub.no/ep/schema/core#description> ;
281 - sp:subject 296 + sp:subject _:b1
282 - [ sp:varName "country"^^xsd:string
283 - ]
284 ]) ; 297 ]) ;
285 sp:where ([ sp:object spin:_this ; 298 sp:where ([ sp:object spin:_this ;
286 sp:predicate <http://www.epim.no/schemas/mprml/1#geographicContextRef> ; 299 sp:predicate <http://www.epim.no/schemas/mprml/1#geographicContextRef> ;
287 sp:subject 300 sp:subject
288 [ sp:varName "target"^^xsd:string 301 [ sp:varName "target"^^xsd:string
289 ] 302 ]
290 - ] [ sp:object 303 + ] [ rdf:type sp:Optional ;
291 - [ sp:varName "countryName"^^xsd:string 304 + sp:elements ([ sp:object
305 + [ sp:varName "comment"^^xsd:string
292 ] ; 306 ] ;
293 - sp:predicate <http://www.epim.no/schemas/mprml/1#country> ; 307 + sp:predicate <http://www.epim.no/schemas/mprml/1#comment> ;
294 sp:subject spin:_this 308 sp:subject spin:_this
309 + ])
295 ] [ sp:object 310 ] [ sp:object
296 [ sp:varName "target"^^xsd:string 311 [ sp:varName "target"^^xsd:string
297 ] ; 312 ] ;
...@@ -304,47 +319,50 @@ ...@@ -304,47 +319,50 @@
304 sp:subject 319 sp:subject
305 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 320 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
306 ] 321 ]
307 - ] [ rdf:type sp:Bind ; 322 + ])
308 - sp:expression
309 - [ rdf:type ep-spin-lib:normalizeString ;
310 - sp:arg1 [ sp:varName "countryName"^^xsd:string
311 - ]
312 ] ; 323 ] ;
313 - sp:variable 324 + spin:rule
314 - [ sp:varName "normalizedCountryName"^^xsd:string 325 + [ rdf:type sp:Construct ;
315 - ] 326 + rdfs:comment "STEP 90105 Set the geographic context - offshore location"^^xsd:string ;
316 - ] [ rdf:type sp:Bind ; 327 + sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/geography#OffshoreLocation> ;
317 - sp:expression 328 + sp:predicate rdf:type ;
318 - [ rdf:type ep-dpr-spin-lib:buildCountryURI ; 329 + sp:subject
319 - sp:arg1 [ sp:varName "normalizedCountryName"^^xsd:string 330 + [ sp:varName "locationOfProductionFacility"^^xsd:string
320 ] 331 ]
332 + ] [ sp:object
333 + [ sp:varName "quadrant"^^xsd:string
321 ] ; 334 ] ;
322 - sp:variable 335 + sp:predicate <http://www.reportinghub.no/ep/schema/geography#hasNorthSeaQuadrantId> ;
323 - [ sp:varName "country"^^xsd:string 336 + sp:subject
337 + [ sp:varName "locationOfProductionFacility"^^xsd:string
324 ] 338 ]
325 - ]) 339 + ] [ sp:object
340 + [ sp:varName "blockSuffix"^^xsd:string
326 ] ; 341 ] ;
327 - spin:rule 342 + sp:predicate <http://www.reportinghub.no/ep/schema/geography#hasNorthSeaBlockSuffixId> ;
328 - [ rdf:type sp:Construct ; 343 + sp:subject
329 - rdfs:comment "STEP 90103 Set the geographic context - state"^^xsd:string ; 344 + [ sp:varName "locationOfProductionFacility"^^xsd:string
330 - sp:templates ([ sp:object 345 + ]
331 - [ sp:varName "country"^^xsd:string 346 + ] [ sp:object
347 + [ sp:varName "areaName"^^xsd:string
332 ] ; 348 ] ;
333 - sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ; 349 + sp:predicate <http://www.reportinghub.no/ep/schema/geography#hasAreaName> ;
334 sp:subject 350 sp:subject
335 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 351 + [ sp:varName "locationOfProductionFacility"^^xsd:string
336 ] 352 ]
337 - ] [ sp:object <http://www.reportinghub.no/ep/schema/geography#State> ; 353 + ] [ sp:object
338 - sp:predicate rdf:type ; 354 + [ sp:varName "areaNameNorthSeaOffshore"^^xsd:string
355 + ] ;
356 + sp:predicate <http://www.reportinghub.no/ep/schema/geography#hasNorthSeaAreaName> ;
339 sp:subject 357 sp:subject
340 - [ sp:varName "country"^^xsd:string 358 + [ sp:varName "locationOfProductionFacility"^^xsd:string
341 ] 359 ]
342 ] [ sp:object 360 ] [ sp:object
343 - [ sp:varName "stateName"^^xsd:string 361 + [ sp:varName "commentOffshoreLocation"^^xsd:string
344 ] ; 362 ] ;
345 - sp:predicate <http://www.reportinghub.no/ep/schema/core#name> ; 363 + sp:predicate <http://www.reportinghub.no/ep/schema/geography#hasOffshoreLocationComment> ;
346 sp:subject 364 sp:subject
347 - [ sp:varName "country"^^xsd:string 365 + [ sp:varName "locationOfProductionFacility"^^xsd:string
348 ] 366 ]
349 ]) ; 367 ]) ;
350 sp:where ([ sp:object spin:_this ; 368 sp:where ([ sp:object spin:_this ;
...@@ -353,70 +371,60 @@ ...@@ -353,70 +371,60 @@
353 [ sp:varName "target"^^xsd:string 371 [ sp:varName "target"^^xsd:string
354 ] 372 ]
355 ] [ sp:object 373 ] [ sp:object
356 - [ sp:varName "stateName"^^xsd:string 374 + [ sp:varName "offshoreLocationRef"^^xsd:string
357 ] ; 375 ] ;
358 - sp:predicate <http://www.epim.no/schemas/mprml/1#state> ; 376 + sp:predicate <http://www.epim.no/schemas/mprml/1#offshoreLocationRef> ;
359 sp:subject spin:_this 377 sp:subject spin:_this
360 ] [ sp:object 378 ] [ sp:object
361 - [ sp:varName "target"^^xsd:string 379 + [ sp:varName "northSeaOffshoreRef"^^xsd:string
362 ] ; 380 ] ;
363 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 381 + sp:predicate <http://www.epim.no/schemas/mprml/1#northSeaOffshoreRef> ;
364 - sp:subject
365 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
366 - ]
367 - ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#TemporalPartOfAProductionFacility> ;
368 - sp:predicate rdf:type ;
369 sp:subject 382 sp:subject
370 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 383 + [ sp:varName "offshoreLocationRef"^^xsd:string
371 - ]
372 - ] [ rdf:type sp:Bind ;
373 - sp:expression
374 - [ rdf:type ep-spin-lib:normalizeString ;
375 - sp:arg1 [ sp:varName "countryName"^^xsd:string
376 ] 384 ]
385 + ] [ sp:object
386 + [ sp:varName "quadrant"^^xsd:string
377 ] ; 387 ] ;
378 - sp:variable 388 + sp:predicate <http://www.epim.no/schemas/mprml/1#quadrant> ;
379 - [ sp:varName "normalizedCountryName"^^xsd:string 389 + sp:subject
380 - ] 390 + [ sp:varName "northSeaOffshoreRef"^^xsd:string
381 - ] [ rdf:type sp:Bind ;
382 - sp:expression
383 - [ rdf:type ep-dpr-spin-lib:buildCountryURI ;
384 - sp:arg1 [ sp:varName "normalizedCountryName"^^xsd:string
385 ] 391 ]
392 + ] [ rdf:type sp:Optional ;
393 + sp:elements ([ sp:object
394 + [ sp:varName "areaNameNorthSeaOffshore"^^xsd:string
386 ] ; 395 ] ;
387 - sp:variable 396 + sp:predicate <http://www.epim.no/schemas/mprml/1#areaName> ;
388 - [ sp:varName "country"^^xsd:string 397 + sp:subject
398 + [ sp:varName "northSeaOffshoreRef"^^xsd:string
389 ] 399 ]
390 ]) 400 ])
401 + ] [ rdf:type sp:Optional ;
402 + sp:elements ([ sp:object
403 + [ sp:varName "blockSuffix"^^xsd:string
391 ] ; 404 ] ;
392 - spin:rule 405 + sp:predicate <http://www.epim.no/schemas/mprml/1#blockSuffix> ;
393 - [ rdf:type sp:Construct ;
394 - rdfs:comment "STEP 90104 Set the geographic context - field"^^xsd:string ;
395 - sp:templates ([ sp:object
396 - [ sp:varName "field"^^xsd:string
397 - ] ;
398 - sp:predicate <http://www.reportinghub.no/ep/schema/geography#locatedWithin> ;
399 sp:subject 406 sp:subject
400 - [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 407 + [ sp:varName "northSeaOffshoreRef"^^xsd:string
401 ] 408 ]
402 - ]) ; 409 + ])
403 - sp:where ([ sp:object spin:_this ; 410 + ] [ rdf:type sp:Optional ;
404 - sp:predicate <http://www.epim.no/schemas/mprml/1#geographicContextRef> ; 411 + sp:elements ([ sp:object
412 + [ sp:varName "areaName"^^xsd:string
413 + ] ;
414 + sp:predicate <http://www.epim.no/schemas/mprml/1#areaName> ;
405 sp:subject 415 sp:subject
406 - [ sp:varName "target"^^xsd:string 416 + [ sp:varName "offshoreLocationRef"^^xsd:string
407 ] 417 ]
408 - ] [ sp:object 418 + ])
409 - [ sp:varName "fieldRef"^^xsd:string 419 + ] [ rdf:type sp:Optional ;
410 - ] ; 420 + sp:elements ([ sp:object
411 - sp:predicate <http://www.epim.no/schemas/mprml/1#fieldRef> ; 421 + [ sp:varName "commentOffshoreLocation"^^xsd:string
412 - sp:subject spin:_this
413 - ] [ sp:object
414 - [ sp:varName "fieldName"^^xsd:string
415 ] ; 422 ] ;
416 - sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 423 + sp:predicate <http://www.epim.no/schemas/mprml/1#comment> ;
417 sp:subject 424 sp:subject
418 - [ sp:varName "fieldRef"^^xsd:string 425 + [ sp:varName "offshoreLocationRef"^^xsd:string
419 ] 426 ]
427 + ])
420 ] [ sp:object 428 ] [ sp:object
421 [ sp:varName "target"^^xsd:string 429 [ sp:varName "target"^^xsd:string
422 ] ; 430 ] ;
...@@ -429,25 +437,17 @@ ...@@ -429,25 +437,17 @@
429 sp:subject 437 sp:subject
430 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string 438 [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
431 ] 439 ]
432 - ] [ rdf:type sp:NamedGraph ;
433 - sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/facility#Field> ;
434 - sp:predicate rdf:type ;
435 - sp:subject
436 - [ sp:varName "field"^^xsd:string
437 - ]
438 ] [ sp:object 440 ] [ sp:object
439 - [ sp:varName "fieldName"^^xsd:string 441 + [ sp:varName "locationOfProductionFacility"^^xsd:string
440 ] ; 442 ] ;
441 - sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; 443 + sp:predicate <http://www.reportinghub.no/ep/schema/geography#nominallyLocatedAt> ;
442 sp:subject 444 sp:subject
443 - [ sp:varName "field"^^xsd:string 445 + [ sp:varName "temporalPartOfAProductionFacility"^^xsd:string
444 ] 446 ]
445 - ]) ;
446 - sp:graphNameNode <http://www.reportinghub.no/np/data/npd>
447 ]) 447 ])
448 ] . 448 ] .
449 449
450 <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-geographicContext-v1.1.1> 450 <http://www.reportinghub.no/ep/transform/TRANSFORM_mpr-geographicContext-v1.1.1>
451 rdf:type owl:Ontology ; 451 rdf:type owl:Ontology ;
452 - owl:imports <http://www.reportinghub.no/ep/transform/transform-helper-schema> , <http://spinrdf.org/spin> , <http://www.epim.no/schemas/mprml/1> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.reportinghub.no/ep/schema/1.0/geography> ; 452 + owl:imports <http://www.reportinghub.no/ep/schema/1.0/geography> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.epim.no/schemas/mprml/1> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/transform/transform-helper-schema> ;
453 owl:versionInfo "Created with TopBraid Composer"^^xsd:string . 453 owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
......