AxiomAnnotationTools { public static void reduceAxiomAnnotationsToOboBasic(OWLOntology ontology) { for(OWLAxiom axiom : ontology.getAxioms()) { AxiomAnnotationTools.reduceAxiomAnnotationsToOboBasic(axiom, ontology); } }  static boolean isMarkedAsInferredAxiom(OWLAxiom axiom); static OWLAxiom markAsInferredAxiom(OWLAxiom axiom, OWLOntology ontology); static OWLAxiom markAsInferredAxiom(OWLAxiom axiom, OWLDataFactory factory); static Set<OWLAxiom> markAsInferredAxiom(Set<OWLAxiom> axioms, OWLOntology ontology); static Set<OWLAxiom> markAsInferredAxiom(Set<OWLAxiom> axioms, OWLDataFactory factory); static OWLAxiom removeMarkAsInferredAxiom(OWLAxiom axiom, OWLOntology ontology); static List<String> getAxiomAnnotationValues(IRI iri, OWLAxiom axiom); static OWLAxiom appendAxiomAnnotations(OWLAxiom axiom, Set<OWLAnnotation> annotations, OWLOntology ontology); static OWLAxiom appendXrefAnnotations(OWLAxiom axiom, Set<String> xrefs, OWLOntology ontology); static OWLAxiom changeAxiomAnnotations(OWLAxiom axiom, Set<OWLAnnotation> annotations, OWLOntology ontology); static OWLAxiom changeAxiomAnnotations(OWLAxiom axiom, Set<OWLAnnotation> annotations, OWLDataFactory factory); static void reduceAxiomAnnotationsToOboBasic(OWLOntology ontology); static OWLAxiom reduceAxiomAnnotationsToOboBasic(OWLAxiom axiom, OWLOntology ontology); static final IRI ANNOTATION_IRI_IS_INFERRED; }
@Test public void testReduceAxiomAnnotationsToOboBasicOWLOntology() throws Exception { final File inputFile = getResource("qualifiers/with-qualifiers.obo"); final File referenceFile = getResource("qualifiers/no-qualifiers.obo"); OBOFormatParser p = new OBOFormatParser(); OBODoc inputOboDoc = p.parse(inputFile); Obo2Owl obo2Owl = new Obo2Owl(); OWLOntology owlOntology = obo2Owl.convert(inputOboDoc); Owl2Obo owl2Obo = new Owl2Obo(); equals(inputFile, owl2Obo.convert(owlOntology)); AxiomAnnotationTools.reduceAxiomAnnotationsToOboBasic(owlOntology); equals(referenceFile, owl2Obo.convert(owlOntology)); }