Closed hylkevds closed 10 years ago
How was the sensor registered? via lsm_register, using a metadata file?
In any case, LSM looks for the following sensor metadata (Actually this is not related to gsn, this is what LSM server looks for in virtuoso)
sparql select ?name ?sensorType ?author ?place "+ " from <"+ metaGraph +"> \n" + "where{ "+ "<"+id+"> http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://purl.oclc.org/NET/ssnx/ssn#Sensor."+ "<"+id+"> http://www.w3.org/ns/prov#wasGeneratedBy ?author."+ "<"+id+"> http://www.loa-cnr.it/ontologies/DUL.owl#hasLocation ?place."+ "<"+id+"> http://www.w3.org/2000/01/rdf-schema#label ?name."+ "<"+id+"> rdf:type ?sensorType."+
Yes, it was registered using a metadata file, over the rest interface.
I also suspect it's that first restriction in the where
that is the problem. That seems to look for something that is an SSN#Sensor. So I guess we need the schema editor for that?
Ok I confirm the issue. I registered sensors with RDF directly that's why it worked in my previous tests. LSM registers using 'subclassOf ssn:Sensor' but it looks for 'typeOf' ssn:Sensor
Thanks, I will test the code and update it.
On 19 Aug 2014, at 10:23, Hylke van der Schaaf notifications@github.com wrote:
Reopened #80.
— Reply to this email directly or view it on GitHub.
Confirm the issue...!!! The only place that uses the subclassOf is the sensorMeta.xsl
Rest of LSM only uses #type to represent sensor type.
This could be a time consuming fix with a likelihood of affecting the functioning of the request definition and presentation interfaces as I am not sure what SPARQL it uses to get list of sensors and so on.!!!!
Using rdf:type ssn:Sensor should be fine IMO, I don't see why it should be subclassOf.
The reason is to identify the sensorType. The previous version uses sensorType as a label and it will make the data seems to be not correct (i.e.: becoming messy if the user register a new sensor type with typos…). As we already discussed in Malta, the sensorType can be a subclass of ssn:Sensor. It also means that if the user want to add a new sensor with a new type, he has to extend the ontology. In this case, he has to use the schema editor. I’m still finding another way around to solve this issue but I haven’t figured out yet.
Any suggestion?
On 19 Aug 2014, at 17:22, Jean-Paul Calbimonte notifications@github.com wrote:
Using rdf:type ssn:Sensor should be fine IMO, I don't see why it should be subclassOf.
— Reply to this email directly or view it on GitHub.
If I am correct, xGSN only registers the sensor instance and not the sensor Type.
Hence, the sensorType will not be a subclass of ssn:Sensor.
The sensorType will be a subclass of another resouce id which will inturn be the subclass of ssn:Sensor.
See below as how In the schema editor, I have currently taken this apporach based on our previous discussions and comments from Myriam.
For Sensor Type, I define a class Demo which is a subclass of ssn:Sensor When I store this in LSM after converting it using Apache Jena.
select * from http://lsm.deri.ie/OpenIoT/guest/sensormeta# where { http://services.openiot.eu/resources#Demo ?o ?p }
o
p
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
http://www.w3.org/2002/07/owl#Class
http://www.w3.org/2000/01/rdf-schema#subClassOf
http://purl.oclc.org/NET/ssnx/ssn#Sensor
http://purl.oclc.org/NET/ssnx/ssn#observes
"http://lsm.deri.ie/AirTemperature"
http://purl.oclc.org/NET/ssnx/ssn#observes
http://purl.oclc.org/NET/ssnx/ssn#hasMeasurementCapability
http://services.openiot.eu/resources#mct1408438026556
From here, I use xGSN LSM metadata creator code (not via RDF) to create a sensor instance. As you see I was using the previous version (from develop and not security-integration)
Since it is not RDF, LSM re-inserted the sensorType as ssnSensor and also repeats the observes part.
Further, the sensorType is stored as a label under the resource id connected via the hasSensorType
select * from http://lsm.deri.ie/OpenIoT/guest/sensormeta# where { http://lsm.deri.ie/resource/3952855311084705 ?o ?p }
o
P
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
http://lsm.deri.ie/ont/lsm.owl#SensorType
http://www.w3.org/2000/01/rdf-schema#label
"http://services.openiot.eu/resources#Demo"
select * from http://lsm.deri.ie/OpenIoT/guest/sensormeta# where { http://lsm.deri.ie/resource/2532521733448080 ?o ?p } o
p
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
http://purl.oclc.org/NET/ssnx/ssn#Sensor
http://www.w3.org/2000/01/rdf-schema#label
"instancedemo"
http://purl.org/net/provenance/ns#PerformedAt
2014-08-19T09:48:20.648+01:00
http://purl.org/net/provenance/ns#PerformedBy
http://localhost:22001http://localhost:22001/
http://lsm.deri.ie/ont/lsm.owl#hasSourceType
"gsn"
http://www.loa-cnr.it/ontologies/DUL.owl#hasLocation
http://lsm.deri.ie/resource/2532521734238001
http://purl.oclc.org/NET/ssnx/ssn#observes
http://lsm.deri.ie/resource/3952855311109434
http://purl.oclc.org/NET/ssnx/ssn#observes
http://lsm.deri.ie/resource/3952855311116909
http://lsm.deri.ie/ont/lsm.owl#hasSensorType
http://lsm.deri.ie/resource/3952855311084705
As far as my suggestions, it think we will need to rethink this as changes to the ontology concepts will result in changes to other component.
I tested by changing the subclassOf property to type. I was able to push data into LSM via xGSN as the registered sensor was found (getting rid of the previous error).
But the request definition was not able to discover the sensor since a discover query returned two values
The type ssn:Sensor
The actual sensor I was looking for e.g. laussane
I did not dig further, I will investigate it further and report.
In the meantime, I suggest we have a quick webex including Jean-Paul, Hoan, myself, Hylke and Nikos to see how we can work this around without impacting the other components.
In my view, this will need a good discussion to have a proper solution which we don’t have to revisit in the future.
Thanks and Regards prem
From: nmqhoan [mailto:notifications@github.com] Sent: Wednesday, 20 August 2014 2:35 AM To: OpenIotOrg/openiot Cc: Jayaraman, Prem (DP&S, Acton) Subject: Re: [openiot] SecurityIntegration: LSM-XGSN: can't push data (#80)
The reason is to identify the sensorType. The previous version uses sensorType as a label and it will make the data seems to be not correct (i.e.: becoming messy if the user register a new sensor type with typos…). As we already discussed in Malta, the sensorType can be a subclass of ssn:Sensor. It also means that if the user want to add a new sensor with a new type, he has to extend the ontology. In this case, he has to use the schema editor. I’m still finding another way around to solve this issue but I haven’t figured out yet.
Any suggestion?
On 19 Aug 2014, at 17:22, Jean-Paul Calbimonte notifications@github.com<mailto:notifications@github.com> wrote:
Using rdf:type ssn:Sensor should be fine IMO, I don't see why it should be subclassOf.
— Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHubhttps://github.com/OpenIotOrg/openiot/issues/80#issuecomment-52661363.
Thanks Prem for your suggestion. I totally agree with you, we should have a good webex discussion relating to this issue. As tomorrow morning (Irish time), we will have a weekly OpenIoT webex, can you guys join this so we can discuss?
Hoan Nguyen Mau Quoc Sensor Middleware Unit DERI, National University of Ireland, Galway
On 20 Aug 2014, at 02:08, Prem Jayaraman notifications@github.com wrote:
If I am correct, xGSN only registers the sensor instance and not the sensor Type.
Hence, the sensorType will not be a subclass of ssn:Sensor.
The sensorType will be a subclass of another resouce id which will inturn be the subclass of ssn:Sensor.
See below as how In the schema editor, I have currently taken this apporach based on our previous discussions and comments from Myriam.
For Sensor Type, I define a class Demo which is a subclass of ssn:Sensor When I store this in LSM after converting it using Apache Jena.
select * from http://lsm.deri.ie/OpenIoT/guest/sensormeta# where { http://services.openiot.eu/resources#Demo ?o ?p }
o
p
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
http://www.w3.org/2002/07/owl#Class
http://www.w3.org/2000/01/rdf-schema#subClassOf
http://purl.oclc.org/NET/ssnx/ssn#Sensor
http://purl.oclc.org/NET/ssnx/ssn#observes
"http://lsm.deri.ie/AirTemperature"
http://purl.oclc.org/NET/ssnx/ssn#observes
http://purl.oclc.org/NET/ssnx/ssn#hasMeasurementCapability
http://services.openiot.eu/resources#mct1408438026556
From here, I use xGSN LSM metadata creator code (not via RDF) to create a sensor instance. As you see I was using the previous version (from develop and not security-integration)
Since it is not RDF, LSM re-inserted the sensorType as ssnSensor and also repeats the observes part.
Further, the sensorType is stored as a label under the resource id connected via the hasSensorType
select * from http://lsm.deri.ie/OpenIoT/guest/sensormeta# where { http://lsm.deri.ie/resource/3952855311084705 ?o ?p }
o
P
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
http://lsm.deri.ie/ont/lsm.owl#SensorType
http://www.w3.org/2000/01/rdf-schema#label
"http://services.openiot.eu/resources#Demo"
select * from http://lsm.deri.ie/OpenIoT/guest/sensormeta# where { http://lsm.deri.ie/resource/2532521733448080 ?o ?p } o
p
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
http://purl.oclc.org/NET/ssnx/ssn#Sensor
http://www.w3.org/2000/01/rdf-schema#label
"instancedemo"
http://purl.org/net/provenance/ns#PerformedAt
2014-08-19T09:48:20.648+01:00
http://purl.org/net/provenance/ns#PerformedBy
http://localhost:22001http://localhost:22001/
http://lsm.deri.ie/ont/lsm.owl#hasSourceType
"gsn"
http://www.loa-cnr.it/ontologies/DUL.owl#hasLocation
http://lsm.deri.ie/resource/2532521734238001
http://purl.oclc.org/NET/ssnx/ssn#observes
http://lsm.deri.ie/resource/3952855311109434
http://purl.oclc.org/NET/ssnx/ssn#observes
http://lsm.deri.ie/resource/3952855311116909
http://lsm.deri.ie/ont/lsm.owl#hasSensorType
http://lsm.deri.ie/resource/3952855311084705
As far as my suggestions, it think we will need to rethink this as changes to the ontology concepts will result in changes to other component.
I tested by changing the subclassOf property to type. I was able to push data into LSM via xGSN as the registered sensor was found (getting rid of the previous error).
But the request definition was not able to discover the sensor since a discover query returned two values
- The type ssn:Sensor
- The actual sensor I was looking for e.g. laussane
I did not dig further, I will investigate it further and report.
In the meantime, I suggest we have a quick webex including Jean-Paul, Hoan, myself, Hylke and Nikos to see how we can work this around without impacting the other components.
In my view, this will need a good discussion to have a proper solution which we don’t have to revisit in the future.
Thanks and Regards prem
From: nmqhoan [mailto:notifications@github.com] Sent: Wednesday, 20 August 2014 2:35 AM To: OpenIotOrg/openiot Cc: Jayaraman, Prem (DP&S, Acton) Subject: Re: [openiot] SecurityIntegration: LSM-XGSN: can't push data (#80)
The reason is to identify the sensorType. The previous version uses sensorType as a label and it will make the data seems to be not correct (i.e.: becoming messy if the user register a new sensor type with typos…). As we already discussed in Malta, the sensorType can be a subclass of ssn:Sensor. It also means that if the user want to add a new sensor with a new type, he has to extend the ontology. In this case, he has to use the schema editor. I’m still finding another way around to solve this issue but I haven’t figured out yet.
Any suggestion?
On 19 Aug 2014, at 17:22, Jean-Paul Calbimonte notifications@github.com<mailto:notifications@github.com> wrote:
Using rdf:type ssn:Sensor should be fine IMO, I don't see why it should be subclassOf.
— Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHubhttps://github.com/OpenIotOrg/openiot/issues/80#issuecomment-52661363. — Reply to this email directly or view it on GitHub.
Sure!!
Could you please send us an invite with webex connection details.
Thanks Prem
From: nmqhoan [notifications@github.com] Sent: Wednesday, August 20, 2014 5:35 PM To: OpenIotOrg/openiot Cc: Jayaraman, Prem (DP&S, Acton) Subject: Re: [openiot] SecurityIntegration: LSM-XGSN: can't push data (#80)
Thanks Prem for your suggestion. I totally agree with you, we should have a good webex discussion relating to this issue. As tomorrow morning (Irish time), we will have a weekly OpenIoT webex, can you guys join this so we can discuss?
Hoan Nguyen Mau Quoc Sensor Middleware Unit DERI, National University of Ireland, Galway
On 20 Aug 2014, at 02:08, Prem Jayaraman notifications@github.com wrote:
If I am correct, xGSN only registers the sensor instance and not the sensor Type.
Hence, the sensorType will not be a subclass of ssn:Sensor.
The sensorType will be a subclass of another resouce id which will inturn be the subclass of ssn:Sensor.
See below as how In the schema editor, I have currently taken this apporach based on our previous discussions and comments from Myriam.
For Sensor Type, I define a class Demo which is a subclass of ssn:Sensor When I store this in LSM after converting it using Apache Jena.
select * from http://lsm.deri.ie/OpenIoT/guest/sensormeta# where { http://services.openiot.eu/resources#Demo ?o ?p }
o
p
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
http://www.w3.org/2002/07/owl#Class
http://www.w3.org/2000/01/rdf-schema#subClassOf
http://purl.oclc.org/NET/ssnx/ssn#Sensor
http://purl.oclc.org/NET/ssnx/ssn#observes
"http://lsm.deri.ie/AirTemperature"
http://purl.oclc.org/NET/ssnx/ssn#observes
http://purl.oclc.org/NET/ssnx/ssn#hasMeasurementCapability
http://services.openiot.eu/resources#mct1408438026556
From here, I use xGSN LSM metadata creator code (not via RDF) to create a sensor instance. As you see I was using the previous version (from develop and not security-integration)
Since it is not RDF, LSM re-inserted the sensorType as ssnSensor and also repeats the observes part.
Further, the sensorType is stored as a label under the resource id connected via the hasSensorType
select * from http://lsm.deri.ie/OpenIoT/guest/sensormeta# where { http://lsm.deri.ie/resource/3952855311084705 ?o ?p }
o
P
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
http://lsm.deri.ie/ont/lsm.owl#SensorType
http://www.w3.org/2000/01/rdf-schema#label
"http://services.openiot.eu/resources#Demo"
select * from http://lsm.deri.ie/OpenIoT/guest/sensormeta# where { http://lsm.deri.ie/resource/2532521733448080 ?o ?p } o
p
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
http://purl.oclc.org/NET/ssnx/ssn#Sensor
http://www.w3.org/2000/01/rdf-schema#label
"instancedemo"
http://purl.org/net/provenance/ns#PerformedAt
2014-08-19T09:48:20.648+01:00
http://purl.org/net/provenance/ns#PerformedBy
http://localhost:22001http://localhost:22001/
http://lsm.deri.ie/ont/lsm.owl#hasSourceType
"gsn"
http://www.loa-cnr.it/ontologies/DUL.owl#hasLocation
http://lsm.deri.ie/resource/2532521734238001
http://purl.oclc.org/NET/ssnx/ssn#observes
http://lsm.deri.ie/resource/3952855311109434
http://purl.oclc.org/NET/ssnx/ssn#observes
http://lsm.deri.ie/resource/3952855311116909
http://lsm.deri.ie/ont/lsm.owl#hasSensorType
http://lsm.deri.ie/resource/3952855311084705
As far as my suggestions, it think we will need to rethink this as changes to the ontology concepts will result in changes to other component.
I tested by changing the subclassOf property to type. I was able to push data into LSM via xGSN as the registered sensor was found (getting rid of the previous error).
But the request definition was not able to discover the sensor since a discover query returned two values
- The type ssn:Sensor
- The actual sensor I was looking for e.g. laussane
I did not dig further, I will investigate it further and report.
In the meantime, I suggest we have a quick webex including Jean-Paul, Hoan, myself, Hylke and Nikos to see how we can work this around without impacting the other components.
In my view, this will need a good discussion to have a proper solution which we don’t have to revisit in the future.
Thanks and Regards prem
From: nmqhoan [mailto:notifications@github.com] Sent: Wednesday, 20 August 2014 2:35 AM To: OpenIotOrg/openiot Cc: Jayaraman, Prem (DP&S, Acton) Subject: Re: [openiot] SecurityIntegration: LSM-XGSN: can't push data (#80)
The reason is to identify the sensorType. The previous version uses sensorType as a label and it will make the data seems to be not correct (i.e.: becoming messy if the user register a new sensor type with typos…). As we already discussed in Malta, the sensorType can be a subclass of ssn:Sensor. It also means that if the user want to add a new sensor with a new type, he has to extend the ontology. In this case, he has to use the schema editor. I’m still finding another way around to solve this issue but I haven’t figured out yet.
Any suggestion?
On 19 Aug 2014, at 17:22, Jean-Paul Calbimonte notifications@github.com<mailto:notifications@github.com> wrote:
Using rdf:type ssn:Sensor should be fine IMO, I don't see why it should be subclassOf.
— Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHubhttps://github.com/OpenIotOrg/openiot/issues/80#issuecomment-52661363. — Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHubhttps://github.com/OpenIotOrg/openiot/issues/80#issuecomment-52743159.
just fixed the bugs. Please recheck.
Yep, it works!
After registering a sensor through LSM I can't push data, because LSM doesn't recognise the sensor metadata that is in virtuoso.
GSN log:
LSM log:
What is in virtuoso regarding this sensor:
I'm guessing it is because
testType
is not actually a sensor type. If that is indeed the case, then how do I register a sensor type?