Hello all,
I have created a mapping for a Mongo DB to virtualise data which is split into messages and observations. The mapping seems to work, but I can't access the data properties of the observations via SPARQL. I only get to the individual and then I don't retrieve anything.
If I now search directly for the appropriate observation and want to retrieve the data property, it gives me the following result
The mapping code can be found below.
PREFIX rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
PREFIX rdfs: http://www.w3.org/2000/01/rdf-schema#
PREFIX sosa: http://www.w3.org/ns/sosa/
PREFIX FTOnto: http://iot.uni-trier.de/FTOnto#
PREFIX StreamDataAnnotationOnto: http://iot.uni-trier.de/StreamDataAnnotationOnto#
MAPPING urn:Oven
FROM JSON {
"Oven":{
"_id":"?Oven",
"ID":"?O_ID",
"TIMESTAMP":"?Timestamp",
"I1_POSITION_SWITCH_PRESSED":"?I1_POSITION_SWITCH_PRESSED",
"I2_POSITION_SWITCH_PRESSED":"?I2_POSITION_SWITCH_PRESSED",
"I5_LIGHT_BARRIER_INTERRUPTED":"?I5_LIGHT_BARRIER_INTERRUPTED",
"M1_SPEED":"?M1_SPEED",
"O7_VALVE_OPEN":"?O7_VALVE_OPEN",
"O8_COMPRESSOR_POWER_LEVEL":"?O8_COMPRESSOR_POWER_LEVEL",
"CURRENT_STATE":"?CURRENT_STATE",
"CURRENT_TASK":"?CURRENT_TASK",
"CURRENT_TASK_ELAPSED_SECONDS_SINCE_START":"?CURRENT_TASK_ELAPSED_SECONDS_SINCE_START",
"CURRENT_SUB_TASK":"?CURRENT_SUB_TASK",
"BUSINESS_KEY":"?BUSINESS_KEY",
"PROCESS_DEFINITION_ID":"?PROCESS_DEFINITION_ID"
}
}
TO {
?Message a FTOnto:Kafka_Message_OV1;
FTOnto:timestamp ?Timestamp ;
StreamDataAnnotationOnto:isPublishedToTopic StreamDataAnnotationOnto:Kafka_Topic_OV_1 ;
FTOnto:has_Information ?ID ;
FTOnto:has_Information ?I1 ;
FTOnto:has_Information ?I2 ;
FTOnto:has_Information ?LBO ;
FTOnto:has_Information ?M1 ;
FTOnto:has_Information ?O7 ;
FTOnto:has_Information ?O8 ;
FTOnto:has_Information ?CS ;
FTOnto:has_Information ?CT ;
FTOnto:has_Information ?CTESSS ;
FTOnto:has_Information ?CST ;
FTOnto:has_Information ?BK ;
FTOnto:has_Information ?PDI .
?ID a FTOnto:OV_1_ID;
FTOnto:timestamp ?Timestamp ;
sosa:hasSimpleResult ?O_ID ;
FTOnto:is_Information ?Message .
?I1 a FTOnto:Position_Switch_I1_Observation;
FTOnto:timestamp ?Timestamp;
sosa:hasSimpleResult ?I1_POSITION_SWITCH_PRESSED ;
FTOnto:is_Information ?Message .
?I2 a FTOnto:Position_Switch_I2_Observation;
FTOnto:timestamp ?Timestamp;
sosa:hasSimpleResult ?I2_POSITION_SWITCH_PRESSED ;
FTOnto:is_Information ?Message .
?LBO a FTOnto:Light_Barrier_5_Observation;
FTOnto:timestamp ?Timestamp;
sosa:hasSimpleResult ?I5_LIGHT_BARRIER_INTERRUPTED ;
FTOnto:is_Information ?Message .
?M1 a FTOnto:Motor_Speed_M1_Observation;
FTOnto:timestamp ?Timestamp;
sosa:hasSimpleResult ?M1_SPEED ;
FTOnto:is_Information ?Message .
?O7 a FTOnto:Valve_7_Observation;
FTOnto:timestamp ?Timestamp;
sosa:hasSimpleResult ?O7_VALVE_OPEN ;
FTOnto:is_Information ?Message .
?O8 a FTOnto:Compressor_Power_Level_O8_Observation;
FTOnto:timestamp ?Timestamp;
sosa:hasSimpleResult ?O8_COMPRESSOR_POWER_LEVEL ;
FTOnto:is_Information ?Message .
?CS a FTOnto:OV_1_CURRENT_STATE;
FTOnto:timestamp ?Timestamp;
sosa:hasSimpleResult ?CURRENT_STATE ;
FTOnto:is_Information ?Message .
?CT a FTOnto:OV_1_CURRENT_TASK;
FTOnto:timestamp ?Timestamp;
sosa:hasSimpleResult ?CURRENT_TASK ;
FTOnto:is_Information ?Message .
?CTESSS a FTOnto:OV_1_CURRENT_TASK_ELAPSED_SECONDS_SINCE_START;
FTOnto:timestamp ?Timestamp;
sosa:hasSimpleResult ?CURRENT_TASK_ELAPSED_SECONDS_SINCE_START ;
FTOnto:is_Information ?Message .
?CST a FTOnto:OV_1_CURRENT_SUB_TASK;
FTOnto:timestamp ?Timestamp;
sosa:hasSimpleResult ?CURRENT_SUB_TASK ;
FTOnto:is_Information ?Message .
?BK a FTOnto:OV_1_BUSINESS_KEY;
FTOnto:timestamp ?Timestamp;
sosa:hasSimpleResult ?BUSINESS_KEY ;
FTOnto:is_Information ?Message .
?PDI a FTOnto:OV_1_PROCESS_DEFINITION_ID;
FTOnto:timestamp ?Timestamp;
sosa:hasSimpleResult ?PROCESS_DEFINITION_ID ;
FTOnto:is_Information ?Message .
}
WHERE {
BIND (template("mongodb://localhost:27017/Oven_Message_{Oven}") AS ?Message)
BIND (template("mongodb://localhost:27017/Oven_ID_{Oven}") AS ?ID)
BIND (template("mongodb://localhost:27017/Oven_I1_{Oven}") AS ?I1)
BIND (template("mongodb://localhost:27017/Oven_I2_{Oven}") AS ?I2)
BIND (template("mongodb://localhost:27017/Oven_LBO_{Oven}") AS ?LBO)
BIND (template("mongodb://localhost:27017/Oven_M1_{Oven}") AS ?M1)
BIND (template("mongodb://localhost:27017/Oven_O7_{Oven}") AS ?O7)
BIND (template("mongodb://localhost:27017/Oven_O8_{Oven}") AS ?O8)
BIND (template("mongodb://localhost:27017/Oven_CS_{Oven}") AS ?CS)
BIND (template("mongodb://localhost:27017/Oven_CT_{Oven}") AS ?CT)
BIND (template("mongodb://localhost:27017/Oven_CTESSS_{Oven}") AS ?CTESSS)
BIND (template("mongodb://localhost:27017/Oven_CST_{Oven}") AS ?CST)
BIND (template("mongodb://localhost:27017/Oven_BK_{Oven}") AS ?BK)
BIND (template("mongodb://localhost:27017/Oven_PDI_{Oven}") AS ?PDI)
}
does anyone know why this "triple jump" does not work ?
Thanks in advance for the help
Greetings
Dennis