2

我正在使用 OWL API 3。我创建了一个新的本体,但我不明白如何将 owl:imports 与本体关联。

我使用了 IRImappers,但它们不起作用。

感谢您的帮助。

4

1 回答 1

2

你可以试试这段代码:

OWLOntology ontology = manager.createOntology(ontologyIRI);

OWLImportsDeclaration importDeclaraton =
   factory.getOWLImportsDeclaration(importIRI); 

manager.applyChange(new AddImport(ontology, importDeclaraton));
于 2012-03-25T00:23:40.407 回答