David Price

Updated crew and beds and added first production operation activities

......@@ -27,7 +27,6 @@ dpr-tables:PersonnelInformation
sp:orderBy ([ sp:varName "facilityName"^^xsd:string
]) ;
sp:resultVariables ([ sp:varName "facilityName"^^xsd:string
] [ sp:varName "beds"^^xsd:string
] [ sp:varName "crewNumber"^^xsd:string
] [ sp:varName "crewTypename"^^xsd:string
]) ;
......@@ -94,50 +93,193 @@ dpr-tables:PersonnelInformation
[ sp:varName "productionOperationInstallationReport"^^xsd:string
]
] [ sp:object
[ sp:varName "beds"^^xsd:string
[ sp:varName "crew"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/production-facility#numberOfBedsAvailable> ;
sp:predicate <http://www.reportinghub.no/ep/schema/organization#hasCrew> ;
sp:subject
[ sp:varName "installationPart"^^xsd:string
]
] [ sp:object
[ sp:varName "crewNumber"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/organization#numberInCrew> ;
sp:subject
[ sp:varName "crew"^^xsd:string
]
] [ sp:object
[ sp:varName "crewType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "crew"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/organization#CrewType> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "crewType"^^xsd:string
]
] [ sp:object
[ sp:varName "crewTypename"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "crewType"^^xsd:string
]
])
] ;
rhspin:tableHeaders ("Facility"^^xsd:string "Crew"^^xsd:string "Crew Type"^^xsd:string) .
dpr-tables:ProductionOperationActivity
rdf:type rhspin:TableTemplate ;
rdfs:label "Production Operation Activities"^^xsd:string ;
rdfs:subClassOf rhspin:DPRTableTemplates ;
spin:body
[ rdf:type sp:Select ;
sp:orderBy ([ sp:varName "facilityName"^^xsd:string
] [ sp:varName "activityStart"^^xsd:string
]) ;
sp:resultVariables ([ sp:varName "facilityName"^^xsd:string
] [ sp:varName "activityType"^^xsd:string
] [ sp:varName "activityStart"^^xsd:string
] [ sp:varName "activityFinish"^^xsd:string
] [ sp:varName "activityDescription"^^xsd:string
]) ;
sp:where ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionReport"^^xsd:string
]
] [ sp:object
[ sp:varName "productionReport"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#partOf> ;
sp:subject
[ sp:varName "productionOperationReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionOperationReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionOperationReport"^^xsd:string
]
] [ sp:object
[ sp:varName "temporalPartOfFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:subject
[ sp:varName "productionOperationReport"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFacility"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "temporalPartOfFacility"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/facility#Field> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "facilityName"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
sp:subject
[ sp:varName "productionFacility"^^xsd:string
]
] [ sp:object
[ sp:varName "productionOperationReport"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#partOf> ;
sp:subject
[ sp:varName "productionOperationInstallationReport"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionOperationInstallationReport> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionOperationInstallationReport"^^xsd:string
]
] [ sp:object
[ sp:varName "installationPart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ;
sp:subject
[ sp:varName "productionOperationInstallationReport"^^xsd:string
]
] [ sp:object
[ sp:varName "installationPart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/production-activity#onProductionFacility> ;
sp:subject
[ sp:varName "productionOperation"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/production-activity#ProductionOperation> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionOperation"^^xsd:string
]
] [ sp:object
[ sp:varName "productionOperation"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#partOf> ;
sp:subject
[ sp:varName "operationPart"^^xsd:string
]
] [ sp:object
[ sp:varName "operationPartType"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "operationPart"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "crew"^^xsd:string
[ sp:varName "activityType"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/organization#hasCrew> ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "installationPart"^^xsd:string
[ sp:varName "operationPartType"^^xsd:string
]
] [ sp:object
[ sp:varName "crewNumber"^^xsd:string
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "activityStart"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/organization#numberInCrew> ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#startedAt> ;
sp:subject
[ sp:varName "crew"^^xsd:string
[ sp:varName "operationPart"^^xsd:string
]
] [ sp:object
[ sp:varName "crewType"^^xsd:string
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "activityStart"^^xsd:string
] ;
sp:predicate rdf:type ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#nominallyAt> ;
sp:subject
[ sp:varName "crew"^^xsd:string
[ sp:varName "operationPart"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/organization#CrewType> ;
sp:predicate rdf:type ;
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "activityFinish"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/activity#finishedAt> ;
sp:subject
[ sp:varName "crewType"^^xsd:string
[ sp:varName "operationPart"^^xsd:string
]
] [ sp:object
[ sp:varName "crewTypename"^^xsd:string
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "activityDescription"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#description> ;
sp:subject
[ sp:varName "crewType"^^xsd:string
[ sp:varName "operationPart"^^xsd:string
]
])
])
] ;
rhspin:tableHeaders ("Facility"^^xsd:string "Beds"^^xsd:string "Crew"^^xsd:string "Crew Type"^^xsd:string) .
rhspin:tableHeaders ("Facility"^^xsd:string "Activity Type"^^xsd:string "Started or Nominally At"^^xsd:string "Finished At"^^xsd:string "Desciption"^^xsd:string) .
dpr-tables:WellInformation
rdf:type rhspin:TableTemplate ;
......
......@@ -24,7 +24,34 @@ WHERE {
} }</h2>
<dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:WellInformation" />
<dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:ProductionOperationActivity" />
<dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:PersonnelInformation" />
<table>
<tr><th>Facility</th><th>Total Beds Available</th></tr>
<ui:forEach ui:resultSet="{# SELECT ?facilityName ?beds
WHERE {
?report a ep-report:ProductionReport .
?productionOperationReport ep-core:partOf ?productionReport .
?productionOperationReport a ep-report:ProductionOperationReport .
?productionOperationReport ep-report:reportOn ?temporalPartOfFacility .
?temporalPartOfFacility ep-core:temporalPartOf ?productionFacility .
?productionFacility a ep-fac:Field .
?productionFacility npd:name ?facilityName .
?productionOperationInstallationReport ep-core:partOf ?productionOperationReport .
?productionOperationInstallationReport a ep-report:ProductionOperationInstallationReport .
?productionOperationInstallationReport ep-report:reportOn ?installationPart .
?installationPart ep-prodfac:numberOfBedsAvailable ?beds .
}
}" >
<tr><td>{= ?facilityName }</td><td>{= ?beds}</td></tr>
</ui:forEach>
</table>
</ui:group>
\ No newline at end of file
......