Search code examples
owlowl-api

OWL-API: making a set of individuals equivalent to owl:Thing


I'm trying to add an equivalent axiom of the following form:

owl:Thing EquivalentTo {individual1, indivdual2, ... individualN}

Below is how I'm trying to add the axiom:

String individualSet = "{a, b, c, d}"    
OWLAxiom a = df.getOWLEquivalentClassesAxiom(df.getOWLClass(individualSet), df.getOWLThing());
manager.addAxiom(ontology, a);

The problem is that this actually creates an extra class with the name "{a, b, c, d}", which prevents a reasoner from making right conclusions as intended.

In Protege, I can add this type of Equivalent To axiom without resulting in an extra class... How can I do the same with OWL-API?


Solution

  • I figured it out. I had to use OWLObjectOneOf to compose a set of individuals and make that equivalent to owl:Thing.