Holger Knublauch

Prepared DPR SWP and some rhspin helper functions

<div>
<hr />
<ui:setContext ui:queryGraph="&lt;http://www.reportinghub.no/ep/spin/dpr-tables&gt;">
<h2>{= ui:label(?template) }</h2>
</ui:setContext>
<table class="ddrTable">
<ui:setContext ui:queryGraph="&lt;http://www.reportinghub.no/ep/spin/dpr-tables&gt;">
<tr class="ddrTR">
<ui:forEach ui:resultSet="{#
SELECT ?header
WHERE {
?template rhspin:tableHeaders ?list .
?list &lt;http://jena.hpl.hp.com/ARQ/list#member&gt; ?header .
}
}">
<th class="ddrTH">{= ?header }</th>
</ui:forEach>
</tr>
</ui:setContext>
<ui:call ui:template="{= ?template }" arg:report="{= ?report }">
<ui:forEach ui:resultSet="{# SELECT ?row ?rowIndex WHERE { ?rs spr:rowIndices ?rowIndex } }">
<tr class="ddrTR">
<ui:forEach ui:resultSet="{# SELECT ?cell WHERE { (?rs ?rowIndex) spr:rowCells (?cell ?cellIndex) } }">
<td class="ddrTD">{= ui:label(?cell) }</td>
</ui:forEach>
</tr>
</ui:forEach>
</ui:call>
</table>
<br />
</div>
\ No newline at end of file
<ui:group>
<h1>DPR</h1>
<hr />
<dprswp:Table arg:report="{= ?report }" arg:template="dpr-tables:WellInformation" />
</ui:group>
\ No newline at end of file
# baseURI: http://www.reportinghub.no/swp/dpr
# imports: http://uispin.org/tui
# imports: http://www.reportinghub.no/ep/schema/1.0/production
# imports: http://www.reportinghub.no/ep/spin/dpr-tables
# imports: http://www.reportinghub.no/spin/rh
@prefix arg: <http://spinrdf.org/arg#> .
@prefix dprswp: <http://www.reportinghub.no/swp/dpr#> .
@prefix html: <http://uispin.org/html#> .
@prefix let: <http://uispin.org/let#> .
@prefix letrs: <http://uispin.org/letrs#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sp: <http://spinrdf.org/sp#> .
@prefix spin: <http://spinrdf.org/spin#> .
@prefix spl: <http://spinrdf.org/spl#> .
@prefix ui: <http://uispin.org/ui#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
arg:report
rdf:type rdf:Property ;
rdfs:label "report"^^xsd:string ;
rdfs:subPropertyOf sp:arg .
arg:template
rdf:type rdf:Property ;
rdfs:label "template"^^xsd:string ;
rdfs:subPropertyOf sp:arg .
<http://www.reportinghub.no/ep/schema/production-report#DailyProductionReport>
ui:instanceView
[ rdf:type dprswp:DailyProductionReportView ;
arg:report spin:_this
] .
<http://www.reportinghub.no/swp/dpr>
rdf:type owl:Ontology ;
owl:imports <http://uispin.org/tui> , <http://www.reportinghub.no/ep/schema/1.0/production> , <http://www.reportinghub.no/ep/spin/dpr-tables> , <http://www.reportinghub.no/spin/rh> ;
owl:versionInfo "0.1.0"^^xsd:string .
dprswp:DailyProductionReportView
rdf:type ui:NodeClass ;
rdfs:label "Daily production report view"^^xsd:string ;
rdfs:subClassOf ui:Element ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The report to display."^^xsd:string ;
spl:predicate arg:report ;
spl:valueType <http://www.reportinghub.no/ep/schema/production-report#DailyProductionReport>
] ;
ui:headIncludes
[ rdf:type html:Link ;
html:href "http://spinrdf.org/rhlib/ddr.css"^^xsd:string ;
html:rel "stylesheet"^^xsd:string ;
html:type "text/css"^^xsd:string
] ;
ui:prototype <http://www.reportinghub.no/swp/DailyProductionReport.uispin.html> .
dprswp:Table
rdf:type ui:NodeClass ;
rdfs:comment "An HTML table displaying the results of a given SPIN template for a given DPR. The template should also provide rhspin:tableHeaders."^^xsd:string ;
rdfs:label "Table"^^xsd:string ;
rdfs:subClassOf ui:Element ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The report that serves as root of the template."^^xsd:string ;
spl:optional "true"^^xsd:boolean ;
spl:predicate arg:report ;
spl:valueType <http://www.reportinghub.no/ep/schema/production-report#DailyProductionReport>
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The SPIN Template to execute."^^xsd:string ;
spl:predicate arg:template ;
spl:valueType spin:Template
] ;
ui:prototype <http://www.reportinghub.no/swp/DPRTable.uispin.html> .