使用java OWL API声明对象属性

问题描述 投票:1回答:1

创建OWL类的声明很容易,即

Declaration(Class(:ComponentIT))

使用java OWL API v5

OWLClass A = df.getOWLClass(IOR + "#ComponentIT");
OWLDeclarationAxiom da = df.getOWLDeclarationAxiom(A);

问题是如何使用OWL API创建对象属性声明(插入OWLOntology对象的公理),即

Declaration(ObjectProperty(:hasValue))
java owl owl-api
1个回答
1
投票

getOWLDeclarationAxiom()方法的工作方式与类相同,即

OWLObjectProperty hasValue = df.getOWLObjectProperty(IOR + "#hasValue");
OWLDeclarationAxiom d_hasValue = df.getOWLDeclarationAxiom(hasValue);
© www.soinside.com 2019 - 2024. All rights reserved.