Ich habe eine OntologieJava owlapi extrahieren
<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>
Ich versuche, alle ObjectProperties zu extrahieren,
for (OWLObjectProperty obp : ont.getObjectPropertiesInSignature()){
System.out.println(obp.toString());
}
diese den Namen von Object gedruckt wird, zum Beispiel http://purl.obolibrary.org/obo/BFO_0000050.
Ich frage mich, wie man die rdfs: label, z.B. Teil von
Dies ist eine großartige Lösung. Ich bin neu in diesem und anderen Klassen hängt schwer von owlapi 4.3. Gibt es eine Chance, dass Sie eine 4.3 Version dieser Lösung erstellen können? – ThanksMate
für (endgültige OWLObjectProperty OProp: ontology.getObjectPropertiesInSignature()) für (endgültige OWLAnnotationAssertionAxiom Axiom: ontology.getAnnotationAssertionAxioms (oprop.getIRI())) \t \t \t System.out.printin (OProp + "\ t" + axiom.getAnnotation ().Wert erhalten()); Sorry, ich übergebe das mit alten Versionen. – Galigator
Tut mir leid Kumpel, ich habe dein Beispiel in, ich habe, 'code' \t [email protected], Könnten Sie Hilf mir, das zu lösen? –
ThanksMate