Class RepairOperation


  • public class RepairOperation
    extends Object
    Repair an ontology
    • Constructor Detail

      • RepairOperation

        public RepairOperation()
    • Method Detail

      • getDefaultOptions

        public static Map<String,​String> getDefaultOptions()
        Return a map from option name to default option value, for all the available repair options.
        Returns:
        a map with default values for all available options
      • repair

        public static void repair​(org.semanticweb.owlapi.model.OWLOntology ontology,
                                  IOHelper ioHelper)
        Repairs ontology
        Parameters:
        ontology - the OWLOntology to repair
        ioHelper - IOHelper to work with the ontology
      • repair

        public static void repair​(org.semanticweb.owlapi.model.OWLOntology ontology,
                                  IOHelper ioHelper,
                                  boolean mergeAxiomAnnotations)
        Repairs ontology
        Parameters:
        ontology - the OWLOntology to repair
        ioHelper - IOHelper to work with the ontology
        mergeAxiomAnnotations - if true, merge annotations on duplicate axioms
      • repair

        public static void repair​(org.semanticweb.owlapi.model.OWLOntology ontology,
                                  IOHelper ioHelper,
                                  boolean mergeAxiomAnnotations,
                                  Set<org.semanticweb.owlapi.model.OWLAnnotationProperty> migrateAnnotations)
        Repairs ontology
        Parameters:
        ontology - the OWLOntology to repair
        ioHelper - IOHelper to work with the ontology
        mergeAxiomAnnotations - if true, merge annotations on duplicate axioms
        migrateAnnotations - set of annotation properties for which to migrate values
      • repair

        public static void repair​(org.semanticweb.owlapi.model.OWLOntology ontology,
                                  IOHelper ioHelper,
                                  Map<String,​String> options)
        Repairs ontology
        Parameters:
        ontology - the OWLOntology to repair
        ioHelper - IOHelper to work with the ontology
        options - map of repair options
      • repair

        public static void repair​(org.semanticweb.owlapi.model.OWLOntology ontology,
                                  IOHelper ioHelper,
                                  Map<String,​String> options,
                                  boolean mergeAxiomAnnotations)
        Repairs ontology
        Parameters:
        ontology - the OWLOntology to repair
        ioHelper - IOHelper to work with the ontology
        options - map of repair options
        mergeAxiomAnnotations - if true, merge annotations on duplicate axioms
      • repair

        public static void repair​(org.semanticweb.owlapi.model.OWLOntology ontology,
                                  IOHelper ioHelper,
                                  Map<String,​String> options,
                                  boolean mergeAxiomAnnotations,
                                  Set<org.semanticweb.owlapi.model.OWLAnnotationProperty> migrateAnnotations)
        Repairs ontology
        Parameters:
        ontology - the OWLOntology to repair
        ioHelper - IOHelper to work with the ontology
        options - map of repair options
        mergeAxiomAnnotations - if true, merge annotations on duplicate axioms
        migrateAnnotations - set of annotation properties for which to migrate values
      • mergeAxiomAnnotations

        public static void mergeAxiomAnnotations​(org.semanticweb.owlapi.model.OWLOntology ontology)
        Given an ontology, merge the annotations of duplicate axioms to create one axiom with all annotations.
        Parameters:
        ontology - the OWLOntology to repair
      • repairInvalidReferences

        public static void repairInvalidReferences​(IOHelper iohelper,
                                                   org.semanticweb.owlapi.model.OWLOntology ontology,
                                                   Set<InvalidReferenceViolation> violations)
        Repairs invalid references

        Currently only able to repair references to deprecated classes.

        Assumes OBO vocabulary

        Parameters:
        iohelper - IOHelper to work with the ontology
        ontology - the OWLOntology to repair
        violations - set of references violations
      • repairInvalidReferences

        public static void repairInvalidReferences​(IOHelper iohelper,
                                                   org.semanticweb.owlapi.model.OWLOntology ontology,
                                                   Set<InvalidReferenceViolation> violations,
                                                   Set<org.semanticweb.owlapi.model.OWLAnnotationProperty> migrateAnnotations)
        Repairs invalid references

        Currently only able to repair references to deprecated classes.

        Assumes OBO vocabulary

        Parameters:
        iohelper - IOHelper to work with the ontology
        ontology - the OWLOntology to repair
        violations - set of references violations
        migrateAnnotations - set of annotation properties for which to migrate values