Package org.apache.commons.cli

Examples of org.apache.commons.cli.HelpFormatter


      .addOption("h", "help", false, "Display help");

    CommandLineParser parser = new GnuParser();
    CommandLine commandLine = parser.parse(options, args);
    if(commandLine.hasOption("help")) {
      new HelpFormatter().printHelp("java -jar fcintegritytool ",
        options, true);
      return false;
    }
    if(!commandLine.hasOption("dataDirs")) {
      new HelpFormatter().printHelp("java -jar fcintegritytool ", "",
        options, "dataDirs is required.", true);
      return false;
    } else {
      String dataDirStr[] = commandLine.getOptionValue("dataDirs").split(",");
      for(String dataDir : dataDirStr) {
View Full Code Here


                }
                GoodWordIterator.setWordSize(kmer);
            }*/
        } catch (Exception e) {
            System.out.println("Command Error: " + e.getMessage());
            new HelpFormatter().printHelp(120, "LeaveOneOutTesterMain", "", options, "", true);
            return;
        }


        LeaveOneOutTesterMain tester = new LeaveOneOutTesterMain(trainTaxonFile, trainSeqFile,
View Full Code Here

                    throw new IllegalArgumentException(min_bootstrap_words + " must be at least " + NBClassifier.MIN_BOOTSTRSP_WORDS);
                }               
            }
           
        } catch (ParseException ex) {
            new HelpFormatter().printHelp(120, "CrossValidateMain", "", options, "", true);
            return;
        }
       
        boolean useSeed = true// use seed for random number generator
View Full Code Here

      System.err.println("Error parsing command line: " + exp.getMessage());
      System.exit(-1);
    }

    if (!cmdline.hasOption(DATA_OPTION) || !cmdline.hasOption(OUTPUT_OPTION)) {
      HelpFormatter formatter = new HelpFormatter();
      formatter.printHelp(AsyncHTMLStatusBlockCrawler.class.getName(), options);
      System.exit(-1);
    }

    String data = cmdline.getOptionValue(DATA_OPTION);
    String output = cmdline.getOptionValue(OUTPUT_OPTION);
View Full Code Here

            trainseqFile = args[0];
            taxFile = args[1];
            outStream = new PrintStream(new File(args[2]));
         }catch (Exception e) {
            System.err.println("Command Error: " + e.getMessage());
            new HelpFormatter().printHelp(80, " [options] trainseqFile taxonFile outFile", "", options, "");
            return;
        }
                       
        PairwiseSeqDistance theObj = new PairwiseSeqDistance(trainseqFile,taxFile, mode, show_alignment);
       
View Full Code Here

        System.out.println("total size of files in "+dir+" containing "+name+": "+SizeWhere.totalSize(dir, name));
      } catch( ParseException exp ) {
          // oops, something went wrong
          System.err.println( "Parsing failed.  Reason: " + exp.getMessage() );
         
        HelpFormatter formatter = new HelpFormatter();
        formatter.printHelp( "sizewhere", options );
      }       
    }
View Full Code Here

            }
        } catch(ParseException exp) {
            // oops, something went wrong
            System.err.println("Parsing failed.  Reason: " + exp.getMessage());
             
            HelpFormatter formatter = new HelpFormatter();
            formatter.printHelp("find", options);
        }       
    }
View Full Code Here

        }
      } catch( ParseException exp ) {
          // oops, something went wrong
          System.err.println( "Parsing failed.  Reason: " + exp.getMessage() );
         
        HelpFormatter formatter = new HelpFormatter();
        formatter.printHelp( "list", options );
      }       
    }
View Full Code Here

        return this;
    }

    public void printHelp() {
        HelpFormatter formatter = new HelpFormatter();
        String appName = this.appName == null ? "App" : this.appName;
        formatter.printHelp(appName, this.rules);
    }
View Full Code Here

    return opt;
  }

  public static void printHelp(Options opts) {
    HelpFormatter formatter = new HelpFormatter();
    formatter.printHelp("Generate a record with random data given an Avro schema", opts);
  }
View Full Code Here

TOP

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

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.