David Leal

More work on flows

1 -# Saved by TopBraid on Sun Oct 09 15:34:41 BST 2011 1 +# Saved by TopBraid on Sun Oct 09 19:30:18 BST 2011
2 # baseURI: http://www.reportinghub.no/ep/schema/1.0/flow 2 # baseURI: http://www.reportinghub.no/ep/schema/1.0/flow
3 # imports: http://www.reportinghub.no/ep/schema/1.0/core 3 # imports: http://www.reportinghub.no/ep/schema/1.0/core
4 4
...@@ -14,137 +14,137 @@ ...@@ -14,137 +14,137 @@
14 owl:versionInfo "Created with TopBraid Composer"^^xsd:string . 14 owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
15 15
16 ep-flow:AllocatedFlow 16 ep-flow:AllocatedFlow
17 - rdf:type ep-flow:ProductionFlowDefinitionType , owl:Class ; 17 + rdf:type owl:Class , ep-flow:ProductionFlowDefinitionType ;
18 rdfs:label "allocated flow"^^xsd:string ; 18 rdfs:label "allocated flow"^^xsd:string ;
19 rdfs:subClassOf ep-flow:Flow . 19 rdfs:subClassOf ep-flow:Flow .
20 20
21 ep-flow:BudgetFlow 21 ep-flow:BudgetFlow
22 - rdf:type ep-flow:ProductionFlowDefinitionType , owl:Class ; 22 + rdf:type owl:Class , ep-flow:ProductionFlowDefinitionType ;
23 rdfs:label "budget flow"^^xsd:string ; 23 rdfs:label "budget flow"^^xsd:string ;
24 rdfs:subClassOf ep-flow:Flow . 24 rdfs:subClassOf ep-flow:Flow .
25 25
26 ep-flow:ConstraintFlow 26 ep-flow:ConstraintFlow
27 - rdf:type owl:Class , ep-flow:ProductionFlowDefinitionType ; 27 + rdf:type ep-flow:ProductionFlowDefinitionType , owl:Class ;
28 rdfs:label "constraint flow"^^xsd:string ; 28 rdfs:label "constraint flow"^^xsd:string ;
29 rdfs:subClassOf ep-flow:Flow . 29 rdfs:subClassOf ep-flow:Flow .
30 30
31 ep-flow:Consume 31 ep-flow:Consume
32 - rdf:type ep-flow:ProductionFlowPurposeType , owl:Class ; 32 + rdf:type owl:Class , ep-flow:ProductionFlowPurposeType ;
33 rdfs:label "consume"^^xsd:string ; 33 rdfs:label "consume"^^xsd:string ;
34 rdfs:subClassOf ep-flow:Flow . 34 rdfs:subClassOf ep-flow:Flow .
35 35
36 ep-flow:Consume-HPflare 36 ep-flow:Consume-HPflare
37 - rdf:type ep-flow:ProductionFlowPurposeType , owl:Class ; 37 + rdf:type owl:Class , ep-flow:ProductionFlowPurposeType ;
38 rdfs:label "consume - HP flare"^^xsd:string ; 38 rdfs:label "consume - HP flare"^^xsd:string ;
39 rdfs:subClassOf ep-flow:Consume-flare . 39 rdfs:subClassOf ep-flow:Consume-flare .
40 40
41 ep-flow:Consume-LPflare 41 ep-flow:Consume-LPflare
42 - rdf:type ep-flow:ProductionFlowPurposeType , owl:Class ; 42 + rdf:type owl:Class , ep-flow:ProductionFlowPurposeType ;
43 rdfs:label "consume - LP flare"^^xsd:string ; 43 rdfs:label "consume - LP flare"^^xsd:string ;
44 rdfs:subClassOf ep-flow:Consume-flare . 44 rdfs:subClassOf ep-flow:Consume-flare .
45 45
46 ep-flow:Consume-blackstart 46 ep-flow:Consume-blackstart
47 - rdf:type ep-flow:ProductionFlowPurposeType , owl:Class ; 47 + rdf:type owl:Class , ep-flow:ProductionFlowPurposeType ;
48 rdfs:label "consume - blackstart"^^xsd:string ; 48 rdfs:label "consume - blackstart"^^xsd:string ;
49 rdfs:subClassOf ep-flow:Consume . 49 rdfs:subClassOf ep-flow:Consume .
50 50
51 ep-flow:Consume-compressor 51 ep-flow:Consume-compressor
52 - rdf:type ep-flow:ProductionFlowPurposeType , owl:Class ; 52 + rdf:type owl:Class , ep-flow:ProductionFlowPurposeType ;
53 rdfs:label "consume - compressor"^^xsd:string ; 53 rdfs:label "consume - compressor"^^xsd:string ;
54 rdfs:subClassOf ep-flow:Consume . 54 rdfs:subClassOf ep-flow:Consume .
55 55
56 ep-flow:Consume-emitted 56 ep-flow:Consume-emitted
57 - rdf:type ep-flow:ProductionFlowPurposeType , owl:Class ; 57 + rdf:type owl:Class , ep-flow:ProductionFlowPurposeType ;
58 rdfs:label "consume - emitted"^^xsd:string ; 58 rdfs:label "consume - emitted"^^xsd:string ;
59 rdfs:subClassOf ep-flow:Consume . 59 rdfs:subClassOf ep-flow:Consume .
60 60
61 ep-flow:Consume-flare 61 ep-flow:Consume-flare
62 - rdf:type ep-flow:ProductionFlowPurposeType , owl:Class ; 62 + rdf:type owl:Class , ep-flow:ProductionFlowPurposeType ;
63 rdfs:label "consume - flare"^^xsd:string ; 63 rdfs:label "consume - flare"^^xsd:string ;
64 rdfs:subClassOf ep-flow:Consume . 64 rdfs:subClassOf ep-flow:Consume .
65 65
66 ep-flow:Consume-fuel 66 ep-flow:Consume-fuel
67 - rdf:type ep-flow:ProductionFlowPurposeType , owl:Class ; 67 + rdf:type owl:Class , ep-flow:ProductionFlowPurposeType ;
68 rdfs:label "consume - fuel"^^xsd:string ; 68 rdfs:label "consume - fuel"^^xsd:string ;
69 rdfs:subClassOf ep-flow:Consume . 69 rdfs:subClassOf ep-flow:Consume .
70 70
71 ep-flow:Consume-noncompressor 71 ep-flow:Consume-noncompressor
72 - rdf:type ep-flow:ProductionFlowPurposeType , owl:Class ; 72 + rdf:type owl:Class , ep-flow:ProductionFlowPurposeType ;
73 rdfs:label "consume - non-compressor"^^xsd:string ; 73 rdfs:label "consume - non-compressor"^^xsd:string ;
74 rdfs:subClassOf ep-flow:Consume . 74 rdfs:subClassOf ep-flow:Consume .
75 75
76 ep-flow:Consume-venting 76 ep-flow:Consume-venting
77 - rdf:type ep-flow:ProductionFlowPurposeType , owl:Class ; 77 + rdf:type owl:Class , ep-flow:ProductionFlowPurposeType ;
78 rdfs:label "consume - venting"^^xsd:string ; 78 rdfs:label "consume - venting"^^xsd:string ;
79 rdfs:subClassOf ep-flow:Consume . 79 rdfs:subClassOf ep-flow:Consume .
80 80
81 ep-flow:DerivedFlow 81 ep-flow:DerivedFlow
82 - rdf:type owl:Class , ep-flow:ProductionFlowDefinitionType ; 82 + rdf:type ep-flow:ProductionFlowDefinitionType , owl:Class ;
83 rdfs:label "derived flow"^^xsd:string ; 83 rdfs:label "derived flow"^^xsd:string ;
84 rdfs:subClassOf ep-flow:Flow . 84 rdfs:subClassOf ep-flow:Flow .
85 85
86 ep-flow:EstimatedFlow 86 ep-flow:EstimatedFlow
87 - rdf:type ep-flow:ProductionFlowDefinitionType , owl:Class ; 87 + rdf:type owl:Class , ep-flow:ProductionFlowDefinitionType ;
88 rdfs:label "estimated flow"^^xsd:string ; 88 rdfs:label "estimated flow"^^xsd:string ;
89 rdfs:subClassOf ep-flow:Flow . 89 rdfs:subClassOf ep-flow:Flow .
90 90
91 ep-flow:Export 91 ep-flow:Export
92 - rdf:type ep-flow:ProductionFlowPurposeType , owl:Class ; 92 + rdf:type owl:Class , ep-flow:ProductionFlowPurposeType ;
93 rdfs:label "export"^^xsd:string ; 93 rdfs:label "export"^^xsd:string ;
94 rdfs:subClassOf ep-flow:Flow . 94 rdfs:subClassOf ep-flow:Flow .
95 95
96 ep-flow:Export-nominated 96 ep-flow:Export-nominated
97 - rdf:type ep-flow:ProductionFlowPurposeType , owl:Class ; 97 + rdf:type owl:Class , ep-flow:ProductionFlowPurposeType ;
98 rdfs:label "export nominated"^^xsd:string ; 98 rdfs:label "export nominated"^^xsd:string ;
99 rdfs:subClassOf ep-flow:Export . 99 rdfs:subClassOf ep-flow:Export .
100 100
101 ep-flow:Export-requested 101 ep-flow:Export-requested
102 - rdf:type ep-flow:ProductionFlowPurposeType , owl:Class ; 102 + rdf:type owl:Class , ep-flow:ProductionFlowPurposeType ;
103 rdfs:label "export requested"^^xsd:string ; 103 rdfs:label "export requested"^^xsd:string ;
104 rdfs:subClassOf ep-flow:Export . 104 rdfs:subClassOf ep-flow:Export .
105 105
106 ep-flow:Export-shortfall 106 ep-flow:Export-shortfall
107 - rdf:type ep-flow:ProductionFlowPurposeType , owl:Class ; 107 + rdf:type owl:Class , ep-flow:ProductionFlowPurposeType ;
108 rdfs:label "export shortfall"^^xsd:string ; 108 rdfs:label "export shortfall"^^xsd:string ;
109 rdfs:subClassOf ep-flow:Export . 109 rdfs:subClassOf ep-flow:Export .
110 110
111 ep-flow:Flow 111 ep-flow:Flow
112 rdf:type owl:Class ; 112 rdf:type owl:Class ;
113 rdfs:label "flow"^^xsd:string ; 113 rdfs:label "flow"^^xsd:string ;
114 - rdfs:subClassOf <http://www.reportinghub.no/ep/schema/core#PhysicalThing> . 114 + rdfs:subClassOf ep-flow:TemporalPartOfAFlow .
115 115
116 ep-flow:Gaslift 116 ep-flow:Gaslift
117 - rdf:type ep-flow:ProductionFlowPurposeType , owl:Class ; 117 + rdf:type owl:Class , ep-flow:ProductionFlowPurposeType ;
118 rdfs:label "gas lift"^^xsd:string ; 118 rdfs:label "gas lift"^^xsd:string ;
119 rdfs:subClassOf ep-flow:Flow . 119 rdfs:subClassOf ep-flow:Flow .
120 120
121 ep-flow:Import 121 ep-flow:Import
122 - rdf:type ep-flow:ProductionFlowPurposeType , owl:Class ; 122 + rdf:type owl:Class , ep-flow:ProductionFlowPurposeType ;
123 rdfs:label "import"^^xsd:string ; 123 rdfs:label "import"^^xsd:string ;
124 rdfs:subClassOf ep-flow:Flow . 124 rdfs:subClassOf ep-flow:Flow .
125 125
126 ep-flow:Injection 126 ep-flow:Injection
127 - rdf:type ep-flow:ProductionFlowPurposeType , owl:Class ; 127 + rdf:type owl:Class , ep-flow:ProductionFlowPurposeType ;
128 rdfs:label "injection"^^xsd:string ; 128 rdfs:label "injection"^^xsd:string ;
129 rdfs:subClassOf ep-flow:Flow . 129 rdfs:subClassOf ep-flow:Flow .
130 130
131 ep-flow:Inventory 131 ep-flow:Inventory
132 - rdf:type ep-flow:ProductionFlowPurposeType , owl:Class ; 132 + rdf:type owl:Class , ep-flow:ProductionFlowPurposeType ;
133 rdfs:label "inventory"^^xsd:string ; 133 rdfs:label "inventory"^^xsd:string ;
134 rdfs:subClassOf ep-flow:Flow . 134 rdfs:subClassOf ep-flow:Flow .
135 135
136 ep-flow:MeasuredFlow 136 ep-flow:MeasuredFlow
137 - rdf:type ep-flow:ProductionFlowDefinitionType , owl:Class ; 137 + rdf:type owl:Class , ep-flow:ProductionFlowDefinitionType ;
138 rdfs:label "measured flow"^^xsd:string ; 138 rdfs:label "measured flow"^^xsd:string ;
139 rdfs:subClassOf ep-flow:Flow . 139 rdfs:subClassOf ep-flow:Flow .
140 140
141 ep-flow:Overboard 141 ep-flow:Overboard
142 - rdf:type ep-flow:ProductionFlowPurposeType , owl:Class ; 142 + rdf:type owl:Class , ep-flow:ProductionFlowPurposeType ;
143 rdfs:label "overboard"^^xsd:string ; 143 rdfs:label "overboard"^^xsd:string ;
144 rdfs:subClassOf ep-flow:Flow . 144 rdfs:subClassOf ep-flow:Flow .
145 145
146 ep-flow:Production 146 ep-flow:Production
147 - rdf:type ep-flow:ProductionFlowPurposeType , owl:Class ; 147 + rdf:type owl:Class , ep-flow:ProductionFlowPurposeType ;
148 rdfs:label "production"^^xsd:string ; 148 rdfs:label "production"^^xsd:string ;
149 rdfs:subClassOf ep-flow:Flow . 149 rdfs:subClassOf ep-flow:Flow .
150 150
...@@ -164,11 +164,22 @@ ep-flow:ProductionFlowPurposeType ...@@ -164,11 +164,22 @@ ep-flow:ProductionFlowPurposeType
164 rdfs:subClassOf rdfs:Class . 164 rdfs:subClassOf rdfs:Class .
165 165
166 ep-flow:QuotaFlow 166 ep-flow:QuotaFlow
167 - rdf:type ep-flow:ProductionFlowDefinitionType , owl:Class ; 167 + rdf:type owl:Class , ep-flow:ProductionFlowDefinitionType ;
168 rdfs:label "quota flow"^^xsd:string ; 168 rdfs:label "quota flow"^^xsd:string ;
169 rdfs:subClassOf ep-flow:Flow . 169 rdfs:subClassOf ep-flow:Flow .
170 170
171 ep-flow:SimulatedFlow 171 ep-flow:SimulatedFlow
172 - rdf:type ep-flow:ProductionFlowDefinitionType , owl:Class ; 172 + rdf:type owl:Class , ep-flow:ProductionFlowDefinitionType ;
173 rdfs:label "simulated flow"^^xsd:string ; 173 rdfs:label "simulated flow"^^xsd:string ;
174 rdfs:subClassOf ep-flow:Flow . 174 rdfs:subClassOf ep-flow:Flow .
175 +
176 +ep-flow:TemporalPartOfAFlow
177 + rdf:type owl:Class ;
178 + rdfs:label "temporal part of a flow"^^xsd:string ;
179 + rdfs:subClassOf <http://www.reportinghub.no/ep/schema/core#PhysicalThing> .
180 +
181 +ep-flow:flowOf
182 + rdf:type owl:ObjectProperty ;
183 + rdfs:domain ep-flow:Flow ;
184 + rdfs:label "flow of"^^xsd:string ;
185 + rdfs:range <http://www.reportinghub.no/ep/schema/core#PhysicalObject> .
......
1 -# Saved by TopBraid on Sun Oct 09 16:28:54 BST 2011 1 +# Saved by TopBraid on Sun Oct 09 20:00:04 BST 2011
2 # baseURI: http://www.reportinghub.no/ep/dpr/spin/1.1/lib 2 # baseURI: http://www.reportinghub.no/ep/dpr/spin/1.1/lib
3 # imports: http://www.reportinghub.no/ep/schema/1.0/geography 3 # imports: http://www.reportinghub.no/ep/schema/1.0/geography
4 # imports: http://www.reportinghub.no/ep/schema/1.0/well 4 # imports: http://www.reportinghub.no/ep/schema/1.0/well
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
21 21
22 <http://www.reportinghub.no/ep/dpr/spin/1.1/lib> 22 <http://www.reportinghub.no/ep/dpr/spin/1.1/lib>
23 rdf:type owl:Ontology ; 23 rdf:type owl:Ontology ;
24 - owl:imports <http://www.reportinghub.no/ep/schema/1.0/flow> , <http://www.reportinghub.no/ep/schema/1.0/geography> , <http://www.reportinghub.no/ep/schema/1.0/well> , <http://www.reportinghub.no/ep/schema/1.0/facility> , <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/facility> , <http://www.reportinghub.no/ep/schema/1.0/well> , <http://www.reportinghub.no/ep/schema/1.0/geography> , <http://www.reportinghub.no/ep/schema/1.0/flow> ;
25 owl:versionInfo "Created with TopBraid Composer"^^xsd:string . 25 owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
26 26
27 ep-dpr-spin-lib:Function 27 ep-dpr-spin-lib:Function
...@@ -67,13 +67,197 @@ ep-dpr-spin-lib:buildProductionFlowURI ...@@ -67,13 +67,197 @@ ep-dpr-spin-lib:buildProductionFlowURI
67 ]) 67 ])
68 ] . 68 ] .
69 69
70 +ep-dpr-spin-lib:buildProductionFlowsForAPeriodURI
71 + rdf:type spin:Function ;
72 + rdfs:label "build ProductionFacility URI"^^xsd:string ;
73 + rdfs:subClassOf ep-dpr-spin-lib:Function ;
74 + spin:body
75 + [ rdf:type sp:Select ;
76 + sp:resultVariables (_:b3) ;
77 + sp:where ([ rdf:type sp:Bind ;
78 + sp:expression
79 + [ rdf:type ep-spin-lib:buildURI ;
80 + sp:arg1 "https://www.reportinghub.no/ep/data/productionFacility/" ;
81 + sp:arg2 [ rdf:type fn:concat ;
82 + sp:arg1 spin:_arg1 ;
83 + sp:arg2 "$" ;
84 + sp:arg3 spin:_arg2 ;
85 + sp:arg4 "$" ;
86 + sp:arg5 spin:_arg3
87 + ]
88 + ] ;
89 + sp:variable _:b3
90 + ])
91 + ] .
92 +
93 +ep-dpr-spin-lib:selectProductType
94 + rdf:type spin:Function ;
95 + rdfs:label "select ProductType"^^xsd:string ;
96 + rdfs:subClassOf ep-dpr-spin-lib:Function ;
97 + spin:body
98 + [ rdf:type sp:Select ;
99 + sp:resultVariables (_:b4) ;
100 + sp:where ([ rdf:type sp:Bind ;
101 + sp:expression
102 + [ rdf:type sp:if ;
103 + sp:arg1 [ rdf:type sp:eq ;
104 + sp:arg1 spin:_arg1 ;
105 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#RF_consume-HPflare>
106 + ] ;
107 + sp:arg2 <http://www.reportinghub.no/ep/schema/flow#Consume-HPflare> ;
108 + sp:arg3 [ rdf:type sp:if ;
109 + sp:arg1 [ rdf:type sp:eq ;
110 + sp:arg1 spin:_arg1 ;
111 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#RF_consume-LPflare>
112 + ] ;
113 + sp:arg2 <http://www.reportinghub.no/ep/schema/flow#Consume-LPflare> ;
114 + sp:arg3 [ rdf:type sp:if ;
115 + sp:arg1 [ rdf:type sp:eq ;
116 + sp:arg1 spin:_arg1 ;
117 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#RF_consume-blackstart>
118 + ] ;
119 + sp:arg2 <http://www.reportinghub.no/ep/schema/flow#Consume-blackstart> ;
120 + sp:arg3 [ rdf:type sp:if ;
121 + sp:arg1 [ rdf:type sp:eq ;
122 + sp:arg1 spin:_arg1 ;
123 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#RF_consume-compressor>
124 + ] ;
125 + sp:arg2 <http://www.reportinghub.no/ep/schema/flow#Consume-compressor> ;
126 + sp:arg3 [ rdf:type sp:if ;
127 + sp:arg1 [ rdf:type sp:eq ;
128 + sp:arg1 spin:_arg1 ;
129 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#RF_consume-emitted>
130 + ] ;
131 + sp:arg2 <http://www.reportinghub.no/ep/schema/flow#Consume-emitted> ;
132 + sp:arg3 [ rdf:type sp:if ;
133 + sp:arg1 [ rdf:type sp:eq ;
134 + sp:arg1 spin:_arg1 ;
135 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#RF_consume-flare>
136 + ] ;
137 + sp:arg2 <http://www.reportinghub.no/ep/schema/flow#Consume-flare> ;
138 + sp:arg3 [ rdf:type sp:if ;
139 + sp:arg1 [ rdf:type sp:eq ;
140 + sp:arg1 spin:_arg1 ;
141 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#RF_consume-fuel>
142 + ] ;
143 + sp:arg2 <http://www.reportinghub.no/ep/schema/flow#Consume-fuel> ;
144 + sp:arg3 [ rdf:type sp:if ;
145 + sp:arg1 [ rdf:type sp:eq ;
146 + sp:arg1 spin:_arg1 ;
147 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#RF_consume-noncompressor>
148 + ] ;
149 + sp:arg2 <http://www.reportinghub.no/ep/schema/flow#Consume-noncompressor> ;
150 + sp:arg3 [ rdf:type sp:if ;
151 + sp:arg1 [ rdf:type sp:eq ;
152 + sp:arg1 spin:_arg1 ;
153 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#RF_consume-venting>
154 + ] ;
155 + sp:arg2 <http://www.reportinghub.no/ep/schema/flow#Consume-venting> ;
156 + sp:arg3 [ rdf:type sp:if ;
157 + sp:arg1 [ rdf:type sp:eq ;
158 + sp:arg1 spin:_arg1 ;
159 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#RF_consume>
160 + ] ;
161 + sp:arg2 <http://www.reportinghub.no/ep/schema/flow#Consume> ;
162 + sp:arg3 [ rdf:type sp:if ;
163 + sp:arg1 [ rdf:type sp:eq ;
164 + sp:arg1 spin:_arg1 ;
165 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#RF_export-nominated>
166 + ] ;
167 + sp:arg2 <http://www.reportinghub.no/ep/schema/flow#Export-nominated> ;
168 + sp:arg3 [ rdf:type sp:if ;
169 + sp:arg1 [ rdf:type sp:eq ;
170 + sp:arg1 spin:_arg1 ;
171 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#RF_export-requested>
172 + ] ;
173 + sp:arg2 <http://www.reportinghub.no/ep/schema/flow#Export-requested> ;
174 + sp:arg3 [ rdf:type sp:if ;
175 + sp:arg1 [ rdf:type sp:eq ;
176 + sp:arg1 spin:_arg1 ;
177 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#RF_export-shortfall>
178 + ] ;
179 + sp:arg2 <http://www.reportinghub.no/ep/schema/flow#Export-shortfall> ;
180 + sp:arg3 [ rdf:type sp:if ;
181 + sp:arg1 [ rdf:type sp:eq ;
182 + sp:arg1 spin:_arg1 ;
183 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#RF_export>
184 + ] ;
185 + sp:arg2 <http://www.reportinghub.no/ep/schema/flow#Export> ;
186 + sp:arg3 [ rdf:type sp:if ;
187 + sp:arg1 [ rdf:type sp:eq ;
188 + sp:arg1 spin:_arg1 ;
189 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#RF_gaslift>
190 + ] ;
191 + sp:arg2 <http://www.reportinghub.no/ep/schema/flow#Gaslift> ;
192 + sp:arg3 [ rdf:type sp:if ;
193 + sp:arg1 [ rdf:type sp:eq ;
194 + sp:arg1 spin:_arg1 ;
195 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#RF_import>
196 + ] ;
197 + sp:arg2 <http://www.reportinghub.no/ep/schema/flow#Import> ;
198 + sp:arg3 [ rdf:type sp:if ;
199 + sp:arg1 [ rdf:type sp:eq ;
200 + sp:arg1 spin:_arg1 ;
201 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#RF_injection>
202 + ] ;
203 + sp:arg2 <http://www.reportinghub.no/ep/schema/flow#Injection> ;
204 + sp:arg3 [ rdf:type sp:if ;
205 + sp:arg1 [ rdf:type sp:eq ;
206 + sp:arg1 spin:_arg1 ;
207 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#RF_inventory>
208 + ] ;
209 + sp:arg2 <http://www.reportinghub.no/ep/schema/flow#Inventory> ;
210 + sp:arg3 [ rdf:type sp:if ;
211 + sp:arg1 [ rdf:type sp:eq ;
212 + sp:arg1 spin:_arg1 ;
213 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#RF_overboard>
214 + ] ;
215 + sp:arg2 <http://www.reportinghub.no/ep/schema/flow#Overboard> ;
216 + sp:arg3 [ rdf:type sp:if ;
217 + sp:arg1 [ rdf:type sp:eq ;
218 + sp:arg1 spin:_arg1 ;
219 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#RF_production>
220 + ] ;
221 + sp:arg2 <http://www.reportinghub.no/ep/schema/flow#Production> ;
222 + sp:arg3 [ rdf:type sp:if ;
223 + sp:arg1 [ rdf:type sp:eq ;
224 + sp:arg1 spin:_arg1 ;
225 + sp:arg2 <http://www.witsml.org/schemas/131/addendum/combo#ReportingFlow_RF_unknown>
226 + ] ;
227 + sp:arg2 <http://www.reportinghub.no/ep/schema/flow#Flow> ;
228 + sp:arg3 <http://www.reportinghub.no/ep/schema/flow#Flow>
229 + ]
230 + ]
231 + ]
232 + ]
233 + ]
234 + ]
235 + ]
236 + ]
237 + ]
238 + ]
239 + ]
240 + ]
241 + ]
242 + ]
243 + ]
244 + ]
245 + ]
246 + ]
247 + ]
248 + ]
249 + ] ;
250 + sp:variable _:b4
251 + ])
252 + ] .
253 +
70 ep-dpr-spin-lib:selectProductionFacilityType 254 ep-dpr-spin-lib:selectProductionFacilityType
71 rdf:type spin:Function ; 255 rdf:type spin:Function ;
72 rdfs:label "select ProductionFacilityType"^^xsd:string ; 256 rdfs:label "select ProductionFacilityType"^^xsd:string ;
73 rdfs:subClassOf ep-dpr-spin-lib:Function ; 257 rdfs:subClassOf ep-dpr-spin-lib:Function ;
74 spin:body 258 spin:body
75 [ rdf:type sp:Select ; 259 [ rdf:type sp:Select ;
76 - sp:resultVariables (_:b3) ; 260 + sp:resultVariables (_:b5) ;
77 sp:where ([ rdf:type sp:Bind ; 261 sp:where ([ rdf:type sp:Bind ;
78 sp:expression 262 sp:expression
79 [ rdf:type sp:if ; 263 [ rdf:type sp:if ;
...@@ -252,7 +436,7 @@ ep-dpr-spin-lib:selectProductionFacilityType ...@@ -252,7 +436,7 @@ ep-dpr-spin-lib:selectProductionFacilityType
252 ] 436 ]
253 ] 437 ]
254 ] ; 438 ] ;
255 - sp:variable _:b3 439 + sp:variable _:b5
256 ]) 440 ])
257 ] . 441 ] .
258 442
...@@ -262,7 +446,7 @@ ep-dpr-spin-lib:selectProductionFlowDefinitionType ...@@ -262,7 +446,7 @@ ep-dpr-spin-lib:selectProductionFlowDefinitionType
262 rdfs:subClassOf ep-dpr-spin-lib:Function ; 446 rdfs:subClassOf ep-dpr-spin-lib:Function ;
263 spin:body 447 spin:body
264 [ rdf:type sp:Select ; 448 [ rdf:type sp:Select ;
265 - sp:resultVariables (_:b4) ; 449 + sp:resultVariables (_:b6) ;
266 sp:where ([ rdf:type sp:Bind ; 450 sp:where ([ rdf:type sp:Bind ;
267 sp:expression 451 sp:expression
268 [ rdf:type sp:if ; 452 [ rdf:type sp:if ;
...@@ -322,7 +506,7 @@ ep-dpr-spin-lib:selectProductionFlowDefinitionType ...@@ -322,7 +506,7 @@ ep-dpr-spin-lib:selectProductionFlowDefinitionType
322 ] 506 ]
323 ] 507 ]
324 ] ; 508 ] ;
325 - sp:variable _:b4 509 + sp:variable _:b6
326 ]) 510 ])
327 ] . 511 ] .
328 512
...@@ -332,7 +516,7 @@ ep-dpr-spin-lib:selectProductionFlowPurposeType ...@@ -332,7 +516,7 @@ ep-dpr-spin-lib:selectProductionFlowPurposeType
332 rdfs:subClassOf ep-dpr-spin-lib:Function ; 516 rdfs:subClassOf ep-dpr-spin-lib:Function ;
333 spin:body 517 spin:body
334 [ rdf:type sp:Select ; 518 [ rdf:type sp:Select ;
335 - sp:resultVariables (_:b5) ; 519 + sp:resultVariables (_:b7) ;
336 sp:where ([ rdf:type sp:Bind ; 520 sp:where ([ rdf:type sp:Bind ;
337 sp:expression 521 sp:expression
338 [ rdf:type sp:if ; 522 [ rdf:type sp:if ;
...@@ -483,16 +667,20 @@ ep-dpr-spin-lib:selectProductionFlowPurposeType ...@@ -483,16 +667,20 @@ ep-dpr-spin-lib:selectProductionFlowPurposeType
483 ] 667 ]
484 ] 668 ]
485 ] ; 669 ] ;
486 - sp:variable _:b5 670 + sp:variable _:b7
487 ]) 671 ])
488 ] . 672 ] .
489 673
490 -_:b1 sp:varName "uri"^^xsd:string . 674 +_:b4 sp:varName "productType"^^xsd:string .
491 675
492 -_:b2 sp:varName "uri"^^xsd:string . 676 +_:b7 sp:varName "productionFlowPurposeType"^^xsd:string .
677 +
678 +_:b6 sp:varName "productionFlowDefinitionType"^^xsd:string .
493 679
494 -_:b3 sp:varName "productionFacilityType"^^xsd:string . 680 +_:b5 sp:varName "productionFacilityType"^^xsd:string .
495 681
496 -_:b5 sp:varName "productionFlowPurposeType"^^xsd:string . 682 +_:b2 sp:varName "uri"^^xsd:string .
683 +
684 +_:b1 sp:varName "uri"^^xsd:string .
497 685
498 -_:b4 sp:varName "productionFlowDefinitionType"^^xsd:string . 686 +_:b3 sp:varName "uri"^^xsd:string .
......
1 -# Saved by TopBraid on Sun Oct 09 16:28:54 BST 2011 1 +# Saved by TopBraid on Sun Oct 09 20:00:04 BST 2011
2 # baseURI: null 2 # baseURI: null
3 3
4 @prefix composite: <http://www.topbraid.org/2007/05/composite.owl#> . 4 @prefix composite: <http://www.topbraid.org/2007/05/composite.owl#> .
......
1 -# Saved by TopBraid on Sun Oct 09 16:13:48 BST 2011 1 +# Saved by TopBraid on Sun Oct 09 19:58:53 BST 2011
2 # baseURI: http://www.reportinghub.no/ep/transform/1.0/dpr/productVolume 2 # baseURI: http://www.reportinghub.no/ep/transform/1.0/dpr/productVolume
3 # imports: http://www.reportinghub.no/ep/spin/1.1/lib 3 # imports: http://www.reportinghub.no/ep/spin/1.1/lib
4 -# imports: http://www.reportinghub.no/ep/schema/1.0/core
5 # imports: http://www.reportinghub.no/ep/dpr/spin/1.1/lib 4 # imports: http://www.reportinghub.no/ep/dpr/spin/1.1/lib
5 +# imports: http://www.reportinghub.no/ep/schema/1.0/core
6 # imports: http://www.reportinghub.no/ep/schema/1.0/facility 6 # imports: http://www.reportinghub.no/ep/schema/1.0/facility
7 # imports: http://spinrdf.org/spin 7 # imports: http://spinrdf.org/spin
8 # imports: http://www.witsml.org/schemas/131/addendum/combo 8 # imports: http://www.witsml.org/schemas/131/addendum/combo
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
13 @prefix owl: <http://www.w3.org/2002/07/owl#> . 13 @prefix owl: <http://www.w3.org/2002/07/owl#> .
14 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . 14 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
15 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . 15 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
16 +@prefix smf: <http://topbraid.org/sparqlmotionfunctions#> .
16 @prefix sp: <http://spinrdf.org/sp#> . 17 @prefix sp: <http://spinrdf.org/sp#> .
17 @prefix spin: <http://spinrdf.org/spin#> . 18 @prefix spin: <http://spinrdf.org/spin#> .
18 @prefix spl: <http://spinrdf.org/spl#> . 19 @prefix spl: <http://spinrdf.org/spl#> .
...@@ -20,354 +21,474 @@ ...@@ -20,354 +21,474 @@
20 21
21 <http://www.reportinghub.no/ep/transform/1.0/dpr/productVolume> 22 <http://www.reportinghub.no/ep/transform/1.0/dpr/productVolume>
22 rdf:type owl:Ontology ; 23 rdf:type owl:Ontology ;
23 - owl:imports <http://www.reportinghub.no/ep/dpr/spin/1.1/lib> , <http://www.reportinghub.no/ep/schema/1.0/facility> , <http://www.witsml.org/schemas/131/addendum/combo> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/spin/1.1/lib> ; 24 + owl:imports <http://www.reportinghub.no/ep/spin/1.1/lib> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/core> , <http://www.witsml.org/schemas/131/addendum/combo> , <http://www.reportinghub.no/ep/schema/1.0/facility> , <http://www.reportinghub.no/ep/dpr/spin/1.1/lib> ;
24 owl:versionInfo "Created with TopBraid Composer"^^xsd:string . 25 owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
25 26
26 <http://www.witsml.org/schemas/131/addendum/combo#Co_productVolume> 27 <http://www.witsml.org/schemas/131/addendum/combo#Co_productVolume>
27 spin:rule 28 spin:rule
28 [ rdf:type sp:Construct ; 29 [ rdf:type sp:Construct ;
29 - rdfs:comment "STEP 20102 record the flows"^^xsd:string ; 30 + rdfs:comment """STEP 20101c Set the type of temporal part
30 - sp:templates ([ sp:object _:b1 ; 31 +kind and periodKind are not yet processed"""^^xsd:string ;
31 - sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ; 32 + sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/flow#TemporalPartOfAFlow> ;
32 - sp:subject _:b2
33 - ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ;
34 sp:predicate rdf:type ; 33 sp:predicate rdf:type ;
35 sp:subject _:b1 34 sp:subject _:b1
36 - ] [ sp:object _:b3 ; 35 + ]) ;
37 - sp:predicate rdf:type ; 36 + sp:where ([ sp:object
37 + [ sp:varName "kind"^^xsd:string
38 + ] ;
39 + sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kind> ;
40 + sp:subject spin:_this
41 + ] [ sp:object
42 + [ sp:varName "periodKindRef"^^xsd:string
43 + ] ;
44 + sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#periodKindRef> ;
45 + sp:subject spin:_this
46 + ] [ sp:object
47 + [ sp:varName "dateEnd"^^xsd:string
48 + ] ;
49 + sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dateStart> ;
50 + sp:subject spin:_this
51 + ] [ sp:object spin:_this ;
52 + sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
38 sp:subject _:b1 53 sp:subject _:b1
39 - ] [ sp:object _:b4 ; 54 + ])
55 + ] ;
56 + spin:rule
57 + [ rdf:type sp:Construct ;
58 + rdfs:comment "STEP 20101b Record the Temporal part of the flows for the day"^^xsd:string ;
59 + sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/flow#TemporalPartOfAFlow> ;
40 sp:predicate rdf:type ; 60 sp:predicate rdf:type ;
41 - sp:subject _:b1 61 + sp:subject _:b2
62 + ] [ sp:object spin:_this ;
63 + sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
64 + sp:subject _:b2
65 + ]) ;
66 + sp:where ([ sp:object _:b3 ;
67 + sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#name> ;
68 + sp:subject spin:_this
69 + ] [ sp:object _:b4 ;
70 + sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dateStart> ;
71 + sp:subject spin:_this
42 ] [ sp:object _:b5 ; 72 ] [ sp:object _:b5 ;
73 + sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dateStart> ;
74 + sp:subject spin:_this
75 + ] [ rdf:type sp:Bind ;
76 + sp:expression
77 + [ rdf:type ep-spin-lib:normalizeString ;
78 + sp:arg1 _:b3
79 + ] ;
80 + sp:variable _:b6
81 + ] [ rdf:type sp:Bind ;
82 + sp:expression
83 + [ rdf:type ep-dpr-spin-lib:buildProductionFlowsForAPeriodURI ;
84 + sp:arg1 _:b6 ;
85 + sp:arg2 _:b4 ;
86 + sp:arg3 _:b5
87 + ] ;
88 + sp:variable _:b2
89 + ])
90 + ] ;
91 + spin:rule
92 + [ rdf:type sp:Construct ;
93 + rdfs:comment "STEP 20101a Record the Temporal part of the flows for the day"^^xsd:string ;
94 + sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/flow#TemporalPartOfAFlow> ;
95 + sp:predicate rdf:type ;
96 + sp:subject _:b7
97 + ] [ sp:object spin:_this ;
98 + sp:predicate <http://www.reportinghub.no/ep/schema/core#derivedFrom> ;
99 + sp:subject _:b7
100 + ]) ;
101 + sp:where ([ sp:object _:b8 ;
102 + sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#name> ;
103 + sp:subject spin:_this
104 + ] [ sp:object _:b9 ;
105 + sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dTimStart> ;
106 + sp:subject spin:_this
107 + ] [ sp:object _:b10 ;
108 + sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dTimStart> ;
109 + sp:subject spin:_this
110 + ] [ rdf:type sp:Bind ;
111 + sp:expression
112 + [ rdf:type ep-spin-lib:normalizeString ;
113 + sp:arg1 _:b8
114 + ] ;
115 + sp:variable _:b11
116 + ] [ rdf:type sp:Bind ;
117 + sp:expression
118 + [ rdf:type ep-dpr-spin-lib:buildProductionFlowsForAPeriodURI ;
119 + sp:arg1 _:b11 ;
120 + sp:arg2 _:b9 ;
121 + sp:arg3 _:b10
122 + ] ;
123 + sp:variable _:b7
124 + ])
125 + ] ;
126 + spin:rule
127 + [ rdf:type sp:Construct ;
128 + rdfs:comment "STEP 20103 record the flows"^^xsd:string ;
129 + sp:templates ([ sp:object _:b12 ;
130 + sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
131 + sp:subject _:b13
132 + ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlow> ;
133 + sp:predicate rdf:type ;
134 + sp:subject _:b12
135 + ] [ sp:object _:b14 ;
136 + sp:predicate rdf:type ;
137 + sp:subject _:b12
138 + ] [ sp:object _:b15 ;
139 + sp:predicate rdf:type ;
140 + sp:subject _:b12
141 + ] [ sp:object _:b16 ;
43 sp:predicate rdfs:label ; 142 sp:predicate rdfs:label ;
44 - sp:subject _:b1 143 + sp:subject _:b12
45 ]) ; 144 ]) ;
46 - sp:where ([ sp:object _:b6 ; 145 + sp:where ([ sp:object _:b17 ;
47 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#facilityRef> ; 146 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#facilityRef> ;
48 sp:subject spin:_this 147 sp:subject spin:_this
49 - ] [ sp:object _:b7 ; 148 + ] [ sp:object _:b18 ;
50 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#nameRef> ; 149 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#nameRef> ;
51 - sp:subject _:b6 150 + sp:subject _:b17
52 - ] [ sp:object _:b8 ; 151 + ] [ sp:object _:b19 ;
53 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 152 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
54 - sp:subject _:b7 153 + sp:subject _:b18
55 - ] [ sp:object _:b9 ; 154 + ] [ sp:object _:b20 ;
56 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#flowRef> ; 155 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#flowRef> ;
57 - sp:subject _:b6 156 + sp:subject _:b17
58 - ] [ sp:object _:b5 ; 157 + ] [ sp:object _:b16 ;
59 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#name> ; 158 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#name> ;
60 - sp:subject _:b9 159 + sp:subject _:b20
61 - ] [ sp:object _:b10 ; 160 + ] [ sp:object _:b21 ;
62 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kindRef> ; 161 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kindRef> ;
63 - sp:subject _:b9 162 + sp:subject _:b20
64 ] [ rdf:type sp:Optional ; 163 ] [ rdf:type sp:Optional ;
65 sp:elements ([ sp:object 164 sp:elements ([ sp:object
66 [ sp:varName "flowDirection"^^xsd:string 165 [ sp:varName "flowDirection"^^xsd:string
67 ] ; 166 ] ;
68 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#directionRef> ; 167 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#directionRef> ;
69 - sp:subject _:b9 168 + sp:subject _:b20
70 ]) 169 ])
71 ] [ rdf:type sp:Optional ; 170 ] [ rdf:type sp:Optional ;
72 sp:elements ([ sp:object 171 sp:elements ([ sp:object
73 [ sp:varName "flowQualifier"^^xsd:string 172 [ sp:varName "flowQualifier"^^xsd:string
74 ] ; 173 ] ;
75 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#qualifierRef> ; 174 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#qualifierRef> ;
76 - sp:subject _:b9 175 + sp:subject _:b20
77 ]) 176 ])
78 ] [ rdf:type sp:Bind ; 177 ] [ rdf:type sp:Bind ;
79 sp:expression 178 sp:expression
80 [ rdf:type ep-spin-lib:normalizeString ; 179 [ rdf:type ep-spin-lib:normalizeString ;
81 - sp:arg1 _:b8 180 + sp:arg1 _:b19
82 ] ; 181 ] ;
83 - sp:variable _:b11 182 + sp:variable _:b22
84 ] [ rdf:type sp:Bind ; 183 ] [ rdf:type sp:Bind ;
85 sp:expression 184 sp:expression
86 [ rdf:type ep-dpr-spin-lib:buildProductionFacilityURI ; 185 [ rdf:type ep-dpr-spin-lib:buildProductionFacilityURI ;
87 - sp:arg1 _:b11 186 + sp:arg1 _:b22
88 ] ; 187 ] ;
89 - sp:variable _:b2 188 + sp:variable _:b13
90 ] [ rdf:type sp:Bind ; 189 ] [ rdf:type sp:Bind ;
91 sp:expression 190 sp:expression
92 [ rdf:type ep-spin-lib:normalizeString ; 191 [ rdf:type ep-spin-lib:normalizeString ;
93 - sp:arg1 _:b5 192 + sp:arg1 _:b16
94 ] ; 193 ] ;
95 - sp:variable _:b12 194 + sp:variable _:b23
96 ] [ rdf:type sp:Bind ; 195 ] [ rdf:type sp:Bind ;
97 sp:expression 196 sp:expression
98 [ rdf:type ep-dpr-spin-lib:buildProductionFlowURI ; 197 [ rdf:type ep-dpr-spin-lib:buildProductionFlowURI ;
99 - sp:arg1 _:b12 198 + sp:arg1 _:b23
100 ] ; 199 ] ;
101 - sp:variable _:b1 200 + sp:variable _:b12
102 ] [ rdf:type sp:Bind ; 201 ] [ rdf:type sp:Bind ;
103 sp:expression 202 sp:expression
104 [ rdf:type ep-dpr-spin-lib:selectProductionFlowPurposeType ; 203 [ rdf:type ep-dpr-spin-lib:selectProductionFlowPurposeType ;
105 - sp:arg1 _:b10 204 + sp:arg1 _:b21
106 ] ; 205 ] ;
107 - sp:variable _:b3 206 + sp:variable _:b14
108 ] [ rdf:type sp:Bind ; 207 ] [ rdf:type sp:Bind ;
109 sp:expression 208 sp:expression
110 [ rdf:type ep-dpr-spin-lib:selectProductionFlowDefinitionType ; 209 [ rdf:type ep-dpr-spin-lib:selectProductionFlowDefinitionType ;
111 - sp:arg1 _:b10 210 + sp:arg1 _:b21
112 ] ; 211 ] ;
113 - sp:variable _:b4 212 + sp:variable _:b15
114 ]) 213 ])
115 ] ; 214 ] ;
116 spin:rule 215 spin:rule
117 [ rdf:type sp:Construct ; 216 [ rdf:type sp:Construct ;
118 - rdfs:comment "STEP 9999 stream of conciousness"^^xsd:string ; 217 + rdfs:comment "STEP 20104 record the products"^^xsd:string ;
119 - sp:templates () ; 218 + sp:templates ([ sp:object _:b24 ;
120 - sp:where ([ sp:object _:b13 ; 219 + sp:predicate <http://www.reportinghub.no/ep/schema/core#hasPart> ;
220 + sp:subject _:b25
221 + ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#Flow> ;
222 + sp:predicate rdf:type ;
223 + sp:subject _:b24
224 + ] [ sp:object _:b26 ;
225 + sp:predicate <http://www.reportinghub.no/ep/schema/flow#flowOf> ;
226 + sp:subject _:b24
227 + ] [ sp:object <http://www.reportinghub.no/ep/schema/well#Fluid> ;
228 + sp:predicate rdf:type ;
229 + sp:subject _:b26
230 + ] [ sp:object _:b27 ;
231 + sp:predicate rdf:type ;
232 + sp:subject _:b26
233 + ]) ;
234 + sp:where ([ sp:object _:b28 ;
121 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#facilityRef> ; 235 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#facilityRef> ;
122 sp:subject spin:_this 236 sp:subject spin:_this
123 - ] [ sp:object _:b14 ; 237 + ] [ sp:object _:b29 ;
124 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#nameRef> ; 238 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#nameRef> ;
125 - sp:subject _:b13 239 + sp:subject _:b28
126 - ] [ sp:object 240 + ] [ sp:object _:b30 ;
127 - [ sp:varName "facilityName"^^xsd:string
128 - ] ;
129 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 241 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
130 - sp:subject _:b14 242 + sp:subject _:b29
131 - ] [ rdf:type sp:Optional ; 243 + ] [ sp:object _:b31 ;
132 - sp:elements ([ sp:object
133 - [ sp:varName "facilityNamingSystem"^^xsd:string
134 - ] ;
135 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#namingSystem> ;
136 - sp:subject _:b14
137 - ])
138 - ] [ rdf:type sp:Optional ;
139 - sp:elements ([ sp:object
140 - [ sp:varName "facilityKind"^^xsd:string
141 - ] ;
142 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kindRef> ;
143 - sp:subject _:b14
144 - ])
145 - ] [ sp:object _:b15 ;
146 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#flowRef> ; 244 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#flowRef> ;
147 - sp:subject _:b13 245 + sp:subject _:b28
148 - ] [ sp:object 246 + ] [ sp:object _:b32 ;
149 - [ sp:varName "flowName"^^xsd:string
150 - ] ;
151 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#name> ; 247 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#name> ;
152 - sp:subject _:b15 248 + sp:subject _:b31
153 - ] [ sp:object 249 + ] [ sp:object _:b33 ;
154 - [ sp:varName "flowKind"^^xsd:string
155 - ] ;
156 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kindRef> ;
157 - sp:subject _:b15
158 - ] [ sp:object
159 - [ sp:varName "flowDirection"^^xsd:string
160 - ] ;
161 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#directionRef> ;
162 - sp:subject _:b15
163 - ] [ sp:object
164 - [ sp:varName "flowQualifier"^^xsd:string
165 - ] ;
166 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#qualifierRef> ;
167 - sp:subject _:b15
168 - ] [ sp:object _:b16 ;
169 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#productRef> ; 250 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#productRef> ;
170 - sp:subject _:b15 251 + sp:subject _:b34
171 - ] [ sp:object _:b17 ; 252 + ] [ sp:object _:b35 ;
172 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#nameRef> ;
173 - sp:subject _:b16
174 - ] [ sp:object
175 - [ sp:varName "productName"^^xsd:string
176 - ] ;
177 - sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
178 - sp:subject _:b17
179 - ] [ rdf:type sp:Optional ;
180 - sp:elements ([ sp:object
181 - [ sp:varName "productNamingSystem"^^xsd:string
182 - ] ;
183 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#namingSystem> ;
184 - sp:subject _:b17
185 - ])
186 - ] [ rdf:type sp:Optional ;
187 - sp:elements ([ sp:object _:b18 ;
188 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kindRef> ;
189 - sp:subject _:b17
190 - ])
191 - ] [ sp:object _:b18 ;
192 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kindRef> ; 253 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kindRef> ;
193 - sp:subject _:b16 254 + sp:subject _:b33
194 - ] [ sp:object _:b19 ; 255 + ] [ sp:object _:b36 ;
195 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#periodRef> ; 256 + sp:predicate rdfs:label ;
196 - sp:subject _:b16 257 + sp:subject _:b27
197 - ] [ sp:object 258 + ] [ rdf:type sp:Bind ;
198 - [ sp:varName "periodKind"^^xsd:string 259 + sp:expression
260 + [ rdf:type ep-spin-lib:normalizeString ;
261 + sp:arg1 _:b30
199 ] ; 262 ] ;
200 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kindRef> ; 263 + sp:variable _:b37
201 - sp:subject _:b19 264 + ] [ rdf:type sp:Bind ;
202 - ] [ sp:object 265 + sp:expression
203 - [ sp:varName "startTime"^^xsd:string 266 + [ rdf:type ep-dpr-spin-lib:buildProductionFacilityURI ;
267 + sp:arg1 _:b37
204 ] ; 268 ] ;
205 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dTimStart> ; 269 + sp:variable
206 - sp:subject _:b19 270 + [ sp:varName "productionFacility"^^xsd:string
207 - ] [ sp:object 271 + ]
208 - [ sp:varName "endTime"^^xsd:string 272 + ] [ rdf:type sp:Bind ;
273 + sp:expression
274 + [ rdf:type ep-spin-lib:normalizeString ;
275 + sp:arg1 _:b32
209 ] ; 276 ] ;
210 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#dTimEnd> ; 277 + sp:variable _:b38
211 - sp:subject _:b19 278 + ] [ rdf:type sp:Bind ;
212 - ] [ rdf:type sp:Optional ; 279 + sp:expression
213 - sp:elements ([ sp:object _:b20 ; 280 + [ rdf:type ep-dpr-spin-lib:buildProductionFlowURI ;
214 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#volumeRef> ; 281 + sp:arg1 _:b38
215 - sp:subject _:b19
216 - ] [ sp:object
217 - [ sp:varName "realVolume"^^xsd:string
218 ] ; 282 ] ;
219 - sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 283 + sp:variable _:b25
220 - sp:subject _:b20 284 + ] [ rdf:type sp:Bind ;
221 - ] [ sp:object 285 + sp:expression
222 - [ sp:varName "uomVolume"^^xsd:string 286 + [ rdf:type ep-spin-lib:normalizeString ;
287 + sp:arg1 [ sp:varName "productName"^^xsd:string
288 + ]
223 ] ; 289 ] ;
224 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#uomRef> ; 290 + sp:variable
225 - sp:subject _:b20 291 + [ sp:varName "normalizedProductName"^^xsd:string
226 - ]) 292 + ]
227 - ] [ rdf:type sp:Optional ; 293 + ] [ rdf:type sp:Bind ;
228 - sp:elements ([ sp:object _:b21 ; 294 + sp:expression
229 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#volumeStdRef> ; 295 + [ rdf:type ep-dpr-spin-lib:selectProductType ;
230 - sp:subject _:b19 296 + sp:arg1 _:b35
231 - ] [ sp:object
232 - [ sp:varName "realVolumeStd"^^xsd:string
233 ] ; 297 ] ;
234 - sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 298 + sp:variable _:b27
235 - sp:subject _:b21 299 + ] [ rdf:type sp:Bind ;
236 - ] [ sp:object 300 + sp:expression
237 - [ sp:varName "uomVolumeStd"^^xsd:string 301 + [ rdf:type ep-spin-lib:normalizeString ;
302 + sp:arg1 _:b36
238 ] ; 303 ] ;
239 - sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#uomRef> ; 304 + sp:variable _:b39
240 - sp:subject _:b21 305 + ] [ rdf:type sp:Bind ;
241 - ]) 306 + sp:expression
307 + [ rdf:type smf:deriveURI ;
308 + sp:arg1 _:b34 ;
309 + sp:arg2 _:b39
310 + ] ;
311 + sp:variable _:b24
242 ]) 312 ])
243 ] ; 313 ] ;
244 spin:rule 314 spin:rule
245 [ rdf:type sp:Construct ; 315 [ rdf:type sp:Construct ;
246 - rdfs:comment """STEP 20101 Record the Facility that has the flows 316 + rdfs:comment """STEP 20102 Record the Facility that has the flows
247 Nothing is done with the namingSystem!"""^^xsd:string ; 317 Nothing is done with the namingSystem!"""^^xsd:string ;
248 sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ; 318 sp:templates ([ sp:object <http://www.reportinghub.no/ep/schema/facility#ProductionFacility> ;
249 sp:predicate rdf:type ; 319 sp:predicate rdf:type ;
250 - sp:subject _:b22 320 + sp:subject _:b40
251 - ] [ sp:object _:b23 ; 321 + ] [ sp:object _:b41 ;
252 sp:predicate rdf:type ; 322 sp:predicate rdf:type ;
253 - sp:subject _:b22 323 + sp:subject _:b40
254 - ] [ sp:object _:b24 ; 324 + ] [ sp:object _:b42 ;
255 sp:predicate rdfs:label ; 325 sp:predicate rdfs:label ;
256 - sp:subject _:b22 326 + sp:subject _:b40
257 ]) ; 327 ]) ;
258 - sp:where ([ sp:object _:b25 ; 328 + sp:where ([ sp:object _:b43 ;
259 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#facilityRef> ; 329 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#facilityRef> ;
260 sp:subject spin:_this 330 sp:subject spin:_this
261 - ] [ sp:object _:b26 ; 331 + ] [ sp:object _:b44 ;
262 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#nameRef> ; 332 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#nameRef> ;
263 - sp:subject _:b25 333 + sp:subject _:b43
264 - ] [ sp:object _:b24 ; 334 + ] [ sp:object _:b42 ;
265 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 335 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
266 - sp:subject _:b26 336 + sp:subject _:b44
267 ] [ rdf:type sp:Optional ; 337 ] [ rdf:type sp:Optional ;
268 sp:elements ([ sp:object 338 sp:elements ([ sp:object
269 [ sp:varName "facilityNamingSystem"^^xsd:string 339 [ sp:varName "facilityNamingSystem"^^xsd:string
270 ] ; 340 ] ;
271 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#namingSystem> ; 341 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#namingSystem> ;
272 - sp:subject _:b26 342 + sp:subject _:b44
273 ]) 343 ])
274 ] [ rdf:type sp:Optional ; 344 ] [ rdf:type sp:Optional ;
275 - sp:elements ([ sp:object _:b27 ; 345 + sp:elements ([ sp:object _:b45 ;
276 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kindRef> ; 346 sp:predicate <http://www.witsml.org/schemas/131/addendum/combo#kindRef> ;
277 - sp:subject _:b26 347 + sp:subject _:b44
278 ]) 348 ])
279 ] [ rdf:type sp:Bind ; 349 ] [ rdf:type sp:Bind ;
280 sp:expression 350 sp:expression
281 [ rdf:type ep-spin-lib:normalizeString ; 351 [ rdf:type ep-spin-lib:normalizeString ;
282 - sp:arg1 _:b24 352 + sp:arg1 _:b42
283 ] ; 353 ] ;
284 - sp:variable _:b28 354 + sp:variable _:b46
285 ] [ rdf:type sp:Bind ; 355 ] [ rdf:type sp:Bind ;
286 sp:expression 356 sp:expression
287 [ rdf:type ep-dpr-spin-lib:buildProductionFacilityURI ; 357 [ rdf:type ep-dpr-spin-lib:buildProductionFacilityURI ;
288 - sp:arg1 _:b28 358 + sp:arg1 _:b46
289 ] ; 359 ] ;
290 - sp:variable _:b22 360 + sp:variable _:b40
291 ] [ rdf:type sp:Bind ; 361 ] [ rdf:type sp:Bind ;
292 sp:expression 362 sp:expression
293 [ rdf:type ep-dpr-spin-lib:selectProductionFacilityType ; 363 [ rdf:type ep-dpr-spin-lib:selectProductionFacilityType ;
294 - sp:arg1 _:b27 364 + sp:arg1 _:b45
295 ] ; 365 ] ;
296 - sp:variable _:b23 366 + sp:variable _:b41
297 ]) 367 ])
298 ] . 368 ] .
299 369
300 -_:b28 370 +_:b24
371 + sp:varName "productFlow"^^xsd:string .
372 +
373 +_:b39
374 + sp:varName "normalizedProductTypeName"^^xsd:string .
375 +
376 +_:b25
377 + sp:varName "productionFlow"^^xsd:string .
378 +
379 +_:b38
380 + sp:varName "normalizedFlowName"^^xsd:string .
381 +
382 +_:b37
301 sp:varName "normalizedFacilityName"^^xsd:string . 383 sp:varName "normalizedFacilityName"^^xsd:string .
302 384
385 +_:b36
386 + sp:varName "productTypeName"^^xsd:string .
387 +
303 _:b27 388 _:b27
304 - sp:varName "facilityKind"^^xsd:string . 389 + sp:varName "productType"^^xsd:string .
390 +
391 +_:b35
392 + sp:varName "productKind"^^xsd:string .
393 +
394 +_:b33
395 + sp:varName "product"^^xsd:string .
396 +
397 +_:b34
398 + sp:varName "flow"^^xsd:string .
399 +
400 +_:b32
401 + sp:varName "flowName"^^xsd:string .
402 +
403 +_:b31
404 + sp:varName "flowRef"^^xsd:string .
405 +
406 +_:b30
407 + sp:varName "facilityName"^^xsd:string .
305 408
306 -_:b26 409 +_:b29
307 sp:varName "facilityNameRef"^^xsd:string . 410 sp:varName "facilityNameRef"^^xsd:string .
308 411
309 -_:b25 412 +_:b28
310 sp:varName "facilityRef"^^xsd:string . 413 sp:varName "facilityRef"^^xsd:string .
311 414
312 -_:b24 415 +_:b1 sp:varName "productionFlowsForAPeriod"^^xsd:string .
313 - sp:varName "facilityName"^^xsd:string .
314 416
315 -_:b23 417 +_:b2 sp:varName "productionFlowsForAPeriod"^^xsd:string .
316 - sp:varName "productionFacilityType"^^xsd:string .
317 418
318 -_:b22 419 +_:b6 sp:varName "normalizedProductionFlowsName"^^xsd:string .
319 - sp:varName "productionFacility"^^xsd:string .
320 420
321 -_:b21 421 +_:b5 sp:varName "dateEnd"^^xsd:string .
322 - sp:varName "volumeStdRef"^^xsd:string .
323 422
324 -_:b20 423 +_:b4 sp:varName "dateStart"^^xsd:string .
325 - sp:varName "volumeRef"^^xsd:string .
326 424
327 -_:b19 425 +_:b3 sp:varName "productionFlowsName"^^xsd:string .
328 - sp:varName "period"^^xsd:string .
329 426
330 -_:b18 427 +_:b7 sp:varName "productionFlowsForAPeriod"^^xsd:string .
331 - sp:varName "productKind"^^xsd:string .
332 428
333 -_:b17 429 +_:b11
334 - sp:varName "productNameRef"^^xsd:string . 430 + sp:varName "normalizedProductionFlowsName"^^xsd:string .
335 431
336 -_:b16 432 +_:b10
337 - sp:varName "product"^^xsd:string . 433 + sp:varName "dTimEnd"^^xsd:string .
434 +
435 +_:b9 sp:varName "dTimStart"^^xsd:string .
436 +
437 +_:b8 sp:varName "productionFlowsName"^^xsd:string .
338 438
339 _:b15 439 _:b15
340 - sp:varName "flow"^^xsd:string . 440 + sp:varName "productionFlowDefinitionType"^^xsd:string .
341 441
342 _:b14 442 _:b14
343 - sp:varName "facilityNameRef"^^xsd:string . 443 + sp:varName "productionFlowPurposeType"^^xsd:string .
444 +
445 +_:b12
446 + sp:varName "productionFlow"^^xsd:string .
447 +
448 +_:b23
449 + sp:varName "normalizedFlowName"^^xsd:string .
344 450
345 _:b13 451 _:b13
346 - sp:varName "facility"^^xsd:string . 452 + sp:varName "productionFacility"^^xsd:string .
347 453
348 -_:b6 sp:varName "facilityRef"^^xsd:string . 454 +_:b22
455 + sp:varName "normalizedFacilityName"^^xsd:string .
349 456
350 -_:b7 sp:varName "facilityNameRef"^^xsd:string . 457 +_:b21
458 + sp:varName "flowKind"^^xsd:string .
351 459
352 -_:b8 sp:varName "facilityName"^^xsd:string . 460 +_:b16
461 + sp:varName "flowName"^^xsd:string .
353 462
354 -_:b9 sp:varName "flowRef"^^xsd:string . 463 +_:b20
464 + sp:varName "flowRef"^^xsd:string .
355 465
356 -_:b5 sp:varName "flowName"^^xsd:string . 466 +_:b19
467 + sp:varName "facilityName"^^xsd:string .
357 468
358 -_:b10 469 +_:b18
359 - sp:varName "flowKind"^^xsd:string . 470 + sp:varName "facilityNameRef"^^xsd:string .
360 471
361 -_:b11 472 +_:b17
362 - sp:varName "normalizedFacilityName"^^xsd:string . 473 + sp:varName "facilityRef"^^xsd:string .
363 474
364 -_:b2 sp:varName "productionFacility"^^xsd:string . 475 +_:b41
476 + sp:varName "productionFacilityType"^^xsd:string .
365 477
366 -_:b12 478 +_:b40
367 - sp:varName "normalizedFlowName"^^xsd:string . 479 + sp:varName "productionFacility"^^xsd:string .
480 +
481 +_:b46
482 + sp:varName "normalizedFacilityName"^^xsd:string .
483 +
484 +_:b45
485 + sp:varName "facilityKind"^^xsd:string .
368 486
369 -_:b1 sp:varName "productionFlow"^^xsd:string . 487 +_:b42
488 + sp:varName "facilityName"^^xsd:string .
370 489
371 -_:b3 sp:varName "productionFlowPurposeType"^^xsd:string . 490 +_:b44
491 + sp:varName "facilityNameRef"^^xsd:string .
372 492
373 -_:b4 sp:varName "productionFlowDefinitionType"^^xsd:string . 493 +_:b43
494 + sp:varName "facilityRef"^^xsd:string .
......