Examples of CommandLineParser


Examples of org.apache.commons.cli.CommandLineParser

 
  public static void main(String[] args) throws Exception
  {
    DatasetTitles obj = new DatasetTitles();
   
    CommandLineParser parser = new BasicParser( );
    Options options = new Options( );
    options.addOption("h", "help", false, "Print this usage information.");
    options.addOption("i", "inputFilepath", true, "Local ToC file.");
    options.addOption("o", "outputFilePath", true, "Output directory path to generate the file.");
    options.addOption("f", "format", true, "RDF format for serialization (RDF/XML, TURTLE, N-TRIPLES).");

    CommandLine commandLine = parser.parse( options, args );
   
    if( commandLine.hasOption('h') ) {
        usage();
        return;
     }
View Full Code Here

Examples of org.apache.commons.cli.CommandLineParser

  }

  @SuppressWarnings("static-access")
  public static void parseArgs(String[] args) throws IOException
  {
    CommandLineParser cliParser = new GnuParser();


    Option outputDirOption = OptionBuilder.withLongOpt(OUTPUT_DIR_OPT_LONG_NAME)
        .withDescription("Help screen")
        .create(OUTPUT_DIR_OPT_CHAR);

    Options options = new Options();
    options.addOption(outputDirOption);


    CommandLine cmd = null;
    try
    {
      cmd = cliParser.parse(options, args);
    }
    catch (ParseException pe)
    {
      LOG.fatal("Bootstrap Avro Record Dumper: failed to parse command-line options.", pe);
      throw new RuntimeException("Bootstrap Avro Record Dumper: failed to parse command-line options.", pe);
View Full Code Here

Examples of org.apache.commons.cli.CommandLineParser

    System.out.println("  (optional)-f format  RDF format for serialization (RDF/XML, TURTLE, N-TRIPLES).");
  }
 
  public static void main(String[] args) throws Exception
  {
    CommandLineParser parser = new BasicParser( );
    Options options = new Options( );
    options.addOption("h", "help", false, "Print this usage information");
    options.addOption("i", "dictionaryPath", true, "Directory path where the dictionary files are stored.");
    options.addOption("o", "outputPath", true, "Output directory path where the RDF representation of dictionaries will be created.");
    options.addOption("c", "catalog Path", true, "Output directory path where the catalog file will be created.");
    options.addOption("f", "format", true, "RDF format for serialization (RDF/XML, TURTLE, N-TRIPLES).");
    CommandLine commandLine = parser.parse( options, args );

    if( commandLine.hasOption('h') ) {
        usage();
        return;
     }
View Full Code Here

Examples of org.apache.commons.cli.CommandLineParser

  }

  @SuppressWarnings("static-access")
  public static void parseArgs(String[] args) throws IOException
  {
    CommandLineParser cliParser = new GnuParser();


        Option helpOption = OptionBuilder.withLongOpt(HELP_OPT_LONG_NAME)
                                       .withDescription("Help screen")
                                       .create(HELP_OPT_CHAR);

      Option sourcesOption = OptionBuilder.withLongOpt(PHYSICAL_CONFIG_OPT_LONG_NAME)
                                     .withDescription("Bootstrap producer properties to use")
                                     .hasArg()
                                     .withArgName("property_file")
                                     .create(PHYSICAL_CONFIG_OPT_CHAR);

      Option dbOption = OptionBuilder.withLongOpt(BOOTSTRAP_DB_PROPS_OPT_LONG_NAME)
                      .withDescription("Bootstrap producer properties to use")
                      .hasArg()
                      .withArgName("property_file")
                      .create(BOOTSTRAP_DB_PROP_OPT_CHAR);

      Option log4jPropsOption = OptionBuilder.withLongOpt(LOG4J_PROPS_OPT_LONG_NAME)
                        .withDescription("Log4j properties to use")
                        .hasArg()
                        .withArgName("property_file")
                        .create(LOG4J_PROPS_OPT_CHAR);

      Options options = new Options();
      options.addOption(helpOption);
      options.addOption(sourcesOption);
      options.addOption(dbOption);
      options.addOption(log4jPropsOption);

      CommandLine cmd = null;
      try
      {
        cmd = cliParser.parse(options, args);
      }
      catch (ParseException pe)
      {
        LOG.fatal("Bootstrap Physical Config: failed to parse command-line options.", pe);
        throw new RuntimeException("Bootstrap Physical Config: failed to parse command-line options.", pe);
View Full Code Here

Examples of org.apache.commons.cli.CommandLineParser

  }

  @SuppressWarnings("static-access")
  public static void parseArgs(String[] args) throws IOException
  {
    CommandLineParser cliParser = new GnuParser();


        Option helpOption = OptionBuilder.withLongOpt(HELP_OPT_LONG_NAME)
                                       .withDescription("Help screen")
                                       .create(HELP_OPT_CHAR);

      Option sourcesOption = OptionBuilder.withLongOpt(PHYSICAL_CONFIG_OPT_LONG_NAME)
                                     .withDescription("Bootstrap producer properties to use")
                                     .hasArg()
                                     .withArgName("property_file")
                                     .create(PHYSICAL_CONFIG_OPT_CHAR);

      Option dbOption = OptionBuilder.withLongOpt(BOOTSTRAP_DB_PROPS_OPT_LONG_NAME)
                      .withDescription("Bootstrap producer properties to use")
                      .hasArg()
                      .withArgName("property_file")
                      .create(BOOTSTRAP_DB_PROP_OPT_CHAR);

      Option log4jPropsOption = OptionBuilder.withLongOpt(LOG4J_PROPS_OPT_LONG_NAME)
                        .withDescription("Log4j properties to use")
                        .hasArg()
                        .withArgName("property_file")
                        .create(LOG4J_PROPS_OPT_CHAR);

      Option validationType = OptionBuilder.withLongOpt(VALIDATION_TYPE_OPT_LONG_NAME)
                  .withDescription("Type of validation algorithm , normal[cmp two sorted streams of oracle and bootstrap db]  or point[entry in bootstrap checked in oracle]")
                  .hasArg()
                  .withArgName("validation_type")
                  .create(VALIDATION_TYPE_OPT_CHAR);

      Option validationSamplePct = OptionBuilder.withLongOpt(VALIDATION_SAMPLE_PCT_LONG_NAME)
          .withDescription("Validation sample pct ,0.0 to 100.00 [100.0]")
          .hasArg()
          .withArgName("validation_sample_pct")
          .create(VALIDATION_SAMPLE_PCT_CHAR);

      Options options = new Options();
      options.addOption(helpOption);
      options.addOption(sourcesOption);
      options.addOption(dbOption);
      options.addOption(log4jPropsOption);
      options.addOption(validationType);
      options.addOption(validationSamplePct);


      CommandLine cmd = null;
      try
      {
        cmd = cliParser.parse(options, args);
      }
      catch (ParseException pe)
      {
        LOG.fatal("Bootstrap Physical Config: failed to parse command-line options.", pe);
        throw new RuntimeException("Bootstrap Physical Config: failed to parse command-line options.", pe);
View Full Code Here

Examples of org.apache.commons.cli.CommandLineParser

  }
 
  public static void main(String[] args) throws Exception
  {
   
    CommandLineParser parser = new BasicParser( );
    Options options = new Options( );
    options.addOption("h", "help", false, "Print this usage information");
    options.addOption("p", "path", true, "Directory path for downloading the zip files.");
    options.addOption("t", "path", true, "Directory path for downloading the compressed tsv files.");
   
    CommandLine commandLine = parser.parse( options, args );

    if( commandLine.hasOption('h') ) {
        usage();
        return;
     }
View Full Code Here

Examples of org.apache.commons.cli.CommandLineParser

 
  public static void main(String[] args) throws Exception
  {
    String url = "";
   
    CommandLineParser parser = new BasicParser( );
    Options options = new Options( );
    options.addOption("h", "help", false, "Print this usage information");
    options.addOption("p", "path", true, "Directory path for downloading the compressed zip files.");
    options.addOption("u", "zip", true, "URL of the compressed file.");
    options.addOption("t", "tsv", true, "Directory path for downloading the compressed tsv files.");
   
    CommandLine commandLine = parser.parse( options, args );

    if( commandLine.hasOption('h') ) {
        usage();
        return;
     }
View Full Code Here

Examples of org.apache.commons.cli.CommandLineParser

    }

    public static void main(String[] args) throws Exception
    {

        CommandLineParser parser = new BasicParser( );
        Options options = new Options( );
        options.addOption("h", "help", false, "Print this usage information");
        options.addOption("i", "inputFilepath", true, "Local ToC file.");
        options.addOption("o", "outputFilepath", true, "Output directory path to generate the metadata files.");
        options.addOption("f", "format", true, "RDF format for serialization (RDF/XML, TURTLE, N-TRIPLES).");
        CommandLine commandLine = parser.parse( options, args );

        if( commandLine.hasOption('h') ) {
            usage();
            return;
         }
View Full Code Here

Examples of org.apache.commons.cli.CommandLineParser

 
  public static void main(String[] args) throws Exception
  {
    DSDParser obj = new DSDParser();
     
    CommandLineParser parser = new BasicParser( );
    Options options = new Options( );
    options.addOption("h", "help", false, "Print this usage information");
    options.addOption("i", "inputFilepath", true, "Data Structure Definition (DSD) in XML format as input.");
    options.addOption("o", "outputFilePath", true, "Output directory path to generate DataCube representation of DSD.");
    options.addOption("f", "format", true, "RDF format for serialization (RDF/XML, TURTLE, N-TRIPLES).");
    options.addOption("a", "sdmx ttl file", true, "Path where the sdmx ttl is located.");
    CommandLine commandLine = parser.parse( options, args );
   
    if( commandLine.hasOption('h') ) {
        usage();
        return;
     }
View Full Code Here

Examples of org.apache.commons.cli.CommandLineParser

 
  public static void main(String[] args) throws Exception
  {
    ParseToC obj = new ParseToC();
   
    CommandLineParser parser = new BasicParser( );
    Options options = new Options( );
    options.addOption("h", "help", false, "Print this usage information");
    options.addOption("n", "num", true, "No. of Dataset URLs to print. Default sets to 10.");

    CommandLine commandLine = parser.parse( options, args );
   
    if( commandLine.hasOption('h') ) {
        usage();
        return;
     }
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.