David Price

Added initial MPR Partner swp files

<ui:group
let:report="{# SELECT ?report WHERE { ?report a ep-report:MonthlyProductionReportPartner . } }"
let:activity="{# SELECT ?activity WHERE {?activity a ep-fac:TemporalPartOfAProductionFacility . ?report ep-report:reportOn ?activity}}"
let:activityEnd="{# SELECT ?activityEnd WHERE {?activity a ep-fac:TemporalPartOfAProductionFacility . ?report ep-report:reportOn ?activity . ?activity ep-activity:finishedAt ?activityEnd}}"
let:reportedFieldName="{# SELECT ?reportedFieldName
WHERE {
?report a ep-report:MonthlyProductionReportPartner .
?productVolumeReport ep-core:partOf ?report .
?productVolumeReport a ep-report:ProductVolumeReport .
?productVolumeReport ep-report:reportOn ?productionFlowsInReportingPeriod .
?productionFlowsInReportingPeriod a ep-flow:ProductionFlowNetwork .
?stateOfField ep-flow:facilityContainsFlow ?productionFlowsInReportingPeriod .
?stateOfField ep-core:temporalPartOf ?reportedField .
?reportedField npd:name ?reportedFieldName .
}}"
>
<h1>Monthly Partner Report : {= ?reportedFieldName } Field, Month Ending {= ?activityEnd}</h1>
<h2>Report title : {# SELECT ?title WHERE { ?report a ep-report:MonthlyProductionReportPartner . ?report ep-core:name ?title . } }</h2>
<h2>Submitted by : {# SELECT ?submittingFieldName WHERE
{
?report a ep-report:MonthlyProductionReportPartner .
?report ep-report:reportSubmittedFrom ?submittingFieldState .
?submittingFieldState ep-core:temporalPartOf ?submittingField .
?submittingField npd:name ?submittingFieldName .
} }</h2>
<h3>{= ?productionFlowName }</h3>
<table>
<tr><td class="nameValueName">type:</td><td class="nameValueValue">{= ?productionFlowDefinitionTypeName
}</td></tr>
<tr><td class="nameValueName">subtype:</td><td class="nameValueValue">{= ?productionFlowDefinitionSubTypeName }</td></tr>
<tr><td class="nameValueName">purpose:</td><td class="nameValueValue">{= ?productionFlowPurposeTypeName }</td></tr>
<tr><td class="nameValueName">product:</td><td class="nameValueValue">{= ?productFlowName }</td></tr>
<tr><td class="nameValueName">material type:</td><td class="nameValueValue">{= ?productFlowMaterialTypeName }</td></tr>
<tr><td class="nameValueName">gross or net:</td><td class="nameValueValue">{= ?productFlowGrossOrNetTypeName }</td></tr>
<tr><td class="nameValueName">duration type:</td><td class="nameValueValue">{= ?productFlowInPeriodDurationTypeName }</td></tr>
<tr><td class="nameValueName">mass (kg):</td><td class="nameValueValue">{= ?massInKilograms }</td></tr>
<tr><td class="nameValueName">pressure (atm):</td><td class="nameValueValue">{= ?pressureInAtmospheres }</td></tr>
<tr><td class="nameValueName">temperature (C&#176;):</td><td class="nameValueValue">{= ?temperatureInCelsius }</td></tr>
<tr><td class="nameValueName">volume (m<sup>3</sup>):</td><td class="nameValueValue">{= ?volumeInMetre3 }</td></tr>
<tr><td class="nameValueName">gross calorific value (MJ/m<sup>3</sup>):</td><td class="nameValueValue">{= ?grossCalorificValueInMegaJouleMetre_3 }</td></tr>
</table>
</ui:forEach> -->
<mprgswp:Table arg:report="{= ?report }" arg:template="mpr-tables:GasSales" />
<mprgswp:Table arg:report="{= ?report }" arg:template="mpr-tables:WellProductionFlows" />
<mprgswp:Table arg:report="{= ?report }" arg:template="mpr-tables:Cargo" />
<mprgswp:Table arg:report="{= ?report }" arg:template="mpr-tables:CargoOwnership" />
<mprgswp:Table arg:report="{= ?report }" arg:template="mpr-tables:ProductionSales" />
<mprgswp:Table arg:report="{= ?report }" arg:template="mpr-tables:ProductionFlowsAll" />
<mprgswp:Table arg:report="{= ?report }" arg:template="mpr-tables:ProductionInventory" />
<mprgswp:Table arg:report="{= ?report }" arg:template="mpr-tables:ProductionInventoryOwnership" />
</ui:group>
\ No newline at end of file
<ui:call ui:template="{= ?template }" arg:report="{= ?report }">
<ui:if ui:condition="{= spr:rowCount(?rs) &gt; 0 }">
<div>
<hr />
<ui:setContext ui:queryGraph="&lt;http://www.reportinghub.no/ep/spin/mpr-tables&gt;">
<h2>{= ui:label(?template) }</h2>
</ui:setContext>
<table class="ddrTable" letrs:hrs="{#
SELECT ?header ?left
WHERE {
GRAPH &lt;http://www.reportinghub.no/ep/spin/mpr-tables&gt; {
?template rhspin:tableHeaders ?list .
?list &lt;http://jena.hpl.hp.com/ARQ/list#member&gt; ?str .
BIND (fn:starts-with(?str, '*') AS ?left) .
BIND (IF(?left, fn:substring(?str, 2), ?str) AS ?header) .
}
}
}">
<tr class="ddrTR">
<ui:forEach ui:resultSet="{= ?hrs }">
<th class="ddrTH" style="text-align: {= IF(?left, 'left', 'center') }"
><ui:parse ui:str="{= html:encodeBRs(spif:replaceAll(?header, ' ', '&nbsp;')) }" /></th>
</ui:forEach>
</tr>
<ui:forEach ui:resultSet="{# SELECT ?row ?rowIndex WHERE { ?rs spr:rowIndices ?rowIndex } }">
<tr class="ddrTR">
<ui:forEach ui:resultSet="{# SELECT ?cell ?colIndex WHERE { (?rs ?rowIndex) spr:rowCells (?cell ?colIndex) } }">
<!--td class="ddrTD" style="text-align: {= IF(spr:cell(?hrs, ?colIndex, 1), 'left', 'center') }"-->
<td class="ddrTD">{= ?cell }</td>
</ui:forEach>
</tr>
</ui:forEach>
</table>
<br />
</div>
</ui:if>
</ui:call>
\ No newline at end of file