Hi everyone,
I am using a virtual graph (via SMS) in combination with SSN/SOSA (Semantic Sensor Network Ontology) for describing sensor measurements, metadata, etc. I have no Problems with mapping individuals from the RDB to the model (I think). When I query the virtual graph (within the database where the model is hosted), I have some problems when reasoning is involved. It may be that the query is stated incorrect, the dataset is too extensive (a few million data sets) or there is a misunderstanding about the reasoning capabilities, my mapping is wrong or something completely different.
Within the ontology, there are some inverse object properties stated (sosa:hasResult & sosa:isResultOf, sosa:hosts & sosa:isHostedBy). I now want to get e.g. all observations with a timestamp and the respective result (as well as the sensor which produced the result).
Within my mapping for creating the virtual graph, I only stated, that result "isResultOf sosa:Observation" and therefore I would expect when running the query with reasoning I would get the respective results also for sosa:hasResult (it is declared as an inverse). But it only works when only asking for the results, not in combination with the observation-individuals. Here are some small examples (queries are done in the database where SSN/SOSA is hosted):
This is working (without reasoning):
prefix sosa: <...>
select *
where {
graph virtual://tables4
{?s a sosa:Observation ;
sosa:resultTime ?time . } }
This here also works as a "standalone"-query:
prefix sosa: <..>
select *
where {
graph virtual://tables4
{?s sosa:hasResult ?value . } }
When running this query, I do not get any results (with or without reasoning):
prefix sosa: <...>
select *
where {
graph virtual://tables4
{
?s a sosa:Observation ;
sosa:resultTime ?time ;
sosa:hasResult ?value . } }
I did not make SSN/SOSA a named graph, is that incorrect? It's really confusing right now, therefore I would be really grateful, if you could help me out here!
Thanks a lot!
Cheers,
Sonja