Using OWLAPI 4.5.2 is there a way to pull out the class description for an OWLClass in an ontology? Specifically I'm looking for the asserted axioms that describe that class along with annotation properties, basically the block you get in a Protege save such as:
<!-- http://edamontology.org/data_0848 -->
<owl:Class rdf:about="http://edamontology.org/data_0848">
<rdfs:subClassOf rdf:resource="http://edamontology.org/data_2044"/>
<edamontology:created_in>beta12orEarlier</edamontology:created_in>
<oboInOwl:hasDefinition>A raw molecular sequence (string of characters) which might include ambiguity, unknown positions and non-sequence characters.</oboInOwl:hasDefinition>
<oboInOwl:inSubset rdf:resource="http://purl.obolibrary.org/obo/edam#data"/>
<oboInOwl:inSubset rdf:resource="http://purl.obolibrary.org/obo/edam#edam"/>
<rdfs:comment>Non-sequence characters may be used for example for gaps and translation stop.</rdfs:comment>
<rdfs:label>Raw sequence</rdfs:label>
</owl:Class>
I'm only interested in the assertions on the class, nothing that is inferred after. Many thanks for any help you can offer (the OWLAPI is great if you're reading this and you write it!).
The annotations can be retrieved with
OWLOntology o = ...
OWLClass a = ...
o.annotationAssertionAxioms(a.getIRI());
The class description (i.e., the other axioms involving the class) can be retrieved with
o.referencingAxioms(a);