Reputation: 143
Say I have a relationship between two individuals such that "Bob works for MiningCo."
I want to be able to ask it "Who does Bob work for?" but it seems like in OWL DL the only question I know how to to write is "Who works for MiningCo?" i.e.
worksFor some {MiningCo}
Is there a way to ask a question where I can get an individual object when I query with a individual subject and a predicate?
Upvotes: 1
Views: 1276
Reputation: 11459
DL queries are Manchester syntax class expressions. Manchester syntax is a user-friendly syntax for OWL ontologies. OWL allows to define inverse properties. Thus:
inverse worksFor some {Bob}
Is there a way to ask a question where I can get an individual object when I query with a individual subject and a predicate?
You could also use the SPARQL plugin or the Snap SPARQL plugin:
SELECT * WHERE {:Bob :worksFor ?object}
The difference is that the latter supports querying over inferred knowledge.
Upvotes: 1