Package org.obolibrary.robot
Interface Command
-
- All Known Implementing Classes:
AnnotateCommand
,CollapseCommand
,CommandManager
,ConvertCommand
,DiffCommand
,ExplainCommand
,ExportCommand
,ExportPrefixesCommand
,ExtractCommand
,FilterCommand
,MaterializeCommand
,MeasureCommand
,MergeCommand
,MirrorCommand
,PythonCommand
,QueryCommand
,ReasonCommand
,ReduceCommand
,RelaxCommand
,RemoveCommand
,RenameCommand
,RepairCommand
,ReportCommand
,TemplateCommand
,UnmergeCommand
,ValidateProfileCommand
,VerifyCommand
public interface Command
A simple interface for all ROBOT commands.- Author:
- James A. Overton
-
-
Field Summary
Fields Modifier and Type Field Description static String
global
static String
missingFileError
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CommandState
execute(CommandState inputState, String[] args)
All commands offer an execute method that can be chained from previous commands.String
getDescription()
Brief description of the command.String
getName()
Name of the command.org.apache.commons.cli.Options
getOptions()
Command-line options for the command.String
getUsage()
Command-line usage for the command.void
main(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
-
-