Skip to content

Commit 96e1e1f

Browse files
authored
Merge pull request #5 from N5GEH/4-move-the-handling-of-semantic-splitting-to-rml-generation
4 move the handling of semantic splitting to rml generation
2 parents e36d61e + e56eb7f commit 96e1e1f

34 files changed

+5808
-5843
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
/build/
2-
/examples/fiware/kgcp/rml/rdf_node_relationship.json
32
local_test/
43
/semantic_iot.egg-info/
54
/test/test_relationship_finder/openhab_node_relationship.json
65
/test/test_relationship_finder/openhab_multiple_members_node_relationship.json
76
/test/test_relationship_finder/fiware_node_relationship.json
7+
/examples/fiware/kgcp/rml/brick/intermediate_report_brick.json
8+
/examples/fiware/kgcp/rml/dogont/intermediate_report_dogont.json
9+
/examples/fiware/kgcp/rml/saref4bldg/intermediate_report_saref4bldg.json

examples/fiware/application_deployment/reasoning_owl_rl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Example usage:
77
targ_kg = Path(project_root_path).joinpath(
88
"../kgcp/results/brick/fiware_entities_10rooms.ttl")
9-
ontology = Path(project_root_path).joinpath("../ontologies/Brick.ttl")
9+
ontology = Path(project_root_path).joinpath("../ontologies/brick.ttl")
1010
extended_kg = targ_kg.name.replace(".ttl", "_inferred.ttl").split("/")[-1]
1111

1212
# The inferred graph will also be saved in the same directory as the input file by default

examples/fiware/kgcp/results/brick/fiware_entities_1000rooms.ttl

Lines changed: 3000 additions & 3000 deletions
Large diffs are not rendered by default.

examples/fiware/kgcp/results/brick/fiware_entities_100rooms.ttl

Lines changed: 300 additions & 300 deletions
Large diffs are not rendered by default.

examples/fiware/kgcp/results/brick/fiware_entities_10rooms.ttl

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -126,123 +126,123 @@
126126
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/TemperatureSensor:room_base_9/attrs/temperature/value> ;
127127
brick:isPointOf <http://example.com/HotelRoom/HotelRoom:room_base_9> .
128128

129-
<http://example.com/airFlowSetpoint_FreshAirVentilation/airFlowSetpoint_FreshAirVentilation:room_base_1> a brick:Air_Flow_Setpoint ;
129+
<http://example.com/airFlowSetpoint_FreshAirVentilation/FreshAirVentilation:room_base_1> a brick:Air_Flow_Setpoint ;
130130
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/FreshAirVentilation:room_base_1/attrs/airFlowSetpoint/value> ;
131131
brick:isPointOf <http://example.com/FreshAirVentilation/FreshAirVentilation:room_base_1> .
132132

133-
<http://example.com/airFlowSetpoint_FreshAirVentilation/airFlowSetpoint_FreshAirVentilation:room_base_10> a brick:Air_Flow_Setpoint ;
133+
<http://example.com/airFlowSetpoint_FreshAirVentilation/FreshAirVentilation:room_base_10> a brick:Air_Flow_Setpoint ;
134134
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/FreshAirVentilation:room_base_10/attrs/airFlowSetpoint/value> ;
135135
brick:isPointOf <http://example.com/FreshAirVentilation/FreshAirVentilation:room_base_10> .
136136

137-
<http://example.com/airFlowSetpoint_FreshAirVentilation/airFlowSetpoint_FreshAirVentilation:room_base_2> a brick:Air_Flow_Setpoint ;
137+
<http://example.com/airFlowSetpoint_FreshAirVentilation/FreshAirVentilation:room_base_2> a brick:Air_Flow_Setpoint ;
138138
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/FreshAirVentilation:room_base_2/attrs/airFlowSetpoint/value> ;
139139
brick:isPointOf <http://example.com/FreshAirVentilation/FreshAirVentilation:room_base_2> .
140140

141-
<http://example.com/airFlowSetpoint_FreshAirVentilation/airFlowSetpoint_FreshAirVentilation:room_base_3> a brick:Air_Flow_Setpoint ;
141+
<http://example.com/airFlowSetpoint_FreshAirVentilation/FreshAirVentilation:room_base_3> a brick:Air_Flow_Setpoint ;
142142
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/FreshAirVentilation:room_base_3/attrs/airFlowSetpoint/value> ;
143143
brick:isPointOf <http://example.com/FreshAirVentilation/FreshAirVentilation:room_base_3> .
144144

