Package gnu.getopt

Examples of gnu.getopt.Getopt


    Vector features = new Vector();

    // Parse arguments
    String argString = "o:g";

    Getopt opt = new Getopt("MeapaeMComposer", args, argString);
    opt.setOpterr(false);
       
    int c = -1;
    while ((c =opt.getopt()) != -1)
    {
      switch(c)
      {
      case 'o':
        outFileName = opt.getOptarg();
        break;
      case 'g':
        debug = true;
        break;
      case '?':
        printUsageAndExit();
        break;
      default:
        System.out.print("getopt() returned " + c + "\n");
      }
    }
       
    // parse arguments
    int ind = opt.getOptind();
    if(ind > args.length)
      printUsageAndExit();
       
    featFile = new FeatFile(args[args.length-1]);
    outFile = new EDLFile(outFileName);
View Full Code Here


    // Parse arguments
    String argString = "o:c:f:g";
        parseCommands(args, argString);

    Getopt opt = new Getopt("BlipComposer", args, argString);
    opt.setOpterr(false);
       
    int c = -1;
    while ((c =opt.getopt()) != -1)
    {
      switch(c)
      {
      case 'o':
        outFileName = opt.getOptarg();
        break;
      case 'g':
        debug = true;
        break;
      case 'f':
        blipWav = opt.getOptarg();
        break;
            case 'c'// already handled above
                break;
      case '?':
        printUsageAndExit();
        break;
      default:
        System.out.print("getopt() returned " + c + "\n");
      }
    }
       
    // parse arguments
    int ind = opt.getOptind();
    if(ind > args.length)
      printUsageAndExit();
       
    featFile = new FeatFile(args[args.length-1]);
    outFile = new EDLFile(outFileName);
View Full Code Here

    String argString = "d:i:o:c:r:g";
    featdim = parseFeatDim(args, argString);
    dist = parseChunkDist(args, argString, featdim);
    parseCommands(args, argString);

    Getopt opt = new Getopt("SortComposer", args, argString);
    opt.setOpterr(false);

    int c = -1;
    while ((c = opt.getopt()) != -1)
    {
      switch (c)
      {
      case 'o':
        outFileName = opt.getOptarg();
        break;
      case 'r':
        reverseSort = true;
        break;
      case 'g':
        debug = true;
        break;
      case 'd': // already handled above
        break;
      case 'i': // already handled above
        break;
      case 'c': // already handled above
        break;
      case '?':
        printUsageAndExit();
        break;
      default:
        System.out.print("getopt() returned " + c + "\n");
      }
    }

    // parse arguments
    int ind = opt.getOptind();
    if (ind > args.length)
      printUsageAndExit();

    featFile = new FeatFile(args[args.length - 1]);
    outFile = new EDLFile(outFileName);
View Full Code Here

    Vector features = new Vector();

    // Parse arguments
    String argString = "b:n:l:o:g";

    Getopt opt = new Getopt("RotComposer", args, argString);
    opt.setOpterr(false);
       
    int c = -1;
    while ((c =opt.getopt()) != -1)
    {
      switch(c)
      {
      case 'b':
        beatsPerMeasure = new Integer(opt.getOptarg()).intValue();
        break;
      case 'n':
        numPositions = new Integer(opt.getOptarg()).intValue();
        break;
      case 'l':
        rotateRight = false;
        break;
      case 'o':
        outFileName = opt.getOptarg();
        break;
      case 'g':
        debug = true;
        break;
      case '?':
        printUsageAndExit();
        break;
      default:
        System.out.print("getopt() returned " + c + "\n");
      }
    }
       
    // parse arguments
    int ind = opt.getOptind();
    if(ind > args.length)
      printUsageAndExit();
       
    featFile = new FeatFile(args[args.length-1]);
    outFile = new EDLFile(outFileName);
View Full Code Here

    String argString = "o:c:q:i:gd:s:b:";
    featdim = parseFeatDim(args, argString);
    dist = parseChunkDist(args, argString, featdim);
    parseCommands(args, argString);

    Getopt opt = new Getopt("HMMComposer", args, argString);
    opt.setOpterr(false);

    int c = -1;
    while ((c = opt.getopt()) != -1)
    {
      switch (c)
      {
      case 'o':
        outFileName = opt.getOptarg();
        break;
      case 'g':
        debug = true;
        break;
      case 'q':
        cbSize = Integer.parseInt(opt.getOptarg());
        break;
      case 'b':
        beatsPerCodeword = Integer.parseInt(opt.getOptarg());
        break;
      case 's':
        sequenceLength = Integer.parseInt(opt.getOptarg());
        break;
      case 'c': // already handled above
        break;
      case 'd': // already handled above
        break;
      case 'i': // already handled above
        break;
      case '?':
        printUsageAndExit();
        break;
      default:
        System.out.print("getopt() returned " + c + "\n");
      }
    }

    // parse arguments
    int ind = opt.getOptind();
    if (ind > args.length)
      printUsageAndExit();

    trainFile = new FeatFile(args[args.length - 1]);
    outFile = new EDLFile(outFileName);
