On 22/11/16 10:12, tina sani wrote:
Inline image 1
The mail list doesn't support attachments so the image didn't come through.
However, I'm guessing it included a class Employee with sub-classes
ContractEmployee and PermanantEmployee.
I have this ontology: Now if I want to use some rules like
if x rdf:type Employee and ?x salary>Euro10,000. then ?x QualifiedEmployee.
My question here is should I use ?x rdf:type Employee or ?x rdf:type
ContractEmployee or PermanantEmployee
Depends on your set up.
You could have an inference model with the appropriate configuration to
deduce membership of employee and then query that with SPARQL or with a
second inference model with your own rules in.
If you want just one layer of rules and want to combine OWL/RDFS with
your custom rules then that's possible (so long as you set all the
appropriate flags, see documentation) but make sure that your own rules
are backward not forward rules. [The default Jena rule sets for RDFS and
OWL are hybrid rules so some of the inferences are only available to
backward rules in the same rule set.]
Or if you don't want the cost of full inference then you can indeed
rewrite the "natural" query to explicitly check for the base memberships.
Dave