145-
<http://example.com/airFlowSetpoint_FreshAirVentilation/airFlowSetpoint_FreshAirVentilation:room_base_4> a brick:Air_Flow_Setpoint ;
145+
<http://example.com/airFlowSetpoint_FreshAirVentilation/FreshAirVentilation:room_base_4> a brick:Air_Flow_Setpoint ;
146146
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/FreshAirVentilation:room_base_4/attrs/airFlowSetpoint/value> ;
147147
brick:isPointOf <http://example.com/FreshAirVentilation/FreshAirVentilation:room_base_4> .
148148

149-
<http://example.com/airFlowSetpoint_FreshAirVentilation/airFlowSetpoint_FreshAirVentilation:room_base_5> a brick:Air_Flow_Setpoint ;
149+
<http://example.com/airFlowSetpoint_FreshAirVentilation/FreshAirVentilation:room_base_5> a brick:Air_Flow_Setpoint ;
150150
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/FreshAirVentilation:room_base_5/attrs/airFlowSetpoint/value> ;
151151
brick:isPointOf <http://example.com/FreshAirVentilation/FreshAirVentilation:room_base_5> .
152152

153-
<http://example.com/airFlowSetpoint_FreshAirVentilation/airFlowSetpoint_FreshAirVentilation:room_base_6> a brick:Air_Flow_Setpoint ;
153+
<http://example.com/airFlowSetpoint_FreshAirVentilation/FreshAirVentilation:room_base_6> a brick:Air_Flow_Setpoint ;
154154
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/FreshAirVentilation:room_base_6/attrs/airFlowSetpoint/value> ;
155155
brick:isPointOf <http://example.com/FreshAirVentilation/FreshAirVentilation:room_base_6> .
156156

157-
<http://example.com/airFlowSetpoint_FreshAirVentilation/airFlowSetpoint_FreshAirVentilation:room_base_7> a brick:Air_Flow_Setpoint ;
157+
<http://example.com/airFlowSetpoint_FreshAirVentilation/FreshAirVentilation:room_base_7> a brick:Air_Flow_Setpoint ;
158158
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/FreshAirVentilation:room_base_7/attrs/airFlowSetpoint/value> ;
159159
brick:isPointOf <http://example.com/FreshAirVentilation/FreshAirVentilation:room_base_7> .
160160

161-
<http://example.com/airFlowSetpoint_FreshAirVentilation/airFlowSetpoint_FreshAirVentilation:room_base_8> a brick:Air_Flow_Setpoint ;
161+
<http://example.com/airFlowSetpoint_FreshAirVentilation/FreshAirVentilation:room_base_8> a brick:Air_Flow_Setpoint ;
162162
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/FreshAirVentilation:room_base_8/attrs/airFlowSetpoint/value> ;
163163
brick:isPointOf <http://example.com/FreshAirVentilation/FreshAirVentilation:room_base_8> .
164164

165-
<http://example.com/airFlowSetpoint_FreshAirVentilation/airFlowSetpoint_FreshAirVentilation:room_base_9> a brick:Air_Flow_Setpoint ;
165+
<http://example.com/airFlowSetpoint_FreshAirVentilation/FreshAirVentilation:room_base_9> a brick:Air_Flow_Setpoint ;
166166
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/FreshAirVentilation:room_base_9/attrs/airFlowSetpoint/value> ;
167167
brick:isPointOf <http://example.com/FreshAirVentilation/FreshAirVentilation:room_base_9> .
168168

169-
<http://example.com/fanSpeed_CoolingCoil/fanSpeed_CoolingCoil:room_base_1> a brick:Fan_Speed_Command ;
169+
<http://example.com/fanSpeed_CoolingCoil/CoolingCoil:room_base_1> a brick:Fan_Speed_Command ;
170170
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/CoolingCoil:room_base_1/attrs/fanSpeed/value> ;
171171
brick:isPointOf <http://example.com/CoolingCoil/CoolingCoil:room_base_1> .
172172

173-
<http://example.com/fanSpeed_CoolingCoil/fanSpeed_CoolingCoil:room_base_10> a brick:Fan_Speed_Command ;
173+
<http://example.com/fanSpeed_CoolingCoil/CoolingCoil:room_base_10> a brick:Fan_Speed_Command ;
174174
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/CoolingCoil:room_base_10/attrs/fanSpeed/value> ;
175175
brick:isPointOf <http://example.com/CoolingCoil/CoolingCoil:room_base_10> .
176176

