1

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?

Stanislav Kralin
  • 11,070
  • 4
  • 35
  • 58
topfoxrider
  • 143
  • 10

1 Answers1

1

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.

Stanislav Kralin
  • 11,070
  • 4
  • 35
  • 58