Dataproperty和ObjectProperty具有相同的名称

时间:2016-08-26 09:25:54

标签: java owl ontology owl-api

考虑以下代码:

OWLClass clsA = factory.getOWLClass("cls_A", pm);
OWLAxiom axiom = factory.getOWLDeclarationAxiom(clsA);
manager.addAxiom(ontology, axiom);

OWLClass clsB = factory.getOWLClass("cls_B", pm);
axiom = factory.getOWLDeclarationAxiom(clsB);
manager.addAxiom(ontology, axiom);

OWLObjectProperty propA = factory.getOWLObjectProperty("prop", pm);
axiom = factory.getOWLDeclarationAxiom(propA);
manager.addAxiom(ontology, axiom);

OWLDataProperty propB = factory.getOWLDataProperty("prop", pm);
axiom = factory.getOWLDeclarationAxiom(propB);
manager.addAxiom(ontology, axiom);

axiom = factory.getOWLObjectPropertyDomainAxiom(propA, clsA);
manager.addAxiom(ontology, axiom);

axiom = factory.getOWLDataPropertyDomainAxiom(propB, clsB);
manager.addAxiom(ontology, axiom);

此代码创建具有2个域类的OP和不具有域类的DP。如果存在具有相同名称的对象属性,如何为数据属性创建域属性?是bug吗?

0 个答案:

没有答案