177-
<http://example.com/fanSpeed_CoolingCoil/fanSpeed_CoolingCoil:room_base_2> a brick:Fan_Speed_Command ;
177+
<http://example.com/fanSpeed_CoolingCoil/CoolingCoil:room_base_2> a brick:Fan_Speed_Command ;
178178
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/CoolingCoil:room_base_2/attrs/fanSpeed/value> ;
179179
brick:isPointOf <http://example.com/CoolingCoil/CoolingCoil:room_base_2> .
180180

181-
<http://example.com/fanSpeed_CoolingCoil/fanSpeed_CoolingCoil:room_base_3> a brick:Fan_Speed_Command ;
181+
<http://example.com/fanSpeed_CoolingCoil/CoolingCoil:room_base_3> a brick:Fan_Speed_Command ;
182182
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/CoolingCoil:room_base_3/attrs/fanSpeed/value> ;
183183
brick:isPointOf <http://example.com/CoolingCoil/CoolingCoil:room_base_3> .
184184

185-
<http://example.com/fanSpeed_CoolingCoil/fanSpeed_CoolingCoil:room_base_4> a brick:Fan_Speed_Command ;
185+
<http://example.com/fanSpeed_CoolingCoil/CoolingCoil:room_base_4> a brick:Fan_Speed_Command ;
186186
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/CoolingCoil:room_base_4/attrs/fanSpeed/value> ;
187187
brick:isPointOf <http://example.com/CoolingCoil/CoolingCoil:room_base_4> .
188188

189-
<http://example.com/fanSpeed_CoolingCoil/fanSpeed_CoolingCoil:room_base_5> a brick:Fan_Speed_Command ;
189+
<http://example.com/fanSpeed_CoolingCoil/CoolingCoil:room_base_5> a brick:Fan_Speed_Command ;
190190
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/CoolingCoil:room_base_5/attrs/fanSpeed/value> ;
191191
brick:isPointOf <http://example.com/CoolingCoil/CoolingCoil:room_base_5> .
192192

193-
<http://example.com/fanSpeed_CoolingCoil/fanSpeed_CoolingCoil:room_base_6> a brick:Fan_Speed_Command ;
193+
<http://example.com/fanSpeed_CoolingCoil/CoolingCoil:room_base_6> a brick:Fan_Speed_Command ;
194194
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/CoolingCoil:room_base_6/attrs/fanSpeed/value> ;
195195
brick:isPointOf <http://example.com/CoolingCoil/CoolingCoil:room_base_6> .
196196

197-
<http://example.com/fanSpeed_CoolingCoil/fanSpeed_CoolingCoil:room_base_7> a brick:Fan_Speed_Command ;
197+
<http://example.com/fanSpeed_CoolingCoil/CoolingCoil:room_base_7> a brick:Fan_Speed_Command ;
198198
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/CoolingCoil:room_base_7/attrs/fanSpeed/value> ;
199199
brick:isPointOf <http://example.com/CoolingCoil/CoolingCoil:room_base_7> .
200200

201-
<http://example.com/fanSpeed_CoolingCoil/fanSpeed_CoolingCoil:room_base_8> a brick:Fan_Speed_Command ;
201+
<http://example.com/fanSpeed_CoolingCoil/CoolingCoil:room_base_8> a brick:Fan_Speed_Command ;
202202
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/CoolingCoil:room_base_8/attrs/fanSpeed/value> ;
203203
brick:isPointOf <http://example.com/CoolingCoil/CoolingCoil:room_base_8> .
204204

205-
<http://example.com/fanSpeed_CoolingCoil/fanSpeed_CoolingCoil:room_base_9> a brick:Fan_Speed_Command ;
205+
<http://example.com/fanSpeed_CoolingCoil/CoolingCoil:room_base_9> a brick:Fan_Speed_Command ;
206206
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/CoolingCoil:room_base_9/attrs/fanSpeed/value> ;
207207
brick:isPointOf <http://example.com/CoolingCoil/CoolingCoil:room_base_9> .
208208

209-
<http://example.com/temperatureSetpoint_RadiatorThermostat/temperatureSetpoint_RadiatorThermostat:room_base_1> a brick:Temperature_Setpoint ;
209+
<http://example.com/temperatureSetpoint_RadiatorThermostat/RadiatorThermostat:room_base_1> a brick:Temperature_Setpoint ;
210210
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/RadiatorThermostat:room_base_1/attrs/temperatureSetpoint/value> ;
211211
brick:isPointOf <http://example.com/RadiatorThermostat/RadiatorThermostat:room_base_1> .
212212

