private Set<OWLAnnotation> duplicateAxiomAnnotations(OWLAxiom axiom) { Set<OWLAnnotation> duplicatedAnnos = new HashSet<OWLAnnotation>(); for (OWLAnnotation anno : axiom.getAnnotations()) { anno.accept(this); duplicatedAnnos.add((OWLAnnotation) obj); } return duplicatedAnnos; }
public void visit(OWLOntology ontology) { checkOccurrence(ontology.getAnnotations()); for (AxiomType<?> t : AxiomType.AXIOM_TYPES) { for (OWLAxiom ax : ontology.getAxioms(t)) { checkOccurrence(ax.getAnnotations()); ax.accept(this); } } singleAppearance.clear(); }
// //////////////////////////////////////////////////////////////////////////////////////////// // // Axiom Visitor stuff // // //////////////////////////////////////////////////////////////////////////////////////////// protected void processAxiomAnnotations(OWLAxiom ax) { // default behavior: iterate over the annotations outside the axiom for (OWLAnnotation anno : ax.getAnnotations()) { anno.accept(this); } }