For example, I have imported ontology x.owl and y.owl into z.owl. I want to remove x.owl after some reasoning. How can I do this using the owl api?
Asked
Active
Viewed 70 times
0
-
2`man.applyChange(new RemoveImport(o, m.getOWLDataFactory().getOWLImportsDeclaration(IRI.create("http://domain.for.import.ontology/importedontology"))));` – UninformedUser Sep 15 '18 at 06:43
-
1The comment above should be the full answer. For context, all changes to an ontology go through either an Add or a Remove object (AddAxiom, RemoveAxiom, AddImport, RemoveImport). Also note that, after changing the imports, it might be necessary to flush the reasoner for it to see the changes). – Ignazio Sep 15 '18 at 17:08