我是新来的本体和耶拿的概念,所以我不知道我是正确的这一措辞..

我需要阅读的一系列连接的猫头鹰的文件(由命名空间依赖性?)转换为在存储器Jena的模型(OntModel?),以便推断可以运行。我该怎么做呢?不会对文件的顺序有关系吗?我需要调用特定的方法来“运行推理引擎”?

有帮助吗?

解决方案

这就是我所做的。它似乎工作

    OntModel model = ModelFactory.createOntologyModel();
    for (OwlFile referencedOntology: referencedOntologyList) {
        model.getDocumentManager().addAltEntry( referencedOntology.getNamespace(), referencedOntology.getURI());
    }
    model.read(ontology.getURI());

OwlFile对象包含的URI本体文件以及其命名空间。

referencedOntologyList包含引用OwlFiles的列表

ontology是包含主本体中的OwlFile

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top