View Full Code Here

    Vector features = new Vector();

    // Parse arguments
    String argString = "o:t:b:e:g";

    Getopt opt = new Getopt("ThresholdComposer", args, argString);
    opt.setOpterr(false);
       
    int c = -1;
    while ((c =opt.getopt()) != -1)
    {
      switch(c)
      {
      case 'o':
        outFileName = opt.getOptarg();
        break;
      case 't':
        thresholdTop = new Double(opt.getOptarg()).doubleValue();
      case 'b':
        thresholdBottom = new Double(opt.getOptarg()).doubleValue();
      case 'e':
        insideThreshold = false;
      case 'g':
        debug = true;
        break;
      case '?':
        printUsageAndExit();
        break;
      default:
        System.out.print("getopt() returned " + c + "\n");
      }
    }
       
    // parse arguments
    int ind = opt.getOptind();
    if(ind > args.length)
      printUsageAndExit();
       
    featFile = new FeatFile(args[args.length-1]);
    outFile = new EDLFile(outFileName);
View Full Code Here

    // Vector features = new Vector();

    // Parse arguments
    String argString = "o:n:g";

    Getopt opt = new Getopt("IntraChunkShuffleComposer", args, argString);
    opt.setOpterr(false);

    int c = -1;
    while ((c = opt.getopt()) != -1)
    {
      switch (c)
      {
      case 'o':
        outFileName = opt.getOptarg();
        break;
      case 'n':
        numSubChunks = new Integer(opt.getOptarg()).intValue();
        if (numSubChunks <= 1)
          numSubChunks = 2;
      case 'g':
        debug = true;
        break;
      case '?':
        printUsageAndExit();
        break;
      default:
        System.out.print("getopt() returned " + c + "\n");
      }
    }

    // parse arguments
    int ind = opt.getOptind();
    if (ind > args.length)
      printUsageAndExit();

    featFile = new FeatFile(args[args.length - 1]);
    outFile = new EDLFile(outFileName);
View Full Code Here

    String argString = "d:i:o:c:";
    featdim = parseFeatDim(args, argString);
    dist = parseChunkDist(args, argString, featdim);
    parseCommands(args, argString);

    Getopt opt = new Getopt("MashupComposer", args, argString);
    opt.setOpterr(false);

    int c = -1;
    while ((c = opt.getopt()) != -1)
    {
      switch (c)
      {
      case 'o':
        outFileName = opt.getOptarg();
        break;
      case 'd': // already handled above
        break;
      case 'i': // already handled above
        break;
      case 'c': // already handled above
        break;
      case '?':
        printUsageAndExit();
        break;
      default:
        System.out.print("getopt() returned " + c + "\n");
      }
    }

    // parse arguments
    int ind = opt.getOptind();
    if (ind > args.length)
      printUsageAndExit();

    dstFile = new FeatFile(args[args.length - 2]);
    DBFile = new FeatFile(args[args.length - 1]);
View Full Code Here

        Vector features = new Vector();

        // Parse arguments
        String argString = "o:gb:l:";

        Getopt opt = new Getopt("HeadBangComposer", args, argString);
        opt.setOpterr(false);
       
        int c = -1;
        while ((c =opt.getopt()) != -1)
        {
            switch(c)
            {
            case 'o':
                outFileName = opt.getOptarg();
                break;
            case 'l':
        //System.out.println( opt.getOptarg());
                newPieceLength = Integer.valueOf( opt.getOptarg() ).intValue();
                break;
            case 'g':
                debug = true;
                break;
            case 'b':
        //System.out.println( opt.getOptarg());
        binsNum = Integer.valueOf( opt.getOptarg() ).intValue();
        break;
            case '?':
                printUsageAndExit();
                break;
            default:
                System.out.print("getopt() returned " + c + "\n");
            }
        }
       
        // parse arguments
        int ind = opt.getOptind();
        if(ind > args.length)
            printUsageAndExit();
       
        featFile = new FeatFile(args[args.length-1]);
        outFile = new EDLFile(outFileName);
View Full Code Here

   * special waveform commands
   */
  public void parseWaveformCommands(String[] args)
  {
    String argString = "b";
    Getopt opt = new Getopt("SingleFeatureWaveformPanel", args, argString);
    opt.setOpterr(false);
   
    int c = -1;
    while ((c = opt.getopt()) != -1)
    { 
      if (c == 'b')
        useBlack = true;
    }
  }
View Full Code Here

TOP

Related Classes of gnu.getopt.Getopt

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.