Package org.incenp.obofoundry.odk
Class ObsoleteReplaceCommand
java.lang.Object
org.incenp.obofoundry.odk.BasePlugin
org.incenp.obofoundry.odk.ObsoleteReplaceCommand
- All Implemented Interfaces:
org.obolibrary.robot.Command
A command to obsolete an entity and replace all its usages with a replacement
entity.
This command takes an entity to obsolete and a replacement entity. It will:
- Replace all usages of the obsolete entity with the replacement entity throughout the ontology
- Remove the label, comment, and definition from the obsolete entity
- Mark the obsolete entity as deprecated
- Add a new label prefixed with "obsolete" to the obsolete entity
- Add the original label of the obsolete entity as an exact synonym on the replacement entity (with a dbxref annotation pointing to the obsolete entity)
- Add a "term replaced by" annotation on the obsolete entity pointing to the replacement entity
-
Field Summary
Fields inherited from class org.incenp.obofoundry.odk.BasePlugin
ioHelper, optionsFields inherited from interface org.obolibrary.robot.Command
global, missingFileError -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidperformOperation(org.obolibrary.robot.CommandState state, org.apache.commons.cli.CommandLine line) Performs whatever operation the command is supposed to do.Methods inherited from class org.incenp.obofoundry.odk.BasePlugin
execute, getDescription, getIRI, getName, getOptions, getUsage, main
-
Constructor Details
-
ObsoleteReplaceCommand
public ObsoleteReplaceCommand()
-
-
Method Details
-
performOperation
public void performOperation(org.obolibrary.robot.CommandState state, org.apache.commons.cli.CommandLine line) throws Exception Description copied from class:BasePluginPerforms whatever operation the command is supposed to do.- Specified by:
performOperationin classBasePlugin- Parameters:
state- The internal state of ROBOT.line- The command line used to invoke the command.- Throws:
Exception- If any error occurs when attempting to execute the operation.
-