package owltools2;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Entry point for OWLTools2 command-line interface.
 *
 * @author <a href="mailto:james@overton.ca">James A. Overton</a>
 */
public class CommandLineInterface {
    /**
     * Logger.
     */
    private static final Logger logger =
        LoggerFactory.getLogger(CommandLineInterface.class);

    /**
     * Given command-line arguments, construct a new CommandManager
     * and execute it.
     *
     * @param args the command-line arguments
     */
    public static void main(String[] args) {
        CommandManager manager = new CommandManager();

        // Add more commands as needed
        manager.addCommand("extract", new ExtractCommand());

        manager.main(args);
    }
}

@@ -237,16 +237,164 @@
 rface %7B%0A
+    /**%0A     * A CommandManager loaded with the default set of commands.%0A     */%0A    private static CommandManager manager = new CommandManager();%0A%0A
     /**%0A
@@ -538,90 +538,298 @@
   * 
-Given command-line arguments, construct
+Construct a CommandManager with a set of default commands.%0A     */%0A    public CommandLineInterface() %7B%0A        // Add more commands
  a
+s
  ne
-w CommandManager%0A     * and execute it
+eded%0A        manager.addCommand(%22extract%22, new ExtractCommand());%0A    %7D%0A%0A    /**%0A     * Execute the given command-line arguments, catching any exceptions
 .%0A  
@@ -944,156 +944,282 @@
     
-CommandM
+m
 anager
- manager = new CommandManager();%0A
+.main(args);%0A    %7D%0A%0A    /**%0A     * Execute the given command-line arguments, throwing any exceptions.
 %0A     
+*%0A
    
-// Add more commands as needed%0A        manager.addCommand(%22extract%22, new ExtractCommand());%0A
+  * @param args the command-line arguments%0A     * @throws Exception on any problem%0A     */%0A    public static void execute(String%5B%5D args) throws Exception %7B
 %0A   
@@ -1223,36 +1223,45 @@
         manager.
-main(
+execute(null, 
 args);%0A    %7D%0A%7D%0A

Add execute() method to CommandLineInterface