Initial set up of DPR2 as DailyProductionReport using DPR-tables
Showing
4 changed files
with
154 additions
and
23 deletions
| 1 | -# Saved by TopBraid on Wed Oct 12 19:50:38 BST 2011 | ||
| 2 | # baseURI: http://www.reportinghub.no/ep/spin/dpr-tables | 1 | # baseURI: http://www.reportinghub.no/ep/spin/dpr-tables |
| 3 | -# imports: http://www.reportinghub.no/ep/schema/1.0/production | ||
| 4 | # imports: http://spinrdf.org/spin | 2 | # imports: http://spinrdf.org/spin |
| 3 | +# imports: http://www.reportinghub.no/ep/schema/1.0/production | ||
| 5 | # imports: http://www.reportinghub.no/spin/rh | 4 | # imports: http://www.reportinghub.no/spin/rh |
| 6 | 5 | ||
| 7 | @prefix dpr-tables: <http://www.reportinghub.no/ep/spin/dpr-tables#> . | 6 | @prefix dpr-tables: <http://www.reportinghub.no/ep/spin/dpr-tables#> . |
| ... | @@ -16,12 +15,133 @@ | ... | @@ -16,12 +15,133 @@ |
| 16 | 15 | ||
| 17 | <http://www.reportinghub.no/ep/spin/dpr-tables> | 16 | <http://www.reportinghub.no/ep/spin/dpr-tables> |
| 18 | rdf:type owl:Ontology ; | 17 | rdf:type owl:Ontology ; |
| 19 | - owl:imports <http://www.reportinghub.no/ep/schema/1.0/production> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/spin/rh> ; | 18 | + owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/production> , <http://www.reportinghub.no/spin/rh> ; |
| 20 | owl:versionInfo "Created with TopBraid Composer"^^xsd:string . | 19 | owl:versionInfo "Created with TopBraid Composer"^^xsd:string . |
| 21 | 20 | ||
| 21 | +dpr-tables:PersonnelInformation | ||
| 22 | + rdf:type rhspin:TableTemplate ; | ||
| 23 | + rdfs:label "Personnel Information"^^xsd:string ; | ||
| 24 | + rdfs:subClassOf rhspin:DPRTableTemplates ; | ||
| 25 | + spin:body | ||
| 26 | + [ rdf:type sp:Select ; | ||
| 27 | + sp:orderBy ([ sp:varName "facilityName"^^xsd:string | ||
| 28 | + ]) ; | ||
| 29 | + sp:resultVariables ([ sp:varName "facilityName"^^xsd:string | ||
| 30 | + ] [ sp:varName "beds"^^xsd:string | ||
| 31 | + ] [ sp:varName "crewNumber"^^xsd:string | ||
| 32 | + ] [ sp:varName "crewTypename"^^xsd:string | ||
| 33 | + ]) ; | ||
| 34 | + sp:where ([ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionReport> ; | ||
| 35 | + sp:predicate rdf:type ; | ||
| 36 | + sp:subject | ||
| 37 | + [ sp:varName "productionReport"^^xsd:string | ||
| 38 | + ] | ||
| 39 | + ] [ sp:object | ||
| 40 | + [ sp:varName "productionReport"^^xsd:string | ||
| 41 | + ] ; | ||
| 42 | + sp:predicate <http://www.reportinghub.no/ep/schema/core#partOf> ; | ||
| 43 | + sp:subject | ||
| 44 | + [ sp:varName "productionOperationReport"^^xsd:string | ||
| 45 | + ] | ||
| 46 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionOperationReport> ; | ||
| 47 | + sp:predicate rdf:type ; | ||
| 48 | + sp:subject | ||
| 49 | + [ sp:varName "productionOperationReport"^^xsd:string | ||
| 50 | + ] | ||
| 51 | + ] [ sp:object | ||
| 52 | + [ sp:varName "temporalPartOfFacility"^^xsd:string | ||
| 53 | + ] ; | ||
| 54 | + sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ; | ||
| 55 | + sp:subject | ||
| 56 | + [ sp:varName "productionOperationReport"^^xsd:string | ||
| 57 | + ] | ||
| 58 | + ] [ sp:object | ||
| 59 | + [ sp:varName "productionFacility"^^xsd:string | ||
| 60 | + ] ; | ||
| 61 | + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ; | ||
| 62 | + sp:subject | ||
| 63 | + [ sp:varName "temporalPartOfFacility"^^xsd:string | ||
| 64 | + ] | ||
| 65 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/facility#Field> ; | ||
| 66 | + sp:predicate rdf:type ; | ||
| 67 | + sp:subject | ||
| 68 | + [ sp:varName "productionFacility"^^xsd:string | ||
| 69 | + ] | ||
| 70 | + ] [ sp:object | ||
| 71 | + [ sp:varName "facilityName"^^xsd:string | ||
| 72 | + ] ; | ||
| 73 | + sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; | ||
| 74 | + sp:subject | ||
| 75 | + [ sp:varName "productionFacility"^^xsd:string | ||
| 76 | + ] | ||
| 77 | + ] [ sp:object | ||
| 78 | + [ sp:varName "productionOperationReport"^^xsd:string | ||
| 79 | + ] ; | ||
| 80 | + sp:predicate <http://www.reportinghub.no/ep/schema/core#partOf> ; | ||
| 81 | + sp:subject | ||
| 82 | + [ sp:varName "productionOperationInstallationReport"^^xsd:string | ||
| 83 | + ] | ||
| 84 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/report#ProductionOperationInstallationReport> ; | ||
| 85 | + sp:predicate rdf:type ; | ||
| 86 | + sp:subject | ||
| 87 | + [ sp:varName "productionOperationInstallationReport"^^xsd:string | ||
| 88 | + ] | ||
| 89 | + ] [ sp:object | ||
| 90 | + [ sp:varName "installationPart"^^xsd:string | ||
| 91 | + ] ; | ||
| 92 | + sp:predicate <http://www.reportinghub.no/ep/schema/report#reportOn> ; | ||
| 93 | + sp:subject | ||
| 94 | + [ sp:varName "productionOperationInstallationReport"^^xsd:string | ||
| 95 | + ] | ||
| 96 | + ] [ 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 | ||
| 106 | + ] ; | ||
| 107 | + sp:predicate <http://www.reportinghub.no/ep/schema/organization#hasCrew> ; | ||
| 108 | + sp:subject | ||
| 109 | + [ sp:varName "installationPart"^^xsd:string | ||
| 110 | + ] | ||
| 111 | + ] [ sp:object | ||
| 112 | + [ sp:varName "crewNumber"^^xsd:string | ||
| 113 | + ] ; | ||
| 114 | + sp:predicate <http://www.reportinghub.no/ep/schema/organization#numberInCrew> ; | ||
| 115 | + sp:subject | ||
| 116 | + [ sp:varName "crew"^^xsd:string | ||
| 117 | + ] | ||
| 118 | + ] [ sp:object | ||
| 119 | + [ sp:varName "crewType"^^xsd:string | ||
| 120 | + ] ; | ||
| 121 | + sp:predicate rdf:type ; | ||
| 122 | + sp:subject | ||
| 123 | + [ sp:varName "crew"^^xsd:string | ||
| 124 | + ] | ||
| 125 | + ] [ sp:object <http://www.reportinghub.no/ep/schema/organization#CrewType> ; | ||
| 126 | + sp:predicate rdf:type ; | ||
| 127 | + sp:subject | ||
| 128 | + [ sp:varName "crewType"^^xsd:string | ||
| 129 | + ] | ||
| 130 | + ] [ sp:object | ||
| 131 | + [ sp:varName "crewTypename"^^xsd:string | ||
| 132 | + ] ; | ||
| 133 | + sp:predicate rdfs:label ; | ||
| 134 | + sp:subject | ||
| 135 | + [ sp:varName "crewType"^^xsd:string | ||
| 136 | + ] | ||
| 137 | + ]) | ||
| 138 | + ]) | ||
| 139 | + ] ; | ||
| 140 | + rhspin:tableHeaders ("Facility"^^xsd:string "Beds"^^xsd:string "Crew"^^xsd:string "Crew Type"^^xsd:string) . | ||
| 141 | + | ||
| 22 | dpr-tables:WellInformation | 142 | dpr-tables:WellInformation |
| 23 | rdf:type rhspin:TableTemplate ; | 143 | rdf:type rhspin:TableTemplate ; |
| 24 | - rdfs:subClassOf rhspin:TableTemplates ; | 144 | + rdfs:subClassOf rhspin:DPRTableTemplates ; |
| 25 | spin:body | 145 | spin:body |
| 26 | [ rdf:type sp:Select ; | 146 | [ rdf:type sp:Select ; |
| 27 | sp:resultVariables ([ sp:varName "description"^^xsd:string | 147 | sp:resultVariables ([ sp:varName "description"^^xsd:string |
| ... | @@ -55,6 +175,6 @@ dpr-tables:WellInformation | ... | @@ -55,6 +175,6 @@ dpr-tables:WellInformation |
| 55 | 175 | ||
| 56 | _:b2 sp:varName "dailyProductionActivity"^^xsd:string . | 176 | _:b2 sp:varName "dailyProductionActivity"^^xsd:string . |
| 57 | 177 | ||
| 58 | -_:b3 sp:varName "productionOperationsActivity"^^xsd:string . | ||
| 59 | - | ||
| 60 | _:b1 sp:varName "oilNet"^^xsd:string . | 178 | _:b1 sp:varName "oilNet"^^xsd:string . |
| 179 | + | ||
| 180 | +_:b3 sp:varName "productionOperationsActivity"^^xsd:string . | ... | ... |
| 1 | <ui:group | 1 | <ui:group |
| 2 | - let:report="{# SELECT ?report WHERE {?report a ep-report:DailyProductionReport }}" | 2 | +let:report="{# SELECT ?report WHERE { ?report a ep-report:ProductionReport . } }" |
| 3 | - let:mainAct="{# SELECT ?mainAct WHERE {?report a ep-report:DailyProductionReport . ?report ep-report:reportOn ?mainAct}}" | 3 | + |
| 4 | - let:mainFac="{# SELECT ?mainFac WHERE {?report a ep-report:DailyProductionReport . ?report ep-report:reportOn ?mainAct . ?mainAct ep-prodact:involvement ?epMainFacTempPart . ?mainFac ep-core:hasTemporalPart ?epMainFacTempPart}}" | 4 | +let:reportedFieldName="{# SELECT ?reportedFieldName |
| 5 | - let:opCo="{# SELECT ?opCo WHERE {?report a ep-prodreport:DailyProductionReport . ?report ep-report:reportOn ?mainAct . ?mainFac ep-fac:facilityOperator ?opCo}}" | 5 | +WHERE { |
| 6 | - > | 6 | + ?report a ep-report:ProductionReport . |
| 7 | - <center> | 7 | + |
| 8 | - <h1>{# SELECT ?mfName WHERE {?mainFac rdfs:label ?mfName}}</h1> | 8 | + ?report ep-report:reportOn ?partOfFacility . |
| 9 | - <h2>{# SELECT ?ocName WHERE {?opCo rdfs:label ?ocName}}</h2> | 9 | + ?partOfFacility ep-core:temporalPartOf ?reportedField . |
| 10 | - <h2>{# SELECT ?docName WHERE {?report rdfs:label ?docName}}</h2> | 10 | + ?reportedField npd:name ?reportedFieldName . |
| 11 | - <h2>Report date: {# SELECT ?docDate WHERE {?report ep-report:dateCoveredByReport ?docDate}}</h2> | 11 | +}}" |
| 12 | - <h2>Issue date: {# SELECT ?createDate WHERE {?report ep-report:createdAt ?createDate}}</h2> | 12 | + |
| 13 | - </center> | 13 | +> |
| 14 | - <hr /> | 14 | + |
| 15 | +<h1>Daily Production Report : {= ?reportedFieldName } Field {# SELECT ?day WHERE { ?partOfFacility ep-activity:existsThroughout ?day . } }</h1> | ||
| 16 | +<h2>Report title : {# SELECT ?title WHERE { ?report a ep-report:ProductionReport . ?report ep-core:name ?title . } }</h2> | ||
| 17 | +<h2>Submitted by : {# SELECT ?submittingFieldName WHERE | ||
| 18 | +{ | ||
| 19 | + | ||
| 20 | +?report a ep-report:ProductionReport . | ||
| 21 | +?report ep-report:reportSubmittedFrom ?submittingFieldState . | ||
| 22 | +?submittingFieldState ep-core:temporalPartOf ?submittingField . | ||
| 23 | +?submittingField npd:name ?submittingFieldName . | ||
| 24 | + | ||
| 25 | +} }</h2> | ||
| 15 | 26 | ||
| 16 | <dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:WellInformation" /> | 27 | <dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:WellInformation" /> |
| 28 | + <dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:PersonnelInformation" /> | ||
| 17 | 29 | ||
| 18 | </ui:group> | 30 | </ui:group> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -28,7 +28,7 @@ arg:template | ... | @@ -28,7 +28,7 @@ arg:template |
| 28 | rdfs:label "template"^^xsd:string ; | 28 | rdfs:label "template"^^xsd:string ; |
| 29 | rdfs:subPropertyOf sp:arg . | 29 | rdfs:subPropertyOf sp:arg . |
| 30 | 30 | ||
| 31 | -<http://www.reportinghub.no/ep/schema/production-report#DailyProductionReport> | 31 | +<http://www.reportinghub.no/ep/schema/report#ProductionReport> |
| 32 | ui:instanceView | 32 | ui:instanceView |
| 33 | [ rdf:type dprswp:DailyProductionReportView ; | 33 | [ rdf:type dprswp:DailyProductionReportView ; |
| 34 | arg:report spin:_this | 34 | arg:report spin:_this |
| ... | @@ -47,7 +47,7 @@ dprswp:DailyProductionReportView | ... | @@ -47,7 +47,7 @@ dprswp:DailyProductionReportView |
| 47 | [ rdf:type spl:Argument ; | 47 | [ rdf:type spl:Argument ; |
| 48 | rdfs:comment "The report to display."^^xsd:string ; | 48 | rdfs:comment "The report to display."^^xsd:string ; |
| 49 | spl:predicate arg:report ; | 49 | spl:predicate arg:report ; |
| 50 | - spl:valueType <http://www.reportinghub.no/ep/schema/production-report#DailyProductionReport> | 50 | + spl:valueType <http://www.reportinghub.no/ep/schema/report#ProductionReport> |
| 51 | ] ; | 51 | ] ; |
| 52 | ui:headIncludes | 52 | ui:headIncludes |
| 53 | [ rdf:type html:Link ; | 53 | [ rdf:type html:Link ; |
| ... | @@ -67,7 +67,7 @@ dprswp:Table | ... | @@ -67,7 +67,7 @@ dprswp:Table |
| 67 | rdfs:comment "The report that serves as root of the template."^^xsd:string ; | 67 | rdfs:comment "The report that serves as root of the template."^^xsd:string ; |
| 68 | spl:optional "true"^^xsd:boolean ; | 68 | spl:optional "true"^^xsd:boolean ; |
| 69 | spl:predicate arg:report ; | 69 | spl:predicate arg:report ; |
| 70 | - spl:valueType <http://www.reportinghub.no/ep/schema/production-report#DailyProductionReport> | 70 | + spl:valueType <http://www.reportinghub.no/ep/schema/report#ProductionReport> |
| 71 | ] ; | 71 | ] ; |
| 72 | spin:constraint | 72 | spin:constraint |
| 73 | [ rdf:type spl:Argument ; | 73 | [ rdf:type spl:Argument ; | ... | ... |
-
Please register or login to post a comment