创建 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))
最佳答案
getOWLDeclarationAxiom() 方法对属性的作用与对类的作用相同,即
OWLObjectProperty hasValue = df.getOWLObjectProperty(IOR + "#hasValue");
OWLDeclarationAxiom d_hasValue = df.getOWLDeclarationAxiom(hasValue);
关于java - 使用 java OWL API 声明对象属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52109860/