David Price

Updated crew and beds and added first production operation activities

...@@ -27,7 +27,6 @@ dpr-tables:PersonnelInformation ...@@ -27,7 +27,6 @@ dpr-tables:PersonnelInformation
27 sp:orderBy ([ sp:varName "facilityName"^^xsd:string 27 sp:orderBy ([ sp:varName "facilityName"^^xsd:string
28 ]) ; 28 ]) ;
29 sp:resultVariables ([ sp:varName "facilityName"^^xsd:string 29 sp:resultVariables ([ sp:varName "facilityName"^^xsd:string
30 - ] [ sp:varName "beds"^^xsd:string
31 ] [ sp:varName "crewNumber"^^xsd:string 30 ] [ sp:varName "crewNumber"^^xsd:string
32 ] [ sp:varName "crewTypename"^^xsd:string 31 ] [ sp:varName "crewTypename"^^xsd:string
33 ]) ; 32 ]) ;
...@@ -94,14 +93,6 @@ dpr-tables:PersonnelInformation ...@@ -94,14 +93,6 @@ dpr-tables:PersonnelInformation
94 [ sp:varName "productionOperationInstallationReport"^^xsd:string 93 [ sp:varName "productionOperationInstallationReport"^^xsd:string
95 ] 94 ]
96 ] [ sp:object 95 ] [ sp:object
97 - [ sp:varName "beds"^^xsd:string
98 - ] ;
99 - sp:predicate <http://www.reportinghub.no/ep/schema/production-facility#numberOfBedsAvailable> ;
100 - sp:subject
101 - [ sp:varName "installationPart"^^xsd:string
102 - ]
103 - ] [ rdf:type sp:Optional ;
104 - sp:elements ([ sp:object
105 [ sp:varName "crew"^^xsd:string 96 [ sp:varName "crew"^^xsd:string
106 ] ; 97 ] ;
107 sp:predicate <http://www.reportinghub.no/ep/schema/organization#hasCrew> ; 98 sp:predicate <http://www.reportinghub.no/ep/schema/organization#hasCrew> ;
...@@ -135,9 +126,160 @@ dpr-tables:PersonnelInformation ...@@ -135,9 +126,160 @@ dpr-tables:PersonnelInformation
135 [ sp:varName "crewType"^^xsd:string 126 [ sp:varName "crewType"^^xsd:string
136 ] 127 ]
137 ]) 128 ])
129 + ] ;
130 + rhspin:tableHeaders ("Facility"^^xsd:string "Crew"^^xsd:string "Crew Type"^^xsd:string) .
131 +
132 +dpr-tables:ProductionOperationActivity
133 + rdf:type rhspin:TableTemplate ;
134 + rdfs:label "Production Operation Activities"^^xsd:string ;
135 + rdfs:subClassOf rhspin:DPRTableTemplates ;
136 + spin:body
137 + [ rdf:type sp:Select ;
138 + sp:orderBy ([ sp:varName "facilityName"^^xsd:string
139 + ] [ sp:varName "activityStart"^^xsd:string
140 + ]) ;
141 + sp:resultVariables ([ sp:varName "facilityName"^^xsd:string
142 + ] [ sp:varName "activityType"^^xsd:string
143 + ] [ sp:varName "activityStart"^^xsd:string
144 + ] [ sp:varName "activityFinish"^^xsd:string
145 + ] [ sp:varName "activityDescription"^^xsd:string
146 + ]) ;
147 + sp:where ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
148 + sp:predicate rdf:type ;
149 + sp:subject
150 + [ sp:varName "productionReport"^^xsd:string
151 + ]
152 + ] [ sp:object
153 + [ sp:varName "productionReport"^^xsd:string
154 + ] ;
155 + sp:predicate <http://www.reportinghub.no/ep/schema/core#partOf> ;
156 + sp:subject
157 + [ sp:varName "productionOperationReport"^^xsd:string
158 + ]
159 + ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionOperationReport> ;
160 + sp:predicate rdf:type ;
161 + sp:subject
162 + [ sp:varName "productionOperationReport"^^xsd:string
163 + ]
164 + ] [ sp:object
165 + [ sp:varName "temporalPartOfFacility"^^xsd:string
166 + ] ;
167 + sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
168 + sp:subject
169 + [ sp:varName "productionOperationReport"^^xsd:string
170 + ]
171 + ] [ sp:object
172 + [ sp:varName "productionFacility"^^xsd:string
173 + ] ;
174 + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
175 + sp:subject
176 + [ sp:varName "temporalPartOfFacility"^^xsd:string
177 + ]
178 + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#Field> ;
179 + sp:predicate rdf:type ;
180 + sp:subject
181 + [ sp:varName "productionFacility"^^xsd:string
182 + ]
183 + ] [ sp:object
184 + [ sp:varName "facilityName"^^xsd:string
185 + ] ;
186 + sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
187 + sp:subject
188 + [ sp:varName "productionFacility"^^xsd:string
189 + ]
190 + ] [ sp:object
191 + [ sp:varName "productionOperationReport"^^xsd:string
192 + ] ;
193 + sp:predicate <http://www.reportinghub.no/ep/schema/core#partOf> ;
194 + sp:subject
195 + [ sp:varName "productionOperationInstallationReport"^^xsd:string
196 + ]
197 + ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionOperationInstallationReport> ;
198 + sp:predicate rdf:type ;
199 + sp:subject
200 + [ sp:varName "productionOperationInstallationReport"^^xsd:string
201 + ]
202 + ] [ sp:object
203 + [ sp:varName "installationPart"^^xsd:string
204 + ] ;
205 + sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
206 + sp:subject
207 + [ sp:varName "productionOperationInstallationReport"^^xsd:string
208 + ]
209 + ] [ sp:object
210 + [ sp:varName "installationPart"^^xsd:string
211 + ] ;
212 + sp:predicate <http://www.reportinghub.no/ep/schema/production-activity#onProductionFacility> ;
213 + sp:subject
214 + [ sp:varName "productionOperation"^^xsd:string
215 + ]
216 + ] [ sp:object <http://www.reportinghub.no/ep/schema/production-activity#ProductionOperation> ;
217 + sp:predicate rdf:type ;
218 + sp:subject
219 + [ sp:varName "productionOperation"^^xsd:string
220 + ]
221 + ] [ sp:object
222 + [ sp:varName "productionOperation"^^xsd:string
223 + ] ;
224 + sp:predicate <http://www.reportinghub.no/ep/schema/core#partOf> ;
225 + sp:subject
226 + [ sp:varName "operationPart"^^xsd:string
227 + ]
228 + ] [ sp:object
229 + [ sp:varName "operationPartType"^^xsd:string
230 + ] ;
231 + sp:predicate rdf:type ;
232 + sp:subject
233 + [ sp:varName "operationPart"^^xsd:string
234 + ]
235 + ] [ rdf:type sp:Optional ;
236 + sp:elements ([ sp:object
237 + [ sp:varName "activityType"^^xsd:string
238 + ] ;
239 + sp:predicate rdfs:label ;
240 + sp:subject
241 + [ sp:varName "operationPartType"^^xsd:string
242 + ]
243 + ])
244 + ] [ rdf:type sp:Optional ;
245 + sp:elements ([ sp:object
246 + [ sp:varName "activityStart"^^xsd:string
247 + ] ;
248 + sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
249 + sp:subject
250 + [ sp:varName "operationPart"^^xsd:string
251 + ]
252 + ])
253 + ] [ rdf:type sp:Optional ;
254 + sp:elements ([ sp:object
255 + [ sp:varName "activityStart"^^xsd:string
256 + ] ;
257 + sp:predicate <http://www.reportinghub.no/ep/schema/activity#nominallyAt> ;
258 + sp:subject
259 + [ sp:varName "operationPart"^^xsd:string
260 + ]
261 + ])
262 + ] [ rdf:type sp:Optional ;
263 + sp:elements ([ sp:object
264 + [ sp:varName "activityFinish"^^xsd:string
265 + ] ;
266 + sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
267 + sp:subject
268 + [ sp:varName "operationPart"^^xsd:string
269 + ]
270 + ])
271 + ] [ rdf:type sp:Optional ;
272 + sp:elements ([ sp:object
273 + [ sp:varName "activityDescription"^^xsd:string
274 + ] ;
275 + sp:predicate <http://www.reportinghub.no/ep/schema/core#description> ;
276 + sp:subject
277 + [ sp:varName "operationPart"^^xsd:string
278 + ]
279 + ])
138 ]) 280 ])
139 ] ; 281 ] ;
140 - rhspin:tableHeaders ("Facility"^^xsd:string "Beds"^^xsd:string "Crew"^^xsd:string "Crew Type"^^xsd:string) . 282 + rhspin:tableHeaders ("Facility"^^xsd:string "Activity Type"^^xsd:string "Started or Nominally At"^^xsd:string "Finished At"^^xsd:string "Desciption"^^xsd:string) .
141 283
142 dpr-tables:WellInformation 284 dpr-tables:WellInformation
143 rdf:type rhspin:TableTemplate ; 285 rdf:type rhspin:TableTemplate ;
......
...@@ -24,7 +24,34 @@ WHERE { ...@@ -24,7 +24,34 @@ WHERE {
24 24
25 } }</h2> 25 } }</h2>
26 26
27 - <dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:WellInformation" /> 27 + <dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:ProductionOperationActivity" />
28 <dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:PersonnelInformation" /> 28 <dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:PersonnelInformation" />
29 29
30 + <table>
31 + <tr><th>Facility</th><th>Total Beds Available</th></tr>
32 + <ui:forEach ui:resultSet="{# SELECT ?facilityName ?beds
33 +WHERE {
34 + ?report a ep-report:ProductionReport .
35 + ?productionOperationReport ep-core:partOf ?productionReport .
36 + ?productionOperationReport a ep-report:ProductionOperationReport .
37 + ?productionOperationReport ep-report:reportOn ?temporalPartOfFacility .
38 + ?temporalPartOfFacility ep-core:temporalPartOf ?productionFacility .
39 + ?productionFacility a ep-fac:Field .
40 + ?productionFacility npd:name ?facilityName .
41 + ?productionOperationInstallationReport ep-core:partOf ?productionOperationReport .
42 + ?productionOperationInstallationReport a ep-report:ProductionOperationInstallationReport .
43 + ?productionOperationInstallationReport ep-report:reportOn ?installationPart .
44 + ?installationPart ep-prodfac:numberOfBedsAvailable ?beds .
45 +}
46 +
47 +}" >
48 + <tr><td>{= ?facilityName }</td><td>{= ?beds}</td></tr>
49 + </ui:forEach>
50 + </table>
51 +
52 +
53 +
54 +
55 +
56 +
30 </ui:group> 57 </ui:group>
...\ No newline at end of file ...\ No newline at end of file
......