213-
<http://example.com/temperatureSetpoint_RadiatorThermostat/temperatureSetpoint_RadiatorThermostat:room_base_10> a brick:Temperature_Setpoint ;
213+
<http://example.com/temperatureSetpoint_RadiatorThermostat/RadiatorThermostat:room_base_10> a brick:Temperature_Setpoint ;
214214
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/RadiatorThermostat:room_base_10/attrs/temperatureSetpoint/value> ;
215215
brick:isPointOf <http://example.com/RadiatorThermostat/RadiatorThermostat:room_base_10> .
216216

217-
<http://example.com/temperatureSetpoint_RadiatorThermostat/temperatureSetpoint_RadiatorThermostat:room_base_2> a brick:Temperature_Setpoint ;
217+
<http://example.com/temperatureSetpoint_RadiatorThermostat/RadiatorThermostat:room_base_2> a brick:Temperature_Setpoint ;
218218
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/RadiatorThermostat:room_base_2/attrs/temperatureSetpoint/value> ;
219219
brick:isPointOf <http://example.com/RadiatorThermostat/RadiatorThermostat:room_base_2> .
220220

221-
<http://example.com/temperatureSetpoint_RadiatorThermostat/temperatureSetpoint_RadiatorThermostat:room_base_3> a brick:Temperature_Setpoint ;
221+
<http://example.com/temperatureSetpoint_RadiatorThermostat/RadiatorThermostat:room_base_3> a brick:Temperature_Setpoint ;
222222
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/RadiatorThermostat:room_base_3/attrs/temperatureSetpoint/value> ;
223223
brick:isPointOf <http://example.com/RadiatorThermostat/RadiatorThermostat:room_base_3> .
224224

225-
<http://example.com/temperatureSetpoint_RadiatorThermostat/temperatureSetpoint_RadiatorThermostat:room_base_4> a brick:Temperature_Setpoint ;
225+
<http://example.com/temperatureSetpoint_RadiatorThermostat/RadiatorThermostat:room_base_4> a brick:Temperature_Setpoint ;
226226
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/RadiatorThermostat:room_base_4/attrs/temperatureSetpoint/value> ;
227227
brick:isPointOf <http://example.com/RadiatorThermostat/RadiatorThermostat:room_base_4> .
228228

229-
<http://example.com/temperatureSetpoint_RadiatorThermostat/temperatureSetpoint_RadiatorThermostat:room_base_5> a brick:Temperature_Setpoint ;
229+
<http://example.com/temperatureSetpoint_RadiatorThermostat/RadiatorThermostat:room_base_5> a brick:Temperature_Setpoint ;
230230
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/RadiatorThermostat:room_base_5/attrs/temperatureSetpoint/value> ;
231231
brick:isPointOf <http://example.com/RadiatorThermostat/RadiatorThermostat:room_base_5> .
232232

233-
<http://example.com/temperatureSetpoint_RadiatorThermostat/temperatureSetpoint_RadiatorThermostat:room_base_6> a brick:Temperature_Setpoint ;
233+
<http://example.com/temperatureSetpoint_RadiatorThermostat/RadiatorThermostat:room_base_6> a brick:Temperature_Setpoint ;
234234
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/RadiatorThermostat:room_base_6/attrs/temperatureSetpoint/value> ;
235235
brick:isPointOf <http://example.com/RadiatorThermostat/RadiatorThermostat:room_base_6> .
236236

237-
<http://example.com/temperatureSetpoint_RadiatorThermostat/temperatureSetpoint_RadiatorThermostat:room_base_7> a brick:Temperature_Setpoint ;
237+
<http://example.com/temperatureSetpoint_RadiatorThermostat/RadiatorThermostat:room_base_7> a brick:Temperature_Setpoint ;
238238
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/RadiatorThermostat:room_base_7/attrs/temperatureSetpoint/value> ;
239239
brick:isPointOf <http://example.com/RadiatorThermostat/RadiatorThermostat:room_base_7> .
240240

241-
<http://example.com/temperatureSetpoint_RadiatorThermostat/temperatureSetpoint_RadiatorThermostat:room_base_8> a brick:Temperature_Setpoint ;
241+
<http://example.com/temperatureSetpoint_RadiatorThermostat/RadiatorThermostat:room_base_8> a brick:Temperature_Setpoint ;
242242
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/RadiatorThermostat:room_base_8/attrs/temperatureSetpoint/value> ;
243243
brick:isPointOf <http://example.com/RadiatorThermostat/RadiatorThermostat:room_base_8> .
244244

