题
我是新来的本体和耶拿的概念,所以我不知道我是正确的这一措辞..
我需要阅读的一系列连接的猫头鹰的文件(由命名空间依赖性?)转换为在存储器Jena的模型(OntModel?),以便推断可以运行。我该怎么做呢?不会对文件的顺序有关系吗?我需要调用特定的方法来“运行推理引擎”?
解决方案
这就是我所做的。它似乎工作
OntModel model = ModelFactory.createOntologyModel();
for (OwlFile referencedOntology: referencedOntologyList) {
model.getDocumentManager().addAltEntry( referencedOntology.getNamespace(), referencedOntology.getURI());
}
model.read(ontology.getURI());
在OwlFile
对象包含的URI本体文件以及其命名空间。
referencedOntologyList
包含引用OwlFile
s的列表
ontology
是包含主本体中的OwlFile
。
不隶属于 StackOverflow