Package org.phyloref.jphyloref.commands
Class ResolveCommand
java.lang.Object
org.phyloref.jphyloref.commands.ResolveCommand
- All Implemented Interfaces:
Command
public class ResolveCommand extends java.lang.Object implements 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 Constructor Description ResolveCommand() -
Method Summary
Modifier and Type Method Description voidaddCommandLineOptions(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).java.lang.StringgetDescription()A description of the Resolve command.java.lang.StringgetName()This command is named "resolve".Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ResolveCommand
public ResolveCommand()
-
-
Method Details
-
getName
public java.lang.String getName()This command is named "resolve". It should be invoked as "java -jar jphyloref.jar resolve ..." -
getDescription
public java.lang.String 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
public int execute(org.apache.commons.cli.CommandLine cmdLine) throws java.lang.RuntimeExceptionSet up a webserver to listen on the provided hostname and port (or their defaults).
-