Package org.obolibrary.robot
Class RenameOperation
- java.lang.Object
-
- org.obolibrary.robot.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'.
-
-
-
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 inioHelper
- IOHelper to create IRIsmappings
- map of old IRI to new IRIallowMissingEntities
- 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 inioHelper
- IOHelper to create IRIsmappings
- map of old IRI to new IRIlabels
- map of new IRI to new labelallowMissingEntities
- 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 inioHelper
- IOHelper to create IRIsmappings
- 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 inioHelper
- IOHelper to create IRIsmappings
- map of old base to new base
-
-