Examples of addOption()


Examples of org.apache.commons.cli.CommandLineParser.addOption()

    CommandLineParser cli = new CommandLineParser();
    if (args.length == 0) {
      cli.printUsage();
      return 1;
    }
    cli.addOption("input", false, "input path to the maps", "path");
    cli.addOption("output", false, "output path from the reduces", "path");
   
    cli.addOption("jar", false, "job jar file", "path");
    cli.addOption("inputformat", false, "java classname of InputFormat",
                  "class");
View Full Code Here

Examples of org.apache.commons.cli.OptionGroup.addOption()

    options.addOption(helpOption);
    options.addOption(versionOption);

    OptionGroup connectGroup = new OptionGroup();
    connectGroup.addOption(serverURLOption);
    connectGroup.addOption(dirOption);
    options.addOptionGroup(connectGroup);

    CommandLineParser argsParser = new PosixParser();
View Full Code Here

Examples of org.apache.commons.cli.Options.addOption()

  }
 
  protected Options getOptions()
  {
    Options options = new Options();
    options.addOption( new Option("f", "filename", true, "filename to write log to"));
    return options;
  }
 
  public void execute(String commandName, final ConsoleInput ci, CommandLine commandLine)
  {
View Full Code Here

Examples of org.apache.commons.cli.Options.addOption()

            .create('n'));
        options.addOption(
            OptionBuilder.hasArg(false)
            .withDescription("process files line by line and print result (see also -n)")
            .create('p'));
        options.addOption(
            OptionBuilder.withArgName("port")
            .hasOptionalArg()
            .withDescription("listen on a port and process inbound lines (default: 1960)")
            .create('l'));
        options.addOption(
View Full Code Here

Examples of org.apache.commons.cli.Options.addOption()

        options.addOption(
            OptionBuilder.withArgName("port")
            .hasOptionalArg()
            .withDescription("listen on a port and process inbound lines (default: 1960)")
            .create('l'));
        options.addOption(
            OptionBuilder.withArgName("splitPattern")
            .hasOptionalArg()
            .withDescription("split lines using splitPattern (default '\\s') using implicit 'split' variable")
            .withLongOpt("autosplit")
            .create('a'));
View Full Code Here

Examples of org.apache.commons.cli.Options.addOption()

  public static void main(String[] args)
  {
    Options options = new Options();

    options.addOption(new Option(LEXICON_OPT, LEXICON_OPT_LONG, true,
                                 "specify lexicon, which should be used"));

    options.addOption(new Option(GRAMMAR_OPT, GRAMMAR_OPT_LONG, true,
                                 "specify grammar, which should be used"));
View Full Code Here

Examples of org.apache.commons.cli.Options.addOption()

    Options options = new Options();

    options.addOption(new Option(LEXICON_OPT, LEXICON_OPT_LONG, true,
                                 "specify lexicon, which should be used"));

    options.addOption(new Option(GRAMMAR_OPT, GRAMMAR_OPT_LONG, true,
                                 "specify grammar, which should be used"));

    options.addOption(new Option(IN_OPT, IN_OPT_LONG, true, "Input file"));

    options.addOption(new Option(OUT_OPT, OUT_OPT_LONG, true, "Output file"));
View Full Code Here

Examples of org.apache.commons.cli.Options.addOption()

                                 "specify lexicon, which should be used"));

    options.addOption(new Option(GRAMMAR_OPT, GRAMMAR_OPT_LONG, true,
                                 "specify grammar, which should be used"));

    options.addOption(new Option(IN_OPT, IN_OPT_LONG, true, "Input file"));

    options.addOption(new Option(OUT_OPT, OUT_OPT_LONG, true, "Output file"));

    CommandLine line = null;
    try
View Full Code Here

Examples of org.apache.isis.core.runtime.userprofile.Options.addOption()

    }

    @Test
    public void recursiveOptions() throws Exception {
        final Options options = new Options();
        options.addOption("option2", "value2");
        profile.getOptions().addOptions("option1", options);
        assertLine("    <options id=\"option1\">", 2);
        assertLine("      <option id=\"option2\">value2</option>", 3);
        assertLine("    </options>", 4);
    }
View Full Code Here

Examples of org.apache.sqoop.cli.RelatedOptions.addOption()

  private RelatedOptions getExtraOptions() {
    // Connection args (common)
    RelatedOptions extraOptions =
      new RelatedOptions("PostgreSQL extra options:");

    extraOptions.addOption(OptionBuilder.withArgName("string").hasArg()
      .withDescription("Optional schema name")
      .withLongOpt(SCHEMA).create());

    return extraOptions;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.