I'm writing a diploma thesis about how does weather affect on people's health (meteoropathy). The ontology is shown in the picture in this link: http://dl.dropbox.com/u/5322973/WeatherHealthcast1%20-%20Properties.PNG
So, a wrote a simple SWRL rule:
Weather(?w) ∧ temperature(?w, ?t) ∧ swrlb:greaterThan(?t, 25.0) → Disease(Migraine1)
which means that if the weather temperature is greater than 25°C there is a strong chance the patient will be suffering from migraine (Migraine1 is an individual of the "Disease" class) I entered some individuals in the ontology and tried to run the SQWRL query rule
Weather(?w) ∧ temperature(?w, ?t) ∧ swrlb:greaterThan(?t, 25.0) → sqwrl:select(Migraine1)
and it works fine. But, when I try to run a SPARQL query:
prefix WeatherHealthcast: <http://www.semanticweb.org/ontologies/2011/2/WeatherHealthcast.owl#>
SELECT ?disease ?tm ?w
WHERE
{
?temperature rdf:type WeatherHealthcast:Weather.
?temperature WeatherHealthcast:temperature ?tm.
FILTER (?tm = 30.0).
?disease rdf:type WeatherHealthcast:Disease.
?w rdf:type WeatherHealthcast:Weather.
?w WeatherHealthcast:affects ?disease.
}
it seems like the rule doesn't apply (with this SPARQL query I want to get all possible diseases if the weather temperature is 30°C). Does anyone know how to make this work, how to include the SWRL rule in to the SPARQL query?