245-
<http://example.com/temperatureSetpoint_RadiatorThermostat/temperatureSetpoint_RadiatorThermostat:room_base_9> a brick:Temperature_Setpoint ;
245+
<http://example.com/temperatureSetpoint_RadiatorThermostat/RadiatorThermostat:room_base_9> a brick:Temperature_Setpoint ;
246246
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/RadiatorThermostat:room_base_9/attrs/temperatureSetpoint/value> ;
247247
brick:isPointOf <http://example.com/RadiatorThermostat/RadiatorThermostat:room_base_9> .
248248

examples/fiware/kgcp/results/brick/fiware_entities_2rooms.ttl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,27 @@
3030
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/TemperatureSensor:room_base_2/attrs/temperature/value> ;
3131
brick:isPointOf <http://example.com/HotelRoom/HotelRoom:room_base_2> .
3232

33-
<http://example.com/airFlowSetpoint_FreshAirVentilation/airFlowSetpoint_FreshAirVentilation:room_base_1> a brick:Air_Flow_Setpoint ;
33+
<http://example.com/airFlowSetpoint_FreshAirVentilation/FreshAirVentilation:room_base_1> a brick:Air_Flow_Setpoint ;
3434
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/FreshAirVentilation:room_base_1/attrs/airFlowSetpoint/value> ;
3535
brick:isPointOf <http://example.com/FreshAirVentilation/FreshAirVentilation:room_base_1> .
3636

37-
<http://example.com/airFlowSetpoint_FreshAirVentilation/airFlowSetpoint_FreshAirVentilation:room_base_2> a brick:Air_Flow_Setpoint ;
37+
<http://example.com/airFlowSetpoint_FreshAirVentilation/FreshAirVentilation:room_base_2> a brick:Air_Flow_Setpoint ;
3838
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/FreshAirVentilation:room_base_2/attrs/airFlowSetpoint/value> ;
3939
brick:isPointOf <http://example.com/FreshAirVentilation/FreshAirVentilation:room_base_2> .
4040

41-
<http://example.com/fanSpeed_CoolingCoil/fanSpeed_CoolingCoil:room_base_1> a brick:Fan_Speed_Command ;
41+
<http://example.com/fanSpeed_CoolingCoil/CoolingCoil:room_base_1> a brick:Fan_Speed_Command ;
4242
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/CoolingCoil:room_base_1/attrs/fanSpeed/value> ;
4343
brick:isPointOf <http://example.com/CoolingCoil/CoolingCoil:room_base_1> .
4444

45-
<http://example.com/fanSpeed_CoolingCoil/fanSpeed_CoolingCoil:room_base_2> a brick:Fan_Speed_Command ;
45+
<http://example.com/fanSpeed_CoolingCoil/CoolingCoil:room_base_2> a brick:Fan_Speed_Command ;
4646
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/CoolingCoil:room_base_2/attrs/fanSpeed/value> ;
4747
brick:isPointOf <http://example.com/CoolingCoil/CoolingCoil:room_base_2> .
4848

49-
<http://example.com/temperatureSetpoint_RadiatorThermostat/temperatureSetpoint_RadiatorThermostat:room_base_1> a brick:Temperature_Setpoint ;
49+
<http://example.com/temperatureSetpoint_RadiatorThermostat/RadiatorThermostat:room_base_1> a brick:Temperature_Setpoint ;
5050
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/RadiatorThermostat:room_base_1/attrs/temperatureSetpoint/value> ;
5151
brick:isPointOf <http://example.com/RadiatorThermostat/RadiatorThermostat:room_base_1> .
5252

53-
<http://example.com/temperatureSetpoint_RadiatorThermostat/temperatureSetpoint_RadiatorThermostat:room_base_2> a brick:Temperature_Setpoint ;
53+
<http://example.com/temperatureSetpoint_RadiatorThermostat/RadiatorThermostat:room_base_2> a brick:Temperature_Setpoint ;
5454
rdf:value <https://fiware.eonerc.rwth-aachen.de/v2/entities/RadiatorThermostat:room_base_2/attrs/temperatureSetpoint/value> ;
5555
brick:isPointOf <http://example.com/RadiatorThermostat/RadiatorThermostat:room_base_2> .
5656

0 commit comments

Comments
 (0)