Package net.sourceforge.argparse4j.inf

Examples of net.sourceforge.argparse4j.inf.ArgumentParser.addArgument()


    }

    private static Namespace parseCommandLine(String[] args) throws ArgumentParserException {
        String usage = "java -jar " + new JarLocation(CalculatorUser.class);
        ArgumentParser argParser = ArgumentParsers.newArgumentParser(usage).defaultHelp(true);
        argParser.addArgument("config-file").nargs("?").help("yaml configuration file");
        return argParser.parseArgs(args);
    }

    private static CalculatorConfiguration loadConfigFile(String configFile)
            throws IOException, ConfigurationException {
View Full Code Here


    }

    private static Namespace parseCommandLine(String[] args) throws ArgumentParserException {
        String usage = "java -jar " + new JarLocation(CalculatorProxyUser.class);
        ArgumentParser argParser = ArgumentParsers.newArgumentParser(usage).defaultHelp(true);
        argParser.addArgument("config-file").nargs("?").help("yaml configuration file");
        return argParser.parseArgs(args);
    }

    private static CalculatorConfiguration loadConfigFile(String configFile)
            throws IOException, ConfigurationException {
View Full Code Here

    }

    private static Namespace parseCommandLine(String[] args) throws ArgumentParserException {
        String usage = "java -jar " + new JarLocation(DictionaryUser.class);
        ArgumentParser argParser = ArgumentParsers.newArgumentParser(usage).defaultHelp(true);
        argParser.addArgument("config-file").nargs("?").help("yaml configuration file");
        argParser.addArgument("word-file").nargs("+").help("one or more files containing words");
        return argParser.parseArgs(args);
    }

    private static DictionaryConfiguration loadConfigFile(String configFile)
View Full Code Here

    private static Namespace parseCommandLine(String[] args) throws ArgumentParserException {
        String usage = "java -jar " + new JarLocation(DictionaryUser.class);
        ArgumentParser argParser = ArgumentParsers.newArgumentParser(usage).defaultHelp(true);
        argParser.addArgument("config-file").nargs("?").help("yaml configuration file");
        argParser.addArgument("word-file").nargs("+").help("one or more files containing words");
        return argParser.parseArgs(args);
    }

    private static DictionaryConfiguration loadConfigFile(String configFile)
            throws IOException, ConfigurationException {
View Full Code Here

    }

    private static Namespace parseCommandLine(String[] args) throws ArgumentParserException {
        String usage = "java -jar " + new JarLocation(DictionaryUser.class);
        ArgumentParser argParser = ArgumentParsers.newArgumentParser(usage).defaultHelp(true);
        argParser.addArgument("config-file").nargs("?").help("yaml configuration file");
        argParser.addArgument("word-file").nargs("+").help("one or more files containing words");
        return argParser.parseArgs(args);
    }

    private static DictionaryConfiguration loadConfigFile(String configFile)
View Full Code Here

    private static Namespace parseCommandLine(String[] args) throws ArgumentParserException {
        String usage = "java -jar " + new JarLocation(DictionaryUser.class);
        ArgumentParser argParser = ArgumentParsers.newArgumentParser(usage).defaultHelp(true);
        argParser.addArgument("config-file").nargs("?").help("yaml configuration file");
        argParser.addArgument("word-file").nargs("+").help("one or more files containing words");
        return argParser.parseArgs(args);
    }

    private static DictionaryConfiguration loadConfigFile(String configFile)
            throws IOException, ConfigurationException {
View Full Code Here

                                    "Fault Tolerance: Mapper and reducer task attempts are retried on failure per the standard MapReduce semantics. " +
                                    "On program startup all data in the --output-dir is deleted if that output directory already exists. " +
                                    "If the whole job fails you can retry simply by rerunning the program again using the same arguments."
                    );

            parser.addArgument("--help", "-help", "-h")
                    .help("Show this help message and exit")
                    .action(new HelpArgumentAction() {
                        @Override
                        public void run(ArgumentParser parser, Argument arg, Map<String, Object> attrs, String flag, Object value)
                                throws ArgumentParserException {
View Full Code Here

                    }.verifyHasScheme().verifyIsAbsolute().verifyCanWriteParent())
                    .required(true)
                    .help("HDFS directory to write Solr indexes to. Inside there one output directory per shard will be generated. " +
                            "Example: hdfs://c2202.mycompany.com/user/$USER/test");

            Argument inputListArg = parser.addArgument("--input-list")
                    .action(Arguments.append())
                    .metavar("URI")
                            //      .type(new PathArgumentType(fs).verifyExists().verifyCanRead())
                    .type(Path.class)
                    .help("Local URI or HDFS URI of a UTF-8 encoded file containing a list of HDFS URIs to index, " +
View Full Code Here

                    .type(new FileArgumentType().verifyExists().verifyIsFile().verifyCanRead())
                    .required(true)
                    .help("Relative or absolute path to a local config file that contains one or more morphlines. " +
                            "The file must be UTF-8 encoded. Example: /path/to/morphline.conf");

            Argument morphlineIdArg = parser.addArgument("--morphline-id")
                    .metavar("STRING")
                    .type(String.class)
                    .help("The identifier of the morphline that shall be executed within the morphline config file " +
                            "specified by --morphline-file. If the --morphline-id option is ommitted the first (i.e. " +
                            "top-most) morphline within the config file is used. Example: morphline1");
View Full Code Here

                    .type(String.class)
                    .help("The identifier of the morphline that shall be executed within the morphline config file " +
                            "specified by --morphline-file. If the --morphline-id option is ommitted the first (i.e. " +
                            "top-most) morphline within the config file is used. Example: morphline1");

            Argument solrHomeDirArg = parser.addArgument("--solr-home-dir")
                    .metavar("DIR")
                    .type(new FileArgumentType() {
                        @Override
                        public File convert(ArgumentParser parser, Argument arg, String value) throws ArgumentParserException {
                            File solrHomeDir = super.convert(parser, arg, value);
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.