+ " owl:annotatedProperty rdfs:subClassOf ;\n"
+ " :prov [\n prov:gen :FMDomain ;\n prov:att :DM .\n ]\n ] .\n"
+ ":ManagementType rdf:type owl:Class .\n"
+ ":DM rdf:type owl:NamedIndividual , prov:Person .\n"
+ ":FMDomain rdf:type owl:NamedIndividual , prov:Activity ; prov:ass :DM .";
OWLOntology ontology = loadOntologyFromString(input);
OWLOntology o = roundTrip(ontology, new TurtleDocumentFormat());
Set<OWLSubClassOfAxiom> axioms = o.getAxioms(AxiomType.SUBCLASS_OF);
assertEquals(1, axioms.size());
OWLAnnotation next = axioms.iterator().next().getAnnotations()
.iterator().next();
assertTrue(next.getValue() instanceof OWLAnonymousIndividual);
OWLAnonymousIndividual ind = (OWLAnonymousIndividual) next.getValue();
Set<OWLAxiom> anns = new HashSet<>();
for (OWLAxiom ax : o.getAxioms()) {
if (ax.getAnonymousIndividuals().contains(ind)) {
anns.add(ax);
}
}
assertEquals(3, anns.size());