Class RenameOperation


  • public class RenameOperation
    extends Object
    Rename entity IRIs in an ontology.
    Author:
    Becky Tauber
    • Constructor Summary

      Constructors 
      Constructor Description
      RenameOperation()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void renameFull​(org.semanticweb.owlapi.model.OWLOntology ontology, IOHelper ioHelper, Map<String,​String> mappings)
      Given an ontology, an IOHelper, and a map of old IRIs to new IRIs, rename each old IRI with the new IRI.
      static void renameFull​(org.semanticweb.owlapi.model.OWLOntology ontology, IOHelper ioHelper, Map<String,​String> mappings, boolean allowMissingEntities)
      Given an ontology, an IOHelper, and a map of old IRIs to new IRIs, rename each old IRI with the new IRI.
      static void renameFull​(org.semanticweb.owlapi.model.OWLOntology ontology, IOHelper ioHelper, Map<String,​String> mappings, Map<org.semanticweb.owlapi.model.IRI,​String> labels, boolean allowMissingEntities)
      Given an ontology, an IOHelper, and a map of old IRIs to new IRIs, rename each old IRI with the new IRI.
      static void renamePrefixes​(org.semanticweb.owlapi.model.OWLOntology ontology, IOHelper ioHelper, Map<String,​String> mappings)
      Given an ontology, an IOHelper, and a map of old IRI bases to new IRI bases, rename each IRI with the 'old base' as a prefix, replacing it with the 'new base'.
    • Constructor Detail

      • RenameOperation

        public RenameOperation()
    • Method Detail

      • renameFull

        public static void renameFull​(org.semanticweb.owlapi.model.OWLOntology ontology,
                                      IOHelper ioHelper,
                                      Map<String,​String> mappings,
                                      boolean allowMissingEntities)
                               throws Exception
        Given an ontology, an IOHelper, and a map of old IRIs to new IRIs, rename each old IRI with the new IRI.
        Parameters:
        ontology - OWLOntology to rename entities in
        ioHelper - IOHelper to create IRIs
        mappings - map of old IRI to new IRI
        allowMissingEntities - if true, command will fail when an entity is in the rename map, but does not appear in ontology
        Throws:
        Exception - if the old IRI in a mapping does not exist
      • renameFull

        public static void renameFull​(org.semanticweb.owlapi.model.OWLOntology ontology,
                                      IOHelper ioHelper,
                                      Map<String,​String> mappings,
                                      Map<org.semanticweb.owlapi.model.IRI,​String> labels,
                                      boolean allowMissingEntities)
                               throws Exception
        Given an ontology, an IOHelper, and a map of old IRIs to new IRIs, rename each old IRI with the new IRI.
        Parameters:
        ontology - OWLOntology to rename entities in
        ioHelper - IOHelper to create IRIs
        mappings - map of old IRI to new IRI
        labels - map of new IRI to new label
        allowMissingEntities - if true, command will fail when an entity is in the rename map, but does not appear in ontology
        Throws:
        Exception - if the old IRI in a mapping does not exist
      • renameFull

        public static void renameFull​(org.semanticweb.owlapi.model.OWLOntology ontology,
                                      IOHelper ioHelper,
                                      Map<String,​String> mappings)
                               throws Exception
        Given an ontology, an IOHelper, and a map of old IRIs to new IRIs, rename each old IRI with the new IRI.
        Parameters:
        ontology - OWLOntology to rename entities in
        ioHelper - IOHelper to create IRIs
        mappings - map of old IRI to new IRI
        Throws:
        Exception - if the old IRI in a mapping does not exist
      • renamePrefixes

        public static void renamePrefixes​(org.semanticweb.owlapi.model.OWLOntology ontology,
                                          IOHelper ioHelper,
                                          Map<String,​String> mappings)
        Given an ontology, an IOHelper, and a map of old IRI bases to new IRI bases, rename each IRI with the 'old base' as a prefix, replacing it with the 'new base'.
        Parameters:
        ontology - OWLOntology to rename base prefixes in
        ioHelper - IOHelper to create IRIs
        mappings - map of old base to new base