Search code examples
owl-api

Reasoning of several ontologies


I have three ontologies (o1, o2, o3) loaded in the same OWLOntologyManager object (o2 imports o1 and o3 imports o2).

I want to get the o3 ontology reasoned with Hermit to get different facts from it (it should use reasoned axioms from o1 and o2).

Should I merge o1, o2, o3 to a new one (i.e. use OWLOntologyMerger.createMergedOntology(...)). and then execute InferredOntologyGenerator.fillOntology(...) under the merged ontology?

Or it is enough to reason o1, o2, o3 independently in series and get the same result?


Solution

  • It is sufficient to create the reasoner with o3 as argument. Imported ontologies are used automatically by the reasoner, no merging necessary.