-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathvis-data.json
281 lines (264 loc) · 14.8 KB
/
vis-data.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
[
{
"title": "0: Introduction",
"description": [
"This is a test"
],
"query": "",
"triples": ""
},
{
"title": "1.1: Wall - architect's dataset",
"description": [
"The triples tab holds the architect's dataset. The query is just a `CONSTRUCT` query, which returns the full graph."
],
"query": [
"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>",
"PREFIX props: <https://w3id.org/props#>",
"PREFIX bsdd: <http://www.example.com/bsdd#>",
"PREFIX ifc: <http://www.buildingsmart-tech.org/ifcOWL/IFC4_ADD2#>\n",
"CONSTRUCT",
"WHERE {",
"\t?subject ?predicate ?object",
"}"
],
"triples": [
"@prefix bot: <https://w3id.org/bot#> .",
"@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .",
"@prefix prod: <https://w3id.org/prod#> .",
"@prefix props: <https://w3id.org/props#> .",
"@prefix ifc: <http://www.buildingsmart-tech.org/ifcOWL/IFC4_ADD2#> .",
"@prefix bsdd: <http://www.example.com/bsdd#> .\n",
"<http://some-arch.com/proj/100100/Walls/123> a bot:Element , prod:Wall , ifc:IfcWall ;",
"\tprops:area \"20.3 m2\" ;",
"\tbsdd:area \"20.3 m2\" ."
]
},
{
"title": "1.2: Wall - querying properties",
"description": [
"Doing a `SELECT` query on the dataset will return a table with the results. This example returns all the properties defined in the architect's dataset."
],
"query": [
"SELECT ?property ?value",
"WHERE {",
"\t<http://some-arch.com/proj/100100/Walls/123> ?property ?value",
"}"
],
"triples": [
"@prefix bot: <https://w3id.org/bot#> .",
"@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .",
"@prefix prod: <https://w3id.org/prod#> .",
"@prefix props: <https://w3id.org/props#> .",
"@prefix ifc: <http://www.buildingsmart-tech.org/ifcOWL/IFC4_ADD2#> .",
"@prefix bsdd: <http://www.example.com/bsdd#> .\n",
"<http://some-arch.com/proj/100100/Walls/123> a bot:Element , prod:Wall , ifc:IfcWall ;",
"\tprops:area \"20.3 m2\" ;",
"\tbsdd:area \"20.3 m2\" ."
]
},
{
"title": "1.3: Wall - full dataset",
"description": [
"In this example, also data from the HVAC engineer and the structural engineer is included in the dataset. Try to do the query from the previous step to get all the properties of the wall including the ones not defined by the architect."
],
"query": [
"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>",
"PREFIX props: <https://w3id.org/props#>",
"PREFIX bsdd: <http://www.example.com/bsdd#>",
"PREFIX stat: <http://www.example.com/stat#>",
"PREFIX ds418: <http://www.example.com/ds418#>",
"PREFIX ifc: <http://www.buildingsmart-tech.org/ifcOWL/IFC4_ADD2#>\n",
"CONSTRUCT",
"WHERE {",
"\t?subject ?predicate ?object",
"}"
],
"triples": [
"@prefix bot: <https://w3id.org/bot#> .",
"@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .",
"@prefix prod: <https://w3id.org/prod#> .",
"@prefix props: <https://w3id.org/props#> .",
"@prefix ifc: <http://www.buildingsmart-tech.org/ifcOWL/IFC4_ADD2#> .",
"@prefix bsdd: <http://www.example.com/bsdd#> .",
"@prefix stat: <http://www.example.com/stat#> .",
"@prefix ds418: <http://www.example.com/ds418#> .\n",
"# ARCHITECT'S DATASET",
"<http://some-arch.com/proj/100100/Walls/123> a bot:Element , prod:Wall , ifc:IfcWall ;",
"\tprops:area \"20.3 m2\" ;",
"\tbsdd:area \"20.3 m2\" .\n",
"# HVAC ENGINEER'S DATASET",
"<http://some-arch.com/proj/100100/Walls/123> props:uValue \"0.21 W/m2K\" .",
"<http://some-eng.com/proj/100222/Interfaces/23> a bot:Interface ;",
"\tbot:interfaceOf <http://some-arch.com/proj/100100/Walls/123> ;",
"\tprops:surfaceResistance \"0.13 m2K/W\" ;",
"\tprops:area \"10.5 m2\" ;",
"\tds418:heatTransmissionArea \"10.5 m2\" .\n",
"# STRUCTURAL ENGINEER'S DATASET",
"<http://some-arch.com/proj/100100/Walls/123> props:concreteStrength \"20 MPa\" ;",
"\tbsdd:strength \"20 MPa\" ;",
"\tstat:reinforcementDefinition <http://other-eng.com/proj/123211/Reinf/23> .",
"<http://other-eng.com/proj/123211/Reinf/23> a stat:ReinforcementDefinition ;",
"\tstat:verticalBars \"5 bars/m\" ;",
"\tstat:horisontalBars \"5 bars/m\" ."
]
},
{
"title": "1.4: Wall - interface",
"description": [
"This is a query to return the DS418 heat transfer area of all interfaces of walls. In `SELECT *` the asterisk symbol specifies that all variables should be returned."
],
"query": [
"PREFIX prod: <https://w3id.org/prod#>",
"PREFIX bot: <https://w3id.org/bot#>",
"PREFIX ds418: <http://www.example.com/ds418#>\n",
"SELECT *",
"WHERE {",
"\t?wall a prod:Wall .",
"\t?interface a bot:Interface ;",
"\t\tbot:interfaceOf ?wall ;",
"\t\tds418:heatTransmissionArea ?htArea .",
"}"
],
"triples": [
"@prefix bot: <https://w3id.org/bot#> .",
"@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .",
"@prefix prod: <https://w3id.org/prod#> .",
"@prefix props: <https://w3id.org/props#> .",
"@prefix ifc: <http://www.buildingsmart-tech.org/ifcOWL/IFC4_ADD2#> .",
"@prefix bsdd: <http://www.example.com/bsdd#> .",
"@prefix stat: <http://www.example.com/stat#> .",
"@prefix ds418: <http://www.example.com/ds418#> .\n",
"# ARCHITECT'S DATASET",
"<http://some-arch.com/proj/100100/Walls/123> a bot:Element , prod:Wall , ifc:IfcWall ;",
"\tprops:area \"20.3 m2\" ;",
"\tbsdd:area \"20.3 m2\" .\n",
"# HVAC ENGINEER'S DATASET",
"<http://some-arch.com/proj/100100/Walls/123> props:uValue \"0.21 W/m2K\" .",
"<http://some-eng.com/proj/100222/Interfaces/23> a bot:Interface ;",
"\tbot:interfaceOf <http://some-arch.com/proj/100100/Walls/123> ;",
"\tprops:surfaceResistance \"0.13 m2K/W\" ;",
"\tprops:area \"10.5 m2\" ;",
"\tds418:heatTransmissionArea \"10.5 m2\" .\n",
"# STRUCTURAL ENGINEER'S DATASET",
"<http://some-arch.com/proj/100100/Walls/123> props:concreteStrength \"20 MPa\" ;",
"\tbsdd:strength \"20 MPa\" ;",
"\tstat:reinforcementDefinition <http://other-eng.com/proj/123211/Reinf/23> .",
"<http://other-eng.com/proj/123211/Reinf/23> a stat:ReinforcementDefinition ;",
"\tstat:verticalBars \"5 bars/m\" ;",
"\tstat:horisontalBars \"5 bars/m\" ."
]
},
{
"title": "2.1: Systems - full dataset",
"description": [
"This is a full overview of the dataset used for Case 2."
],
"query": [
"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>",
"PREFIX fso: <http://www.example.com/fso#>",
"PREFIX pto: <http://www.productontology.org/id/>",
"PREFIX owl: <http://www.w3.org/2002/07/owl#>",
"PREFIX bot: <https://w3id.org/bot#>",
"PREFIX ice: <http://www.example.com/ice#>\n",
"CONSTRUCT",
"WHERE {",
"\t?s ?p ?o",
"}"
],
"triples": [
"@prefix bot: <https://w3id.org/bot#> .",
"@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .",
"@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .",
"@prefix owl: <http://www.w3.org/2002/07/owl#> .",
"@prefix pto: <http://www.productontology.org/id/> .",
"@prefix ice: <http://www.example.com/ice#> .",
"@prefix fso: <http://www.example.com/fso#> .\n",
"#FSO TBOX",
"fso:heatedBy a owl:ObjectProperty ;",
"\trdfs:range fso:Heater .\n",
"# ARCHITECT'S DATASET",
"<http://some-arch.com/proj/100100/Spaces/A15> a bot:Space .",
"<http://some-arch.com/proj/100100/Spaces/O21> a bot:Space .\n",
"# ICE ENGINEER'S DATASET",
"<http://some-arch.com/proj/100100/Spaces/A15> ice:heatingDemand \"550 W\" .",
"<http://some-arch.com/proj/100100/Spaces/O21> ice:heatingDemand \"500 W\" .\n",
"# HVAC ENGINEER'S DATASET",
"<http://some-arch.com/proj/100100/Spaces/A15> fso:heatedBy <http://some-eng.com/proj/100222/Heaters/b21> .",
"<http://some-arch.com/proj/100100/Spaces/O21> fso:heatedBy <http://some-eng.com/proj/100222/Heaters/a21> , <http://some-eng.com/proj/100222/Heaters/a22> .",
"<http://some-eng.com/proj/100222/Heaters/a21> a pto:Radiator ;",
"\tfso:heatOutput \"200 W\" .",
"<http://some-eng.com/proj/100222/Heaters/a22> a pto:Radiator ;",
"\tfso:heatOutput \"200 W\" .",
"<http://some-eng.com/proj/100222/Heaters/b21> a pto:Radiator ;",
"\tfso:heatOutput \"600 W\" ."
]
},
{
"title": "2.2: Systems - heating demand vs. heat output",
"description": [
"*NB! This is query only works with Stardog.*",
"The query compares the heating demand of each space to the total output of the devices that heat the room. The query is constructed in the following way:\n",
"First anything that is classified as a `bot:Space` is assigned variable `?space`. The space must have a heating demand assigned in order to do the check so the triple `?space ice:heatingDemand ?hd` must also return a result. The heating demand is assigned to variable `?hd`. `?hd` needs to be converted to a decimal number in order to do calculations with it, and this is accomplished using a `BIND`. The `BIND` method also checks if the string contains a space and if so, only takes what is before the space, thereby stripping the unit. The decimal number is assigned to variable `?heatingDemand`\n",
"Next step is to sum the total heat output of everything that heats the space. A subquery is used for this purpose. This query checks for `fso:heatedBy` relationships from the spaces and thereby achieves all heat sources that supply heat to the space. The `fso:heatOutput` of these is found, converted to a decimal number and assigned to variable `?hoNumber`. The subquery groups the results by variable `?space` and returns the sum of `?hoNumber`.\n",
"The last step is to use two `BIND` methods to calculate the over capacity and check if the heat requirement is fulfilled.\n",
"The result of the query is the following:\n",
"| space | heatingDemand | heatOutput | overCapacity | heatRequirementFulfilled ",
"| ----------- | ------------- | ---------- | ------------ | ------------------------ ",
"| inst:O21 | 500 | 400 | 0.8 | false ",
"| inst:O21 | 400 | 500 | 1.25 | true "
],
"query": [
"PREFIX bot: <https://w3id.org/bot#>",
"PREFIX fso: <http://www.example.com/fso#>",
"PREFIX ice: <http://www.example.com/ice#>\n",
"SELECT ?space ?heatingDemand ?heatOutput ?overCapacity ?heatRequirementFulfilled",
"WHERE {",
"\t?space a bot:Space ;",
"\t\tice:heatingDemand ?hd .\n",
"# STRIP UNIT AND CONVERT TO A DECIMAL NUMBER",
"\tBIND(if(contains(str( ?hd ), \" \") , xsd:decimal(strbefore(str(?hd), \" \")), xsd:decimal(?hd)) AS ?heatingDemand)\n",
"# GET THE TOTAL HEAT OUTPUT OF HEATERS IN THE SPACE",
"\t{",
"\t\tSELECT ?space (SUM(?hoNumber) AS ?heatOutput) WHERE {",
"\t\t\t?space fso:heatedBy ?heater .",
"\t\t\t?heater fso:heatOutput ?ho .\n",
"\t\t\t# STRIP UNIT AND CONVERT TO A DECIMAL NUMBER",
"\t\t\tBIND(if(contains(str( ?ho ), \" \") , xsd:decimal(strbefore(str(?ho), \" \")), xsd:decimal(?ho)) AS ?hoNumber)",
"\t\t} GROUP BY ?space",
"\t}\n",
"\t# CALCULATE OVER CAPACITY",
"\tBIND(?heatOutput /?heatingDemand AS ?overCapacity)\n",
"\t# CHECK IF REQUIREMENT IS FULFILLED",
"\tBIND(IF(?overCapacity > 1, xsd:boolean(true), xsd:boolean(false)) AS ?heatRequirementFulfilled)",
"}"
],
"triples": [
"@prefix bot: <https://w3id.org/bot#> .",
"@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .",
"@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .",
"@prefix owl: <http://www.w3.org/2002/07/owl#> .",
"@prefix pto: <http://www.productontology.org/id/> .",
"@prefix ice: <http://www.example.com/ice#> .",
"@prefix fso: <http://www.example.com/fso#> .\n",
"#FSO TBOX",
"fso:heatedBy a owl:ObjectProperty ;",
"\trdfs:range fso:Heater .\n",
"# ARCHITECT'S DATASET",
"<http://some-arch.com/proj/100100/Spaces/A15> a bot:Space .",
"<http://some-arch.com/proj/100100/Spaces/O21> a bot:Space .\n",
"# ICE ENGINEER'S DATASET",
"<http://some-arch.com/proj/100100/Spaces/A15> ice:heatingDemand \"400 W\" .",
"<http://some-arch.com/proj/100100/Spaces/O21> ice:heatingDemand \"500 W\" .\n",
"# HVAC ENGINEER'S DATASET",
"<http://some-arch.com/proj/100100/Spaces/A15> fso:heatedBy <http://some-eng.com/proj/100222/Heaters/b21> .",
"<http://some-arch.com/proj/100100/Spaces/O21> fso:heatedBy <http://some-eng.com/proj/100222/Heaters/a21> , <http://some-eng.com/proj/100222/Heaters/a22> .",
"<http://some-eng.com/proj/100222/Heaters/a21> a pto:Radiator ;",
"\tfso:heatOutput \"200 W\" .",
"<http://some-eng.com/proj/100222/Heaters/a22> a pto:Radiator ;",
"\tfso:heatOutput \"200 W\" .",
"<http://some-eng.com/proj/100222/Heaters/b21> a pto:Radiator ;",
"\tfso:heatOutput \"500 W\" ."
]
}
]