Package gnu.getopt

Examples of gnu.getopt.LongOpt


            resourceDir="./.viperfish";
        }
       
        String arg;
        LongOpt[] longopts = new LongOpt[3];
        longopts[0] = new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h');
        longopts[1] = new LongOpt("resourcedir", LongOpt.REQUIRED_ARGUMENT, null, 'r');
        longopts[2] = new LongOpt("configdir", LongOpt.REQUIRED_ARGUMENT, null, 'c');
        //
        Getopt g = new Getopt(programName, args, "-:hc:r:", longopts);
        //g.setOpterr(false); // We'll do our own error handling
        //
        int c;
View Full Code Here


    System.out.println( "  {-h,-help}    Print this information" );
  }

  public int parseArgs(String[] args) throws Exception {
    LongOpt[] longopts = new LongOpt[7];
    longopts[0] = new LongOpt( "help", LongOpt.NO_ARGUMENT, null, 'h' );
    longopts[1] = new LongOpt( "print-query", LongOpt.NO_ARGUMENT, null, 'q' );
    longopts[1] = new LongOpt( "print-results", LongOpt.NO_ARGUMENT, null, 'R' );
    longopts[3] = new LongOpt( "timing", LongOpt.NO_ARGUMENT, null, 't' );
    longopts[4] = new LongOpt( "classify", LongOpt.NO_ARGUMENT, null, 'c' );
    longopts[4] = new LongOpt( "realize", LongOpt.NO_ARGUMENT, null, 'r' );
    longopts[5] = new LongOpt( "estimate-all", LongOpt.NO_ARGUMENT, null, 'e' );
    longopts[6] = new LongOpt( "max-iteration", LongOpt.REQUIRED_ARGUMENT, null, 'm' );

    Getopt g = new Getopt( ProfileKB.class.toString(), args, "hqRtcrem:", longopts );

    try {
      int c;
View Full Code Here

  public List<String> parseArgs(String[] args) throws Exception {
    List<String> datasets = null;

    LongOpt[] longopts = new LongOpt[9];
    longopts[0] = new LongOpt( "help", LongOpt.NO_ARGUMENT, null, 'h' );
    longopts[1] = new LongOpt( "memory", LongOpt.REQUIRED_ARGUMENT, null, 'm' );
    longopts[2] = new LongOpt( "task", LongOpt.REQUIRED_ARGUMENT, null, 't' );
    longopts[3] = new LongOpt( "percentage", LongOpt.REQUIRED_ARGUMENT, null, 'p' );   
    longopts[4] = new LongOpt( "repeat", LongOpt.REQUIRED_ARGUMENT, null, 'r' );
    longopts[5] = new LongOpt( "ontology", LongOpt.REQUIRED_ARGUMENT, null, 'o' );
    longopts[6] = new LongOpt( "file", LongOpt.REQUIRED_ARGUMENT, null, 'f' );
    longopts[7] = new LongOpt( "loader", LongOpt.REQUIRED_ARGUMENT, null, 'l' );
    longopts[8] = new LongOpt( "imports", LongOpt.REQUIRED_ARGUMENT, null, 'i' );

    Getopt g = new Getopt( ProfileKB.class.toString(), args, "hm:t:p:r:o:f:l:i:", longopts );

    try {
      int c;
View Full Code Here

   private URL parseArguments(String[] args)
   {
      String shortOpts = "b:c:p:w:o:s:t:khqvle";
      LongOpt[] longOpts =
      {
         new LongOpt("binding", LongOpt.REQUIRED_ARGUMENT, null, 'b'),
         new LongOpt("catalog", LongOpt.REQUIRED_ARGUMENT, null, 'c'),
         new LongOpt("package", LongOpt.REQUIRED_ARGUMENT, null, 'p'),
         new LongOpt("wsdlLocation", LongOpt.REQUIRED_ARGUMENT, null, 'w'),
         new LongOpt("output", LongOpt.REQUIRED_ARGUMENT, null, 'o'),
         new LongOpt("source", LongOpt.REQUIRED_ARGUMENT, null, 's'),
         new LongOpt("target", LongOpt.REQUIRED_ARGUMENT, null, 't'),
         new LongOpt("keep", LongOpt.NO_ARGUMENT, null, 'k'),
         new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
         new LongOpt("quiet", LongOpt.NO_ARGUMENT, null, 'q'),
         new LongOpt("verbose", LongOpt.NO_ARGUMENT, null, 'v'),
         new LongOpt("extension", LongOpt.NO_ARGUMENT, null, 'e'),
         new LongOpt("load-consumer", LongOpt.NO_ARGUMENT, null, 'l'),
      };

      Getopt getopt = new Getopt(PROGRAM_NAME, args, shortOpts, longOpts);
      int c;
      while ((c = getopt.getopt()) != -1)
View Full Code Here

   private String parseArguments(String[] args)
   {
      String shortOpts = "hwko:r:s:c:qtle";
      LongOpt[] longOpts =
      {
         new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
         new LongOpt("wsdl", LongOpt.NO_ARGUMENT, null, 'w'),
         new LongOpt("keep", LongOpt.NO_ARGUMENT, null, 'k'),
         new LongOpt("output", LongOpt.REQUIRED_ARGUMENT, null, 'o'),
         new LongOpt("resource", LongOpt.REQUIRED_ARGUMENT, null, 'r'),
         new LongOpt("source", LongOpt.REQUIRED_ARGUMENT, null, 's'),
         new LongOpt("classpath", LongOpt.REQUIRED_ARGUMENT, null, 'c'),
         new LongOpt("quiet", LongOpt.NO_ARGUMENT, null, 'q'),
         new LongOpt("show-traces", LongOpt.NO_ARGUMENT, null, 't'),
         new LongOpt("load-provider", LongOpt.NO_ARGUMENT, null, 'l'),
         new LongOpt("extension", LongOpt.NO_ARGUMENT, null, 'e'),
      };
     
      Getopt getopt = new Getopt(PROGRAM_NAME, args, shortOpts, longOpts);
      int c;
      while ((c = getopt.getopt()) != -1)
View Full Code Here

   private URL parseArguments(String[] args)
   {
      String shortOpts = "b:c:p:w:o:s:t:khqvle";
      LongOpt[] longOpts =
      {
         new LongOpt("binding", LongOpt.REQUIRED_ARGUMENT, null, 'b'),
         new LongOpt("catalog", LongOpt.REQUIRED_ARGUMENT, null, 'c'),
         new LongOpt("package", LongOpt.REQUIRED_ARGUMENT, null, 'p'),
         new LongOpt("wsdlLocation", LongOpt.REQUIRED_ARGUMENT, null, 'w'),
         new LongOpt("output", LongOpt.REQUIRED_ARGUMENT, null, 'o'),
         new LongOpt("source", LongOpt.REQUIRED_ARGUMENT, null, 's'),
         new LongOpt("target", LongOpt.REQUIRED_ARGUMENT, null, 't'),
         new LongOpt("keep", LongOpt.NO_ARGUMENT, null, 'k'),
         new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
         new LongOpt("quiet", LongOpt.NO_ARGUMENT, null, 'q'),
         new LongOpt("verbose", LongOpt.NO_ARGUMENT, null, 'v'),
         new LongOpt("extension", LongOpt.NO_ARGUMENT, null, 'e'),
         new LongOpt("load-consumer", LongOpt.NO_ARGUMENT, null, 'l'),
      };

      Getopt getopt = new Getopt(PROGRAM_NAME, args, shortOpts, longOpts);
      int c;
      while ((c = getopt.getopt()) != -1)
View Full Code Here

   private String parseArguments(String[] args)
   {
      String shortOpts = "hwko:r:s:c:qtl";
      LongOpt[] longOpts =
      {
         new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
         new LongOpt("wsdl", LongOpt.NO_ARGUMENT, null, 'w'),
         new LongOpt("keep", LongOpt.NO_ARGUMENT, null, 'k'),
         new LongOpt("output", LongOpt.REQUIRED_ARGUMENT, null, 'o'),
         new LongOpt("resource", LongOpt.REQUIRED_ARGUMENT, null, 'r'),
         new LongOpt("source", LongOpt.REQUIRED_ARGUMENT, null, 's'),
         new LongOpt("classpath", LongOpt.REQUIRED_ARGUMENT, null, 'c'),
         new LongOpt("quiet", LongOpt.NO_ARGUMENT, null, 'q'),
         new LongOpt("show-traces", LongOpt.NO_ARGUMENT, null, 't'),
         new LongOpt("load-provider", LongOpt.NO_ARGUMENT, null, 'l'),
      };
     
      Getopt getopt = new Getopt(PROGRAM_NAME, args, shortOpts, longOpts);
      int c;
      while ((c = getopt.getopt()) != -1)
View Full Code Here

      }
     
      String sopts = "-:hD:s:n:a:u:p:Se:H:";
      LongOpt[] lopts =
      {
         new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
         new LongOpt("server", LongOpt.REQUIRED_ARGUMENT, null, 's'),
         new LongOpt("adapter", LongOpt.REQUIRED_ARGUMENT, null, 'a'),
         new LongOpt("serverName", LongOpt.REQUIRED_ARGUMENT, null, 'n'),
         new LongOpt("shutdown", LongOpt.NO_ARGUMENT, null, 'S'),
         new LongOpt("exit", LongOpt.REQUIRED_ARGUMENT, null, 'e'),
         new LongOpt("halt", LongOpt.REQUIRED_ARGUMENT, null, 'H'),
         new LongOpt("user", LongOpt.REQUIRED_ARGUMENT, null, 'u'),
         new LongOpt("password", LongOpt.REQUIRED_ARGUMENT, null, 'p'),
      };

      Getopt getopt = new Getopt(PROGRAM_NAME, args, sopts, lopts);
      int code;
      String arg;
View Full Code Here

   private URL parseArguments(String[] args)
   {
    String shortOpts = "b:c:p:w:o:s:t:khqvlne";
      LongOpt[] longOpts =
      {
         new LongOpt("binding", LongOpt.REQUIRED_ARGUMENT, null, 'b'),
         new LongOpt("catalog", LongOpt.REQUIRED_ARGUMENT, null, 'c'),
         new LongOpt("package", LongOpt.REQUIRED_ARGUMENT, null, 'p'),
         new LongOpt("wsdlLocation", LongOpt.REQUIRED_ARGUMENT, null, 'w'),
         new LongOpt("output", LongOpt.REQUIRED_ARGUMENT, null, 'o'),
         new LongOpt("source", LongOpt.REQUIRED_ARGUMENT, null, 's'),
         new LongOpt("target", LongOpt.REQUIRED_ARGUMENT, null, 't'),
         new LongOpt("keep", LongOpt.NO_ARGUMENT, null, 'k'),
         new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
         new LongOpt("quiet", LongOpt.NO_ARGUMENT, null, 'q'),
         new LongOpt("verbose", LongOpt.NO_ARGUMENT, null, 'v'),
         new LongOpt("nocompile", LongOpt.NO_ARGUMENT, null, 'n'),
         new LongOpt("extension", LongOpt.NO_ARGUMENT, null, 'e'),
         new LongOpt("load-consumer", LongOpt.NO_ARGUMENT, null, 'l'),
      };

      Getopt getopt = new Getopt(PROGRAM_NAME, args, shortOpts, longOpts);
      int c;
      while ((c = getopt.getopt()) != -1)
View Full Code Here

   private String parseArguments(String[] args)
   {
      String shortOpts = "hwko:r:s:c:qtle";
      LongOpt[] longOpts =
      {
         new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
         new LongOpt("wsdl", LongOpt.NO_ARGUMENT, null, 'w'),
         new LongOpt("keep", LongOpt.NO_ARGUMENT, null, 'k'),
         new LongOpt("output", LongOpt.REQUIRED_ARGUMENT, null, 'o'),
         new LongOpt("resource", LongOpt.REQUIRED_ARGUMENT, null, 'r'),
         new LongOpt("source", LongOpt.REQUIRED_ARGUMENT, null, 's'),
         new LongOpt("classpath", LongOpt.REQUIRED_ARGUMENT, null, 'c'),
         new LongOpt("quiet", LongOpt.NO_ARGUMENT, null, 'q'),
         new LongOpt("show-traces", LongOpt.NO_ARGUMENT, null, 't'),
         new LongOpt("load-provider", LongOpt.NO_ARGUMENT, null, 'l'),
         new LongOpt("extension", LongOpt.NO_ARGUMENT, null, 'e'),
      };
     
      Getopt getopt = new Getopt(PROGRAM_NAME, args, shortOpts, longOpts);
      int c;
      while ((c = getopt.getopt()) != -1)
View Full Code Here

TOP

Related Classes of gnu.getopt.LongOpt

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.