RepairOperation { public static void repair(OWLOntology ontology, IOHelper ioHelper) { repair(ontology, ioHelper, getDefaultOptions()); }  static Map<String, String> getDefaultOptions(); static void repair(OWLOntology ontology, IOHelper ioHelper); static void repair(
      OWLOntology ontology, IOHelper ioHelper, boolean mergeAxiomAnnotations); static void repair(
      OWLOntology ontology,
      IOHelper ioHelper,
      boolean mergeAxiomAnnotations,
      Set<OWLAnnotationProperty> migrateAnnotations); static void repair(OWLOntology ontology, IOHelper ioHelper, Map<String, String> options); static void repair(
      OWLOntology ontology,
      IOHelper ioHelper,
      Map<String, String> options,
      boolean mergeAxiomAnnotations); static void repair(
      OWLOntology ontology,
      IOHelper ioHelper,
      Map<String, String> options,
      boolean mergeAxiomAnnotations,
      Set<OWLAnnotationProperty> migrateAnnotations); static void mergeAxiomAnnotations(OWLOntology ontology); static void repairInvalidReferences(
      IOHelper iohelper, OWLOntology ontology, Set<InvalidReferenceViolation> violations); static void repairInvalidReferences(
      IOHelper iohelper,
      OWLOntology ontology,
      Set<InvalidReferenceViolation> violations,
      Set<OWLAnnotationProperty> migrateAnnotations);  }
@Test public void testRepair() throws IOException, OWLOntologyCreationException { OWLOntology ontology = loadOntology("/need-of-repair.owl"); IOHelper iohelper = new IOHelper(); RepairOperation.repair(ontology, iohelper, true); iohelper.saveOntology(ontology, "target/foo.owl"); assertIdentical("/repaired.owl", ontology); }
@Test public void testXrefRepair() throws IOException { OWLAnnotationProperty hasDbXref = OWLManager.getOWLDataFactory() .getOWLAnnotationProperty( IRI.create("http: OWLOntology ontology = loadOntology("/xref-need-of-repair.obo"); IOHelper iohelper = new IOHelper(); RepairOperation.repair(ontology, iohelper, true, Collections.singleton(hasDbXref)); assertIdentical("/xref-repaired.obo", ontology); }