Toggle navigation
Toggle navigation
This project
Loading...
Sign in
data.posccaesar.org
/
npd
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Issues
1
Merge Requests
0
Wiki
Network
Create a new issue
Commits
Issue Boards
Authored by
Holger Knublauch
2012-03-31 13:54:06 +1000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
Bob DuCharme
2012-04-02 19:43:18 -0400
Commit
c5cc43e0a2438d7d3ab9e23e8762ccbdcdd4085d
c5cc43e0
1 parent
45f2bd09
Adjusted GRAPH URI to point to graph containing the table templates
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
189 additions
and
189 deletions
www.reportinghub.no/swp/MPRG.uispin.html
www.reportinghub.no/swp/MPRGTable.uispin.html
www.reportinghub.no/swp/MPRG.uispin.html
View file @
c5cc43e
<ui:group
let:report=
"{# SELECT ?report WHERE { ?report a ep-prodreport:ProductionReport . } }"
>
<!--
let:facilityName="{# SELECT DISTINCT
?productionFlowFacilityName WHERE { ?productionFlow a ep-flow:WholeLifeProductionFlow ; ep-flow:flowIntoOrOutOf ?productionFlowFacility . ?productionFlowFacility npd:name ?productionFlowFacilityName . } }"
-->
<h1>
{= ?facilityName } Field
</h1>
<!-- <ui:forEach ui:resultSet="{#
SELECT
?productionFlowFacilityName
?productionFlowName
?productionFlowDefinitionTypeName
?productionFlowDefinitionSubTypeName
?productionFlowPurposeTypeName
?productFlowName
?productFlowMaterialTypeName
?productFlowGrossOrNetTypeName
?productFlowInPeriodDurationTypeName
?massInKilograms
?pressureInAtmospheres
?temperatureInCelsius
?volumeInMetre3
?grossCalorificValueInMegaJouleMetre_3
WHERE
{
?productionReport a ep-prodreport:ProductionReport .
?productVolumeReport ep-core:partOf ?productionReport ;
a ep-prodreport:ProductVolumeReport .
?productVolumeReport ep-report:reportOn ?productionFlowsInReportingPeriod .
?productionFlowsInReportingPeriod a ep-flow:ProductionFlow ;
ep-flow:hasNetworkPart ?productionFlowInReportingPeriod .
?productionFlowInReportingPeriod ep-core:temporalPartOf ?productionFlow .
?productionFlow a ep-flow:WholeLifeProductionFlow ;
ep-flow:flowIntoOrOutOf ?productionFlowFacility .
?productionFlowFacility npd:name ?productionFlowFacilityName .
OPTIONAL {
?productionFlow rdfs:label ?productionFlowName .
}
OPTIONAL {
?productionFlow a ?productionFlowDefinitionType .
?productionFlowDefinitionType a ep-flow:ProductionFlowDefinitionType ;
rdfs:label ?productionFlowDefinitionTypeName .
}
OPTIONAL {
?productionFlow a ?productionFlowDefinitionSubType .
?productionFlowDefinitionSubType a ep-flow:ProductionFlowDefinitionSubType ;
rdfs:label ?productionFlowDefinitionSubTypeName .
}
OPTIONAL {
?productionFlow a ?productionFlowPurposeType .
?productionFlowPurposeType a ep-flow:ProductionFlowPurposeType ;
rdfs:label ?productionFlowPurposeTypeName .
}
OPTIONAL {
?productionFlowInReportingPeriod ep-flow:hasMixedPart ?productFlowInReportingPeriod .
?productFlowInReportingPeriod a ep-flow:ProductFlow .
OPTIONAL {
?productFlowInReportingPeriod ep-core:temporalPartOf ?productFlow .
?productFlow a ep-flow:WholeLifeProductFlow .
OPTIONAL {
?productFlow rdfs:label ?productFlowName .
}
OPTIONAL {
?productFlow a ?productFlowMaterialType .
?productFlowMaterialType a ep-flow:ProductMaterialType ;
rdfs:label ?productFlowMaterialTypeName .
}
OPTIONAL {
?productFlow a ?productFlowGrossOrNetType .
?productFlowGrossOrNetType a ep-flow:ProductFlowGrossOrNetType ;
rdfs:label ?productFlowGrossOrNetTypeName .
}
OPTIONAL {
?productFlowInPeriod ep-core:temporalPartOf ?productFlowInReportingPeriod .
OPTIONAL {
?productFlowInPeriod a ?productFlowInPeriodDurationType .
?productFlowInPeriodDurationType a ep-flow:TemporalPartOfAFlowDurationType ;
rdfs:label ?productFlowInPeriodDurationTypeName .
}
?productFlowInPeriod ep-flow:materialThatFlows ?materialThatFlowsInPeriod .
OPTIONAL {
?materialThatFlowsInPeriod a ?mass .
?mass a ep-core:Mass ;
ep-core:kilogram ?massInKilograms .
}
?stateOfMaterialThatFlowsInPeriod ep-core:temporalPartOf ?materialThatFlowsInPeriod .
OPTIONAL {
?stateOfMaterialThatFlowsInPeriod a ?pressure .
?pressure a ep-core:Pressure ;
ep-core:atmosphere ?pressureInAtmospheres .
}
OPTIONAL {
?stateOfMaterialThatFlowsInPeriod a ?temperature .
?temperature a ep-core:Temperature ;
ep-core:celsius ?temperatureInCelsius .
}
?stateOfMaterialThatFlowsInPeriod a ?volume .
?volume a ep-core:Volume ;
ep-core:metre3 ?volumeInMetre3 .
OPTIONAL {
?stateOfMaterialThatFlowsInPeriod ep-flow:grossCalorificValue ?calorificValue .
?calorificValue ep-core:megajoule_m-3 ?grossCalorificValueInMegaJouleMetre_3 .
}
}
}
}
}
}">
<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°):</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> -->
<p>
template test start
</p>
<
ddrswp:Table
arg:report=
"{= ?report }"
arg:template=
"mpr-tables:ProductionFlows"
/>
<p>
template test end
</p>
</ui:group>
<ui:group
let:report=
"{# SELECT ?report WHERE { ?report a ep-prodreport:ProductionReport . } }"
>
<!--
let:facilityName="{# SELECT DISTINCT
?productionFlowFacilityName WHERE { ?productionFlow a ep-flow:WholeLifeProductionFlow ; ep-flow:flowIntoOrOutOf ?productionFlowFacility . ?productionFlowFacility npd:name ?productionFlowFacilityName . } }"
-->
<h1>
{= ?facilityName } Field
</h1>
<!-- <ui:forEach ui:resultSet="{#
SELECT
?productionFlowFacilityName
?productionFlowName
?productionFlowDefinitionTypeName
?productionFlowDefinitionSubTypeName
?productionFlowPurposeTypeName
?productFlowName
?productFlowMaterialTypeName
?productFlowGrossOrNetTypeName
?productFlowInPeriodDurationTypeName
?massInKilograms
?pressureInAtmospheres
?temperatureInCelsius
?volumeInMetre3
?grossCalorificValueInMegaJouleMetre_3
WHERE
{
?productionReport a ep-prodreport:ProductionReport .
?productVolumeReport ep-core:partOf ?productionReport ;
a ep-prodreport:ProductVolumeReport .
?productVolumeReport ep-report:reportOn ?productionFlowsInReportingPeriod .
?productionFlowsInReportingPeriod a ep-flow:ProductionFlow ;
ep-flow:hasNetworkPart ?productionFlowInReportingPeriod .
?productionFlowInReportingPeriod ep-core:temporalPartOf ?productionFlow .
?productionFlow a ep-flow:WholeLifeProductionFlow ;
ep-flow:flowIntoOrOutOf ?productionFlowFacility .
?productionFlowFacility npd:name ?productionFlowFacilityName .
OPTIONAL {
?productionFlow rdfs:label ?productionFlowName .
}
OPTIONAL {
?productionFlow a ?productionFlowDefinitionType .
?productionFlowDefinitionType a ep-flow:ProductionFlowDefinitionType ;
rdfs:label ?productionFlowDefinitionTypeName .
}
OPTIONAL {
?productionFlow a ?productionFlowDefinitionSubType .
?productionFlowDefinitionSubType a ep-flow:ProductionFlowDefinitionSubType ;
rdfs:label ?productionFlowDefinitionSubTypeName .
}
OPTIONAL {
?productionFlow a ?productionFlowPurposeType .
?productionFlowPurposeType a ep-flow:ProductionFlowPurposeType ;
rdfs:label ?productionFlowPurposeTypeName .
}
OPTIONAL {
?productionFlowInReportingPeriod ep-flow:hasMixedPart ?productFlowInReportingPeriod .
?productFlowInReportingPeriod a ep-flow:ProductFlow .
OPTIONAL {
?productFlowInReportingPeriod ep-core:temporalPartOf ?productFlow .
?productFlow a ep-flow:WholeLifeProductFlow .
OPTIONAL {
?productFlow rdfs:label ?productFlowName .
}
OPTIONAL {
?productFlow a ?productFlowMaterialType .
?productFlowMaterialType a ep-flow:ProductMaterialType ;
rdfs:label ?productFlowMaterialTypeName .
}
OPTIONAL {
?productFlow a ?productFlowGrossOrNetType .
?productFlowGrossOrNetType a ep-flow:ProductFlowGrossOrNetType ;
rdfs:label ?productFlowGrossOrNetTypeName .
}
OPTIONAL {
?productFlowInPeriod ep-core:temporalPartOf ?productFlowInReportingPeriod .
OPTIONAL {
?productFlowInPeriod a ?productFlowInPeriodDurationType .
?productFlowInPeriodDurationType a ep-flow:TemporalPartOfAFlowDurationType ;
rdfs:label ?productFlowInPeriodDurationTypeName .
}
?productFlowInPeriod ep-flow:materialThatFlows ?materialThatFlowsInPeriod .
OPTIONAL {
?materialThatFlowsInPeriod a ?mass .
?mass a ep-core:Mass ;
ep-core:kilogram ?massInKilograms .
}
?stateOfMaterialThatFlowsInPeriod ep-core:temporalPartOf ?materialThatFlowsInPeriod .
OPTIONAL {
?stateOfMaterialThatFlowsInPeriod a ?pressure .
?pressure a ep-core:Pressure ;
ep-core:atmosphere ?pressureInAtmospheres .
}
OPTIONAL {
?stateOfMaterialThatFlowsInPeriod a ?temperature .
?temperature a ep-core:Temperature ;
ep-core:celsius ?temperatureInCelsius .
}
?stateOfMaterialThatFlowsInPeriod a ?volume .
?volume a ep-core:Volume ;
ep-core:metre3 ?volumeInMetre3 .
OPTIONAL {
?stateOfMaterialThatFlowsInPeriod ep-flow:grossCalorificValue ?calorificValue .
?calorificValue ep-core:megajoule_m-3 ?grossCalorificValueInMegaJouleMetre_3 .
}
}
}
}
}
}">
<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°):</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> -->
<p>
template test start
</p>
<
mprgswp:Table
arg:report=
"{= ?report }"
arg:template=
"mpr-tables:ProductionFlows"
/>
<p>
template test end
</p>
</ui:group>
\ No newline at end of file
...
...
www.reportinghub.no/swp/MPRGTable.uispin.html
View file @
c5cc43e
<ui:call
ui:template=
"{= ?template }"
arg:report=
"{= ?report }"
>
<ui:if
ui:condition=
"{= spr:rowCount(?rs) > 0 }"
>
<div>
<hr
/>
<ui:setContext
ui:queryGraph=
"<http://www.reportinghub.no/ep/spin/
ddr-tables>"
>
<h2>
{= ui:label(?template) }
</h2>
</ui:setContext>
<table
class=
"ddrTable"
letrs:hrs=
"{#
SELECT ?header ?left
WHERE {
GRAPH <http://www.reportinghub.no/ep/spin/
ddr-tables> {
?template rhspin:tableHeaders ?list .
?list <http://jena.hpl.hp.com/ARQ/list#member> ?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, ' ', ' ')) }"
/></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
ui:template=
"{= ?template }"
arg:report=
"{= ?report }"
>
<ui:if
ui:condition=
"{= spr:rowCount(?rs) > 0 }"
>
<div>
<hr
/>
<ui:setContext
ui:queryGraph=
"<http://www.reportinghub.no/ep/spin/
mpr-tables>"
>
<h2>
{= ui:label(?template) }
</h2>
</ui:setContext>
<table
class=
"ddrTable"
letrs:hrs=
"{#
SELECT ?header ?left
WHERE {
GRAPH <http://www.reportinghub.no/ep/spin/
mpr-tables> {
?template rhspin:tableHeaders ?list .
?list <http://jena.hpl.hp.com/ARQ/list#member> ?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, ' ', ' ')) }"
/></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
...
...
Please
register
or
login
to post a comment