Package org.obolibrary.robot
Interface Command
-
- All Known Implementing Classes:
AnnotateCommand,CollapseCommand,CommandManager,ConvertCommand,DiffCommand,ExpandCommand,ExplainCommand,ExportCommand,ExportPrefixesCommand,ExtractCommand,FilterCommand,MaterializeCommand,MeasureCommand,MergeCommand,MirrorCommand,PythonCommand,QueryCommand,ReasonCommand,ReduceCommand,RelaxCommand,RemoveCommand,RenameCommand,RepairCommand,ReportCommand,TemplateCommand,UnmergeCommand,ValidateProfileCommand,VerifyCommand
public interface CommandA simple interface for all ROBOT commands.- Author:
- James A. Overton
-
-
Field Summary
Fields Modifier and Type Field Description static Stringglobalstatic StringmissingFileError
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CommandStateexecute(CommandState inputState, String[] args)All commands offer an execute method that can be chained from previous commands.StringgetDescription()Brief description of the command.StringgetName()Name of the command.org.apache.commons.cli.OptionsgetOptions()Command-line options for the command.StringgetUsage()Command-line usage for the command.voidmain(String[] args)All commands can be call from the Java command line with an array of strings as arguments.
-
-
-
Field Detail
-
global
static final String global
- See Also:
- Constant Field Values
-
missingFileError
static final String missingFileError
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
String getName()
Name of the command.- Returns:
- name
-
getDescription
String getDescription()
Brief description of the command.- Returns:
- description
-
getUsage
String getUsage()
Command-line usage for the command.- Returns:
- usage
-
getOptions
org.apache.commons.cli.Options getOptions()
Command-line options for the command.- Returns:
- options
-
main
void main(String[] args)
All commands can be call from the Java command line with an array of strings as arguments.- Parameters:
args- strings to use as arguments
-
execute
CommandState execute(CommandState inputState, String[] args) throws Exception
All commands offer an execute method that can be chained from previous commands.- Parameters:
inputState- the input from the previous command, or nullargs- the command-line arguments- Returns:
- the updated state, or a new state, or null
- Throws:
Exception- on any problem
-
-