Holger Knublauch
Committed by Bob DuCharme

Adjusted GRAPH URI to point to graph containing the table templates

1 -<ui:group 1 +<ui:group
2 -let:report="{# SELECT ?report WHERE { ?report a ep-prodreport:ProductionReport . } }" 2 +let:report="{# SELECT ?report WHERE { ?report a ep-prodreport:ProductionReport . } }"
3 -> 3 +>
4 - 4 +
5 -<!-- 5 +<!--
6 - 6 +
7 -let:facilityName="{# SELECT DISTINCT 7 +let:facilityName="{# SELECT DISTINCT
8 -?productionFlowFacilityName WHERE { ?productionFlow a ep-flow:WholeLifeProductionFlow ; ep-flow:flowIntoOrOutOf ?productionFlowFacility . ?productionFlowFacility npd:name ?productionFlowFacilityName . } }" 8 +?productionFlowFacilityName WHERE { ?productionFlow a ep-flow:WholeLifeProductionFlow ; ep-flow:flowIntoOrOutOf ?productionFlowFacility . ?productionFlowFacility npd:name ?productionFlowFacilityName . } }"
9 - 9 +
10 ---> 10 +-->
11 - 11 +
12 -<h1>{= ?facilityName } Field</h1> 12 +<h1>{= ?facilityName } Field</h1>
13 - 13 +
14 -<!-- <ui:forEach ui:resultSet="{# 14 +<!-- <ui:forEach ui:resultSet="{#
15 -SELECT 15 +SELECT
16 -?productionFlowFacilityName 16 +?productionFlowFacilityName
17 -?productionFlowName 17 +?productionFlowName
18 -?productionFlowDefinitionTypeName 18 +?productionFlowDefinitionTypeName
19 -?productionFlowDefinitionSubTypeName 19 +?productionFlowDefinitionSubTypeName
20 -?productionFlowPurposeTypeName 20 +?productionFlowPurposeTypeName
21 -?productFlowName 21 +?productFlowName
22 -?productFlowMaterialTypeName 22 +?productFlowMaterialTypeName
23 -?productFlowGrossOrNetTypeName 23 +?productFlowGrossOrNetTypeName
24 -?productFlowInPeriodDurationTypeName 24 +?productFlowInPeriodDurationTypeName
25 -?massInKilograms 25 +?massInKilograms
26 -?pressureInAtmospheres 26 +?pressureInAtmospheres
27 -?temperatureInCelsius 27 +?temperatureInCelsius
28 -?volumeInMetre3 28 +?volumeInMetre3
29 -?grossCalorificValueInMegaJouleMetre_3 29 +?grossCalorificValueInMegaJouleMetre_3
30 -WHERE 30 +WHERE
31 - { 31 + {
32 -?productionReport a ep-prodreport:ProductionReport . 32 +?productionReport a ep-prodreport:ProductionReport .
33 - 33 +
34 -?productVolumeReport ep-core:partOf ?productionReport ; 34 +?productVolumeReport ep-core:partOf ?productionReport ;
35 - a ep-prodreport:ProductVolumeReport . 35 + a ep-prodreport:ProductVolumeReport .
36 - 36 +
37 -?productVolumeReport ep-report:reportOn ?productionFlowsInReportingPeriod . 37 +?productVolumeReport ep-report:reportOn ?productionFlowsInReportingPeriod .
38 - 38 +
39 -?productionFlowsInReportingPeriod a ep-flow:ProductionFlow ; 39 +?productionFlowsInReportingPeriod a ep-flow:ProductionFlow ;
40 - ep-flow:hasNetworkPart ?productionFlowInReportingPeriod . 40 + ep-flow:hasNetworkPart ?productionFlowInReportingPeriod .
41 - 41 +
42 -?productionFlowInReportingPeriod ep-core:temporalPartOf ?productionFlow . 42 +?productionFlowInReportingPeriod ep-core:temporalPartOf ?productionFlow .
43 - 43 +
44 -?productionFlow a ep-flow:WholeLifeProductionFlow ; 44 +?productionFlow a ep-flow:WholeLifeProductionFlow ;
45 - ep-flow:flowIntoOrOutOf ?productionFlowFacility . 45 + ep-flow:flowIntoOrOutOf ?productionFlowFacility .
46 - 46 +
47 -?productionFlowFacility npd:name ?productionFlowFacilityName . 47 +?productionFlowFacility npd:name ?productionFlowFacilityName .
48 -OPTIONAL { 48 +OPTIONAL {
49 -?productionFlow rdfs:label ?productionFlowName . 49 +?productionFlow rdfs:label ?productionFlowName .
50 -} 50 +}
51 - 51 +
52 -OPTIONAL { 52 +OPTIONAL {
53 - ?productionFlow a ?productionFlowDefinitionType . 53 + ?productionFlow a ?productionFlowDefinitionType .
54 - 54 +
55 - ?productionFlowDefinitionType a ep-flow:ProductionFlowDefinitionType ; 55 + ?productionFlowDefinitionType a ep-flow:ProductionFlowDefinitionType ;
56 - rdfs:label ?productionFlowDefinitionTypeName . 56 + rdfs:label ?productionFlowDefinitionTypeName .
57 -} 57 +}
58 - 58 +
59 -OPTIONAL { 59 +OPTIONAL {
60 - ?productionFlow a ?productionFlowDefinitionSubType . 60 + ?productionFlow a ?productionFlowDefinitionSubType .
61 - ?productionFlowDefinitionSubType a ep-flow:ProductionFlowDefinitionSubType ; 61 + ?productionFlowDefinitionSubType a ep-flow:ProductionFlowDefinitionSubType ;
62 - rdfs:label ?productionFlowDefinitionSubTypeName . 62 + rdfs:label ?productionFlowDefinitionSubTypeName .
63 -} 63 +}
64 - 64 +
65 -OPTIONAL { 65 +OPTIONAL {
66 - ?productionFlow a ?productionFlowPurposeType . 66 + ?productionFlow a ?productionFlowPurposeType .
67 - ?productionFlowPurposeType a ep-flow:ProductionFlowPurposeType ; 67 + ?productionFlowPurposeType a ep-flow:ProductionFlowPurposeType ;
68 - rdfs:label ?productionFlowPurposeTypeName . 68 + rdfs:label ?productionFlowPurposeTypeName .
69 -} 69 +}
70 - 70 +
71 -OPTIONAL { 71 +OPTIONAL {
72 - ?productionFlowInReportingPeriod ep-flow:hasMixedPart ?productFlowInReportingPeriod . 72 + ?productionFlowInReportingPeriod ep-flow:hasMixedPart ?productFlowInReportingPeriod .
73 - ?productFlowInReportingPeriod a ep-flow:ProductFlow . 73 + ?productFlowInReportingPeriod a ep-flow:ProductFlow .
74 - OPTIONAL { 74 + OPTIONAL {
75 - ?productFlowInReportingPeriod ep-core:temporalPartOf ?productFlow . 75 + ?productFlowInReportingPeriod ep-core:temporalPartOf ?productFlow .
76 - ?productFlow a ep-flow:WholeLifeProductFlow . 76 + ?productFlow a ep-flow:WholeLifeProductFlow .
77 - OPTIONAL { 77 + OPTIONAL {
78 - ?productFlow rdfs:label ?productFlowName . 78 + ?productFlow rdfs:label ?productFlowName .
79 - } 79 + }
80 - OPTIONAL { 80 + OPTIONAL {
81 - ?productFlow a ?productFlowMaterialType . 81 + ?productFlow a ?productFlowMaterialType .
82 - ?productFlowMaterialType a ep-flow:ProductMaterialType ; 82 + ?productFlowMaterialType a ep-flow:ProductMaterialType ;
83 - rdfs:label ?productFlowMaterialTypeName . 83 + rdfs:label ?productFlowMaterialTypeName .
84 - } 84 + }
85 - OPTIONAL { 85 + OPTIONAL {
86 - ?productFlow a ?productFlowGrossOrNetType . 86 + ?productFlow a ?productFlowGrossOrNetType .
87 - ?productFlowGrossOrNetType a ep-flow:ProductFlowGrossOrNetType ; 87 + ?productFlowGrossOrNetType a ep-flow:ProductFlowGrossOrNetType ;
88 - rdfs:label ?productFlowGrossOrNetTypeName . 88 + rdfs:label ?productFlowGrossOrNetTypeName .
89 - } 89 + }
90 - OPTIONAL { 90 + OPTIONAL {
91 - ?productFlowInPeriod ep-core:temporalPartOf ?productFlowInReportingPeriod . 91 + ?productFlowInPeriod ep-core:temporalPartOf ?productFlowInReportingPeriod .
92 - OPTIONAL { 92 + OPTIONAL {
93 - ?productFlowInPeriod a ?productFlowInPeriodDurationType . 93 + ?productFlowInPeriod a ?productFlowInPeriodDurationType .
94 - ?productFlowInPeriodDurationType a ep-flow:TemporalPartOfAFlowDurationType ; 94 + ?productFlowInPeriodDurationType a ep-flow:TemporalPartOfAFlowDurationType ;
95 - rdfs:label ?productFlowInPeriodDurationTypeName . 95 + rdfs:label ?productFlowInPeriodDurationTypeName .
96 - } 96 + }
97 - ?productFlowInPeriod ep-flow:materialThatFlows ?materialThatFlowsInPeriod . 97 + ?productFlowInPeriod ep-flow:materialThatFlows ?materialThatFlowsInPeriod .
98 - OPTIONAL { 98 + OPTIONAL {
99 - ?materialThatFlowsInPeriod a ?mass . 99 + ?materialThatFlowsInPeriod a ?mass .
100 - ?mass a ep-core:Mass ; 100 + ?mass a ep-core:Mass ;
101 - ep-core:kilogram ?massInKilograms . 101 + ep-core:kilogram ?massInKilograms .
102 - } 102 + }
103 - ?stateOfMaterialThatFlowsInPeriod ep-core:temporalPartOf ?materialThatFlowsInPeriod . 103 + ?stateOfMaterialThatFlowsInPeriod ep-core:temporalPartOf ?materialThatFlowsInPeriod .
104 - OPTIONAL { 104 + OPTIONAL {
105 - ?stateOfMaterialThatFlowsInPeriod a ?pressure . 105 + ?stateOfMaterialThatFlowsInPeriod a ?pressure .
106 - ?pressure a ep-core:Pressure ; 106 + ?pressure a ep-core:Pressure ;
107 - ep-core:atmosphere ?pressureInAtmospheres . 107 + ep-core:atmosphere ?pressureInAtmospheres .
108 - } 108 + }
109 - OPTIONAL { 109 + OPTIONAL {
110 - ?stateOfMaterialThatFlowsInPeriod a ?temperature . 110 + ?stateOfMaterialThatFlowsInPeriod a ?temperature .
111 - ?temperature a ep-core:Temperature ; 111 + ?temperature a ep-core:Temperature ;
112 - ep-core:celsius ?temperatureInCelsius . 112 + ep-core:celsius ?temperatureInCelsius .
113 - } 113 + }
114 - ?stateOfMaterialThatFlowsInPeriod a ?volume . 114 + ?stateOfMaterialThatFlowsInPeriod a ?volume .
115 - ?volume a ep-core:Volume ; 115 + ?volume a ep-core:Volume ;
116 - ep-core:metre3 ?volumeInMetre3 . 116 + ep-core:metre3 ?volumeInMetre3 .
117 - OPTIONAL { 117 + OPTIONAL {
118 - ?stateOfMaterialThatFlowsInPeriod ep-flow:grossCalorificValue ?calorificValue . 118 + ?stateOfMaterialThatFlowsInPeriod ep-flow:grossCalorificValue ?calorificValue .
119 - ?calorificValue ep-core:megajoule_m-3 ?grossCalorificValueInMegaJouleMetre_3 . 119 + ?calorificValue ep-core:megajoule_m-3 ?grossCalorificValueInMegaJouleMetre_3 .
120 - } 120 + }
121 - } 121 + }
122 - } 122 + }
123 - } 123 + }
124 - } 124 + }
125 - 125 +
126 -}"> 126 +}">
127 - <h3>{= ?productionFlowName }</h3> 127 + <h3>{= ?productionFlowName }</h3>
128 - <table> 128 + <table>
129 - 129 +
130 - <tr><td class="nameValueName">type:</td><td class="nameValueValue">{= ?productionFlowDefinitionTypeName 130 + <tr><td class="nameValueName">type:</td><td class="nameValueValue">{= ?productionFlowDefinitionTypeName
131 - }</td></tr> 131 + }</td></tr>
132 -<tr><td class="nameValueName">subtype:</td><td class="nameValueValue">{= ?productionFlowDefinitionSubTypeName }</td></tr> 132 +<tr><td class="nameValueName">subtype:</td><td class="nameValueValue">{= ?productionFlowDefinitionSubTypeName }</td></tr>
133 -<tr><td class="nameValueName">purpose:</td><td class="nameValueValue">{= ?productionFlowPurposeTypeName }</td></tr> 133 +<tr><td class="nameValueName">purpose:</td><td class="nameValueValue">{= ?productionFlowPurposeTypeName }</td></tr>
134 -<tr><td class="nameValueName">product:</td><td class="nameValueValue">{= ?productFlowName }</td></tr> 134 +<tr><td class="nameValueName">product:</td><td class="nameValueValue">{= ?productFlowName }</td></tr>
135 -<tr><td class="nameValueName">material type:</td><td class="nameValueValue">{= ?productFlowMaterialTypeName }</td></tr> 135 +<tr><td class="nameValueName">material type:</td><td class="nameValueValue">{= ?productFlowMaterialTypeName }</td></tr>
136 -<tr><td class="nameValueName">gross or net:</td><td class="nameValueValue">{= ?productFlowGrossOrNetTypeName }</td></tr> 136 +<tr><td class="nameValueName">gross or net:</td><td class="nameValueValue">{= ?productFlowGrossOrNetTypeName }</td></tr>
137 -<tr><td class="nameValueName">duration type:</td><td class="nameValueValue">{= ?productFlowInPeriodDurationTypeName }</td></tr> 137 +<tr><td class="nameValueName">duration type:</td><td class="nameValueValue">{= ?productFlowInPeriodDurationTypeName }</td></tr>
138 -<tr><td class="nameValueName">mass (kg):</td><td class="nameValueValue">{= ?massInKilograms }</td></tr> 138 +<tr><td class="nameValueName">mass (kg):</td><td class="nameValueValue">{= ?massInKilograms }</td></tr>
139 -<tr><td class="nameValueName">pressure (atm):</td><td class="nameValueValue">{= ?pressureInAtmospheres }</td></tr> 139 +<tr><td class="nameValueName">pressure (atm):</td><td class="nameValueValue">{= ?pressureInAtmospheres }</td></tr>
140 -<tr><td class="nameValueName">temperature (C&#176;):</td><td class="nameValueValue">{= ?temperatureInCelsius }</td></tr> 140 +<tr><td class="nameValueName">temperature (C&#176;):</td><td class="nameValueValue">{= ?temperatureInCelsius }</td></tr>
141 -<tr><td class="nameValueName">volume (m<sup>3</sup>):</td><td class="nameValueValue">{= ?volumeInMetre3 }</td></tr> 141 +<tr><td class="nameValueName">volume (m<sup>3</sup>):</td><td class="nameValueValue">{= ?volumeInMetre3 }</td></tr>
142 -<tr><td class="nameValueName">gross calorific value (MJ/m<sup>3</sup>):</td><td class="nameValueValue">{= ?grossCalorificValueInMegaJouleMetre_3 }</td></tr> 142 +<tr><td class="nameValueName">gross calorific value (MJ/m<sup>3</sup>):</td><td class="nameValueValue">{= ?grossCalorificValueInMegaJouleMetre_3 }</td></tr>
143 - 143 +
144 - 144 +
145 - </table> 145 + </table>
146 - 146 +
147 - </ui:forEach> --> 147 + </ui:forEach> -->
148 - 148 +
149 - <p>template test start</p> 149 + <p>template test start</p>
150 - <ddrswp:Table arg:report="{= ?report }" arg:template="mpr-tables:ProductionFlows" /> 150 + <mprgswp:Table arg:report="{= ?report }" arg:template="mpr-tables:ProductionFlows" />
151 - <p>template test end</p> 151 + <p>template test end</p>
152 - 152 +
153 -</ui:group> 153 +</ui:group>
154 154
...\ No newline at end of file ...\ No newline at end of file
......
1 -<ui:call ui:template="{= ?template }" arg:report="{= ?report }"> 1 +<ui:call ui:template="{= ?template }" arg:report="{= ?report }">
2 - <ui:if ui:condition="{= spr:rowCount(?rs) &gt; 0 }"> 2 + <ui:if ui:condition="{= spr:rowCount(?rs) &gt; 0 }">
3 - <div> 3 + <div>
4 - <hr /> 4 + <hr />
5 - <ui:setContext ui:queryGraph="&lt;http://www.reportinghub.no/ep/spin/ddr-tables&gt;"> 5 + <ui:setContext ui:queryGraph="&lt;http://www.reportinghub.no/ep/spin/mpr-tables&gt;">
6 - <h2>{= ui:label(?template) }</h2> 6 + <h2>{= ui:label(?template) }</h2>
7 - </ui:setContext> 7 + </ui:setContext>
8 - <table class="ddrTable" letrs:hrs="{# 8 + <table class="ddrTable" letrs:hrs="{#
9 - SELECT ?header ?left 9 + SELECT ?header ?left
10 - WHERE { 10 + WHERE {
11 - GRAPH &lt;http://www.reportinghub.no/ep/spin/ddr-tables&gt; { 11 + GRAPH &lt;http://www.reportinghub.no/ep/spin/mpr-tables&gt; {
12 - ?template rhspin:tableHeaders ?list . 12 + ?template rhspin:tableHeaders ?list .
13 - ?list &lt;http://jena.hpl.hp.com/ARQ/list#member&gt; ?str . 13 + ?list &lt;http://jena.hpl.hp.com/ARQ/list#member&gt; ?str .
14 - BIND (fn:starts-with(?str, '*') AS ?left) . 14 + BIND (fn:starts-with(?str, '*') AS ?left) .
15 - BIND (IF(?left, fn:substring(?str, 2), ?str) AS ?header) . 15 + BIND (IF(?left, fn:substring(?str, 2), ?str) AS ?header) .
16 - } 16 + }
17 - } 17 + }
18 - }"> 18 + }">
19 - <tr class="ddrTR"> 19 + <tr class="ddrTR">
20 - <ui:forEach ui:resultSet="{= ?hrs }"> 20 + <ui:forEach ui:resultSet="{= ?hrs }">
21 - <th class="ddrTH" style="text-align: {= IF(?left, 'left', 'center') }" 21 + <th class="ddrTH" style="text-align: {= IF(?left, 'left', 'center') }"
22 - ><ui:parse ui:str="{= html:encodeBRs(spif:replaceAll(?header, ' ', '&nbsp;')) }" /></th> 22 + ><ui:parse ui:str="{= html:encodeBRs(spif:replaceAll(?header, ' ', '&nbsp;')) }" /></th>
23 - </ui:forEach> 23 + </ui:forEach>
24 - </tr> 24 + </tr>
25 - <ui:forEach ui:resultSet="{# SELECT ?row ?rowIndex WHERE { ?rs spr:rowIndices ?rowIndex } }"> 25 + <ui:forEach ui:resultSet="{# SELECT ?row ?rowIndex WHERE { ?rs spr:rowIndices ?rowIndex } }">
26 - <tr class="ddrTR"> 26 + <tr class="ddrTR">
27 - <ui:forEach ui:resultSet="{# SELECT ?cell ?colIndex WHERE { (?rs ?rowIndex) spr:rowCells (?cell ?colIndex) } }"> 27 + <ui:forEach ui:resultSet="{# SELECT ?cell ?colIndex WHERE { (?rs ?rowIndex) spr:rowCells (?cell ?colIndex) } }">
28 - <!--td class="ddrTD" style="text-align: {= IF(spr:cell(?hrs, ?colIndex, 1), 'left', 'center') }"--> 28 + <!--td class="ddrTD" style="text-align: {= IF(spr:cell(?hrs, ?colIndex, 1), 'left', 'center') }"-->
29 - <td class="ddrTD">{= ?cell }</td> 29 + <td class="ddrTD">{= ?cell }</td>
30 - </ui:forEach> 30 + </ui:forEach>
31 - </tr> 31 + </tr>
32 - </ui:forEach> 32 + </ui:forEach>
33 - </table> 33 + </table>
34 - <br /> 34 + <br />
35 - </div> 35 + </div>
36 - </ui:if> 36 + </ui:if>
37 </ui:call> 37 </ui:call>
...\ No newline at end of file ...\ No newline at end of file
......