创建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))
答案 0 :(得分:1)
getOWLDeclarationAxiom()方法对属性的作用与对类的作用相同,即
OWLObjectProperty hasValue = df.getOWLObjectProperty(IOR + "#hasValue");
OWLDeclarationAxiom d_hasValue = df.getOWLDeclarationAxiom(hasValue);