Package org.phyloref.jphyloref.commands
Class ResolveCommand
java.lang.Object
org.phyloref.jphyloref.commands.ResolveCommand
- All Implemented Interfaces:
Command
Resolve an ontology of phyloreferences provided on the command line, and report on the resolution
of each clade definition. The resulting report or an appropriate error message will be provided
in JSON, and the exit code will be set to non-zero if an error occurred.
This code was extracted from WebserverCommand so its functionality can be used from the command line, which is while for now it returns its results in the JSON format. We might eventually want to switch over to YAML or another more command line friendly format.
- Author:
- Gaurav Vaidya
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCommandLineOptions(org.apache.commons.cli.Options opts)Add command-line options specific to this command.intexecute(org.apache.commons.cli.CommandLine cmdLine)Set up a webserver to listen on the provided hostname and port (or their defaults).A description of the Resolve command.getName()This command is named "resolve".
-
Constructor Details
-
ResolveCommand
public ResolveCommand()
-
-
Method Details
-
getName
This command is named "resolve". It should be invoked as "java -jar jphyloref.jar resolve ..." -
getDescription
A description of the Resolve command.- Specified by:
getDescriptionin interfaceCommand- Returns:
- A description of this command.
-
addCommandLineOptions
public void addCommandLineOptions(org.apache.commons.cli.Options opts)Add command-line options specific to this command.- Specified by:
addCommandLineOptionsin interfaceCommand- Parameters:
opts- The command-line options to modify for this command.
-
execute
Set up a webserver to listen on the provided hostname and port (or their defaults).- Specified by:
executein interfaceCommand- Parameters:
cmdLine- The command line options provided to this command.- Throws:
RuntimeException
-