1
說,我在門徒創造了一些本體論和存在的一些對象屬性的類的實例,和對象屬性的列表,顯示在下面的圖片:獲取推斷對象屬性斷言山人裏森納
對象屬性的層次結構是如下所示:
現在,當我打開裏森納(隱士),得到以下斷言對象PR
當我的推斷對象屬性「dependsUp」顧客解釋點擊,我得到:此同一個人operties
我的問題是如何產生這使用Java?我已經可以得到一些個人與以下推斷對象的屬性(不完全這裏abreviety,但它的作品,因爲我已經測試):
for (OWLNamedIndividual namedIndividual : this.ontology.getIndividualsInSignature()) {
if (subjectName.equals(namedIndividual.getIRI().getFragment())) {
OWLObjectProperty objectProperty = fac.getOWLObjectProperty(IRI.create(propertyIRI));
NodeSet<OWLNamedIndividual> namedIndividualSet = reasoner.getObjectPropertyValues(namedIndividual ,objectProperty);
for (Node<OWLNamedIndividual> namedIndividualsInObjectPropertySet : namedIndividualSet) {
for (OWLNamedIndividual namedIndividualForObjectPropertySet : namedIndividualsInObjectPropertySet) {
for (OWLClassExpression owlClass : namedIndividualForObjectPropertySet.getTypes(this.ontology)){
if (owlClass.toString().split("#")[1].replace(">", "").equals(archiClass)) {
result.add(OWLOntologyUtils.getHumanInstanceName(this.ontology, namedIndividualForObjectPropertySet.getIRI().getFragment()));
// Result contains all the inferred object properties shown in the above pictures, so this code works. How can I access the explanation for one of the inferred object properties by the reasoner here?
}
}
}
}
}
}
聽起來很有趣,並不知道如何使用它來獲取個人的推斷對象屬性。 我看到您是OWLAPI的核心貢獻者,您是否可以提供一個示例,告訴我如何獲得使用此類的某個人的推斷對象屬性? – luispcosta