를 추출 owlapi 나는 온톨로지이을 ObjectProperty, 예를 들어,의 이름을 인쇄합니다자바
for (OWLObjectProperty obp : ont.getObjectPropertiesInSignature()){
System.out.println(obp.toString());
}
나는 모든 ObjectProperties를 추출하기 위해 노력하고있어
<owl:ObjectProperty rdf:about="http://purl.obolibrary.org/obo/BFO_0000050">
<owl:inverseOf rdf:resource="http://purl.obolibrary.org/obo/BFO_0000051"/>
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#TransitiveProperty"/>
<oboInOwl:hasDbXref rdf:datatype="http://www.w3.org/2001/XMLSchema#string">BFO:0000050</oboInOwl:hasDbXref>
<oboInOwl:hasOBONamespace rdf:datatype="http://www.w3.org/2001/XMLSchema#string">external</oboInOwl:hasOBONamespace>
<oboInOwl:id rdf:datatype="http://www.w3.org/2001/XMLSchema#string">part_of</oboInOwl:id>
<oboInOwl:shorthand rdf:datatype="http://www.w3.org/2001/XMLSchema#string">part_of</oboInOwl:shorthand>
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">part of</rdfs:label>
</owl:ObjectProperty>
에게,이 http://purl.obolibrary.org/obo/BFO_0000050.
나는 어떻게 rdfs : label을 얻는 지 궁금해.
이것은 훌륭한 해결책입니다. 나는 이것에 익숙하지 않고 다른 클래스는 owlapi 4.3에 무겁다. 이 솔루션의 4.3 버전을 만들 수있는 기회가 있습니까? 위한 – ThanksMate
(최종 OWLObjectProperty의 oprop : ontology.getObjectPropertiesInSignature())에 대한 (최종 OWLAnnotationAssertionAxiom 공리 : ontology.getAnnotationAssertionAxioms (oprop.getIRI())) \t \t \t에서 System.out.println (oprop + "\ t"+ axiom.getAnnotation () .getValue()); 죄송합니다. 구 버전에서이 작업을 수행합니다. – Galigator
죄송합니다. 당신의 예를 들어 보겠습니다. 'code' \t [email protected], 이 문제를 해결하도록 도와 주시겠습니까? –
ThanksMate