Package org.apache.commons.cli

Examples of org.apache.commons.cli.PosixParser


        "The amount of time in secods to keep a thread alive when idle in " +
        ImplType.THREAD_POOL.simpleClassName());

    options.addOptionGroup(ImplType.createOptionGroup());

    CommandLineParser parser = new PosixParser();
    CommandLine cmd = parser.parse(options, args);

    // This is so complicated to please both bin/hbase and bin/hbase-daemon.
    // hbase-daemon provides "start" and "stop" arguments
    // hbase should print the help if no argument is provided
    List<String> commandLine = Arrays.asList(args);
View Full Code Here


      if (args.length == 0) {
        HelpFormatter formatter = new HelpFormatter();
        formatter.printHelp("HFile ", options, true);
        System.exit(-1);
      }
      CommandLineParser parser = new PosixParser();
      CommandLine cmd = parser.parse(options, args);
      boolean verbose = cmd.hasOption("v");
      boolean printKeyValue = cmd.hasOption("p");
      boolean printMeta = cmd.hasOption("m");
      boolean checkRow = cmd.hasOption("k");
      boolean checkFamily = cmd.hasOption("a");
View Full Code Here

        ClassificationResultFormatter.FORMAT format = CmdOptions.DEFAULT_FORMAT;
        float conf_cutoff = CmdOptions.DEFAULT_CONF;
        String gene = null;

        try {
            CommandLine line = new PosixParser().parse(options, args);

            if (line.hasOption(QUERYFILE1_SHORT_OPT)) {
                queryFile1 = line.getOptionValue(QUERYFILE1_SHORT_OPT);
            } else {
                throw new Exception("queryFile1 must be specified");
View Full Code Here

        return ret;
    }

    public static void main(String[] args) throws Exception {
        CommandLineParser parser = new PosixParser();
        CommandLine line = null;
        try {
             line = parser.parse(options, args);
        } catch(UnrecognizedOptionException e) {
            System.err.println(e.getMessage());
            printUsage();
            return;
        }
View Full Code Here

        String gene = null;
        ClassificationResultFormatter.FORMAT format = CmdOptions.DEFAULT_FORMAT;
        int min_bootstrap_words = Classifier.MIN_BOOTSTRSP_WORDS;

        try {
            CommandLine line = new PosixParser().parse(options, args);
           
            if (line.hasOption(CmdOptions.OUTFILE_SHORT_OPT)) {
                outputFile = line.getOptionValue(CmdOptions.OUTFILE_SHORT_OPT);
            } else {
                throw new Exception("outputFile must be specified");
View Full Code Here

        float conf = CmdOptions.DEFAULT_CONF;
        String gene = null;
        int min_bootstrap_words = Classifier.MIN_BOOTSTRSP_WORDS;
       
        try {
            CommandLine line = new PosixParser().parse(options, args);

            if (line.hasOption(CmdOptions.OUTFILE_SHORT_OPT)) {
                assign_out = new PrintWriter(line.getOptionValue(CmdOptions.OUTFILE_SHORT_OPT));
            } else {
                throw new IllegalArgumentException("Require the output file for classification assignment" );
View Full Code Here

        String version = null;
        String modification = null;
        String outdir = null;
       
        try {
            CommandLine line = new PosixParser().parse(options, args);

            if (line.hasOption("t")) {
                taxFile = line.getOptionValue("t");
            } else {
                throw new Exception("taxon file must be specified");
View Full Code Here

        int length = 0;
        int min_bootstrap_words = NBClassifier.MIN_BOOTSTRSP_WORDS;
        boolean hideTaxon = false;
        
        try {
            CommandLine line = new PosixParser().parse(options, args);

            if (line.hasOption(QUERYFILE_SHORT_OPT)) {
                queryFile = line.getOptionValue(QUERYFILE_SHORT_OPT);
            } else {
                throw new Exception("query file must be specified");
View Full Code Here

        Integer partialLength = null// default is full length
        float fraction = 0.1f;
        String rdmSelectedRank = null;
        int min_bootstrap_words = NBClassifier.MIN_BOOTSTRSP_WORDS;
        try {
            CommandLine line = new PosixParser().parse(options, args);
            if (line.hasOption(TRAIN_TAXONFILE_SHORT_OPT) ) {
              tax_file = line.getOptionValue(TRAIN_TAXONFILE_SHORT_OPT);
            } else {
                throw new ParseException("Taxonomy file must be specified");
            }
View Full Code Here

        PrintStream outStream = null;
        AlignmentMode mode = AlignmentMode.overlap;
        boolean show_alignment = false;
      
         try {
            CommandLine line = new PosixParser().parse(options, args);

            if (line.hasOption("show_alignment")) {
                show_alignment = true;
            }
            if (line.hasOption("alignment-mode")) {
View Full Code Here

TOP

Related Classes of org.apache.commons.cli.PosixParser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.