Package org.obolibrary.robot
Class RemoveCommand
- java.lang.Object
-
- org.obolibrary.robot.RemoveCommand
-
- All Implemented Interfaces:
Command
public class RemoveCommand extends Object implements Command
Remove axioms from an ontology based on a series of inputs.- Author:
- Becky Tauber
-
-
Field Summary
-
Fields inherited from interface org.obolibrary.robot.Command
global, missingFileError
-
-
Constructor Summary
Constructors Constructor Description RemoveCommand()
Initialze the command.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CommandState
execute(CommandState state, String[] args)
Given an input state and command line arguments, create a new ontology with removed axioms and return a new state.String
getDescription()
Brief description of the command.String
getName()
Name of the command.protected static Set<org.semanticweb.owlapi.model.OWLObject>
getObjects(org.apache.commons.cli.CommandLine line, IOHelper ioHelper, org.semanticweb.owlapi.model.OWLOntology ontology, List<List<String>> selectGroups)
Given a command line, an IOHelper, an ontology, and a list of select groups, return the objects from the ontology based on the select groups.org.apache.commons.cli.Options
getOptions()
Command-line options for the command.String
getUsage()
Command-line usage for the command.void
main(String[] args)
Handle the command-line and file operations.
-
-
-
Method Detail
-
getName
public String getName()
Name of the command.
-
getDescription
public String getDescription()
Brief description of the command.- Specified by:
getDescription
in interfaceCommand
- Returns:
- description
-
getUsage
public String getUsage()
Command-line usage for the command.
-
getOptions
public org.apache.commons.cli.Options getOptions()
Command-line options for the command.- Specified by:
getOptions
in interfaceCommand
- Returns:
- options
-
main
public void main(String[] args)
Handle the command-line and file operations.
-
execute
public CommandState execute(CommandState state, String[] args) throws Exception
Given an input state and command line arguments, create a new ontology with removed axioms and return a new state. The input ontology is not changed.
-
getObjects
protected static Set<org.semanticweb.owlapi.model.OWLObject> getObjects(org.apache.commons.cli.CommandLine line, IOHelper ioHelper, org.semanticweb.owlapi.model.OWLOntology ontology, List<List<String>> selectGroups) throws Exception
Given a command line, an IOHelper, an ontology, and a list of select groups, return the objects from the ontology based on the select groups.- Parameters:
line
- CommandLine to get options fromioHelper
- IOHelper to get IRIsontology
- OWLOntology to get objects fromselectGroups
- List of select groups (lists of select options)- Returns:
- set of selected objects from the ontology
- Throws:
Exception
- on issue getting terms or processing selects
-
-