Package com.martiansoftware.jsap

Examples of com.martiansoftware.jsap.UnflaggedOption


        new Parameter[] {
          // Don't know what this was for...
          //new FlaggedOption( "uris", JSAP.STRING_PARSER, JSAP.NO_DEFAULT, JSAP.NOT_REQUIRED, 'u', "uris", "A file containing a list of URIs in ASCII encoding, one per line, that will be associated to each file" ),
          new Switch( "sentence", 's', "sentence", "Index sentences rather than documents." ),
          new Switch( "gzipped", 'z', "gzipped", "The files are gzipped." ),
          new UnflaggedOption( "collection", JSAP.STRING_PARSER, JSAP.REQUIRED, "The filename for the serialised collection." ),
          new UnflaggedOption( "file", JSAP.STRING_PARSER, JSAP.NO_DEFAULT, JSAP.NOT_REQUIRED, JSAP.GREEDY, "A list of files that will be indexed. If missing, a list of files will be read from standard input." )
        }
    );
   

    JSAPResult jsapResult = jsap.parse( arg );
View Full Code Here


          new FlaggedOption( "factory", MG4JClassParser.getParser(), IdentityDocumentFactory.class.getName(), JSAP.NOT_REQUIRED, 'f', "factory", "A document factory with a standard constructor." ),
          new FlaggedOption( "property", JSAP.STRING_PARSER, JSAP.NO_DEFAULT, JSAP.NOT_REQUIRED, 'p', "property", "A 'key=value' specification, or the name of a property file" ).setAllowMultipleDeclarations( true ),
          new FlaggedOption( "delimiter", JSAP.INTEGER_PARSER, Integer.toString( Scan.DEFAULT_DELIMITER ), JSAP.NOT_REQUIRED, 'd', "delimiter", "The document delimiter." ),
          new Switch( "approximated", 'a', "approximated", "If specified, non-words will not be copied." ),
          new FlaggedOption( "logInterval", JSAP.LONG_PARSER, Long.toString( ProgressLogger.DEFAULT_LOG_INTERVAL ), JSAP.NOT_REQUIRED, 'l', "log-interval", "The minimum time interval between activity logs in milliseconds." ),
          new UnflaggedOption( "basename", JSAP.STRING_PARSER, JSAP.REQUIRED, "The basename for the collection." ),
        }
    );
    JSAPResult jsapResult = jsap.parse( arg );
    if ( jsap.messagePrinted() ) return;
View Full Code Here

   
    sc = new ScigestConfiguration();
    JSAP jsap = new JSAP();

    CmdParser cmdParser = new CmdParser();
    UnflaggedOption command = new UnflaggedOption("command")
                      .setStringParser(cmdParser)
                      .setRequired(true);
   
    jsap.registerParameter(command);
   
    Switch local = new Switch("local")
                .setShortFlag('l')
                .setLongFlag("local");
   
    jsap.registerParameter(local);
   
    UnflaggedOption key = new UnflaggedOption("key")
                      .setStringParser(JSAP.STRING_PARSER)
                      .setRequired(false)
                      .setGreedy(false);
   
    jsap.registerParameter(key);

    UnflaggedOption val = new UnflaggedOption("value")
                      .setStringParser(JSAP.STRING_PARSER)
                      .setRequired(false)
                      .setGreedy(false);
   
    jsap.registerParameter(val);
View Full Code Here

  private BRJS brjs;
  private Logger logger;
 
  @Override
  protected void configureArgsParser(JSAP argsParser) throws JSAPException {
    argsParser.registerParameter(new UnflaggedOption(Parameters.APP_NAME).setRequired(true).setHelp("the application within which the new blade will be created"));
    argsParser.registerParameter(new UnflaggedOption(Parameters.BLADESET_NAME).setRequired(true).setHelp("the bladeset within which the new blade will be created"));
    argsParser.registerParameter(new UnflaggedOption(Parameters.BLADE_NAME).setRequired(true).setHelp("the name of the blade that will be created"));
  }
View Full Code Here

  private BRJS brjs;
  private Logger logger;
 
  @Override
  protected void configureArgsParser(JSAP argsParser) throws JSAPException {
    argsParser.registerParameter(new UnflaggedOption(TARGET_APP_NAME).setRequired(true).setHelp("the application the new library will be created within"));
    argsParser.registerParameter(new UnflaggedOption(NEW_LIBRARY_NAME).setRequired(true).setHelp("the name of the library that will be created"));
    argsParser.registerParameter(new FlaggedOption(LIBRARY_TYPE).setShortFlag('t').setLongFlag("type").setDefault( SupportedLibraryType.br.toString() ));
  }
View Full Code Here

    return "";
  }
 
  @Override
  protected void configureArgsParser(JSAP argsParser) throws JSAPException {   
    argsParser.registerParameter(new UnflaggedOption("arg1").setRequired(true).setHelp("help for arg1"));
    argsParser.registerParameter(new UnflaggedOption("arg2").setRequired(true).setHelp("help for arg2"));
    argsParser.registerParameter(new UnflaggedOption("arg3").setRequired(true).setHelp("help for arg3"));
    argsParser.registerParameter(new UnflaggedOption("arg4").setRequired(true).setHelp("help for arg4"));
    argsParser.registerParameter(new UnflaggedOption("arg5").setRequired(true).setHelp("help for arg5"));
  }
View Full Code Here

  private BRJS brjs;
  private Logger logger;
 
  @Override
  protected void configureArgsParser(JSAP argsParser) throws JSAPException {
    argsParser.registerParameter(new UnflaggedOption("new-app-name").setRequired(true).setHelp("the name of the application that will be created"));
    argsParser.registerParameter(new UnflaggedOption("require-prefix").setRequired(false).setHelp("the require prefix that all source code will be available within"));
  }
View Full Code Here

    return "Create a new application by importing a given zipped application.";
  }
 
  @Override
  protected void configureArgsParser(JSAP argsParser) throws JSAPException {
    argsParser.registerParameter(new UnflaggedOption("app-zip").setRequired(true).setHelp("the path to the zip containing the application"));
    argsParser.registerParameter(new UnflaggedOption("new-app-name").setRequired(true).setHelp("the name of the newly imported app"));
    argsParser.registerParameter(new UnflaggedOption("new-app-require-prefix").setRequired(true).setHelp("the require-prefix that the new app will have")); // TODO: switch to <new-app-require-path>
  }
View Full Code Here

    this.logger = brjs.logger(this.getClass());
  }
 
  @Override
  protected void configureArgsParser(JSAP argsParser) throws JSAPException {
    argsParser.registerParameter(new UnflaggedOption("source-app-name").setRequired(true).setHelp("the application from which the bladeset will be copied"));
    argsParser.registerParameter(new UnflaggedOption("source-bladeset-name").setRequired(true).setHelp("the name of the bladeset to be copied"));
    argsParser.registerParameter(new UnflaggedOption("target-app-name").setRequired(true).setHelp("the application to which the bladeset will be copied"));
    argsParser.registerParameter(new UnflaggedOption("target-bladeset-name").setRequired(false).setHelp("the name the bladeset will have within the target application"));
  }
View Full Code Here

  private App app;
  private Logger logger;
 
  @Override
  protected void configureArgsParser(JSAP argsParser) throws JSAPException {
    argsParser.registerParameter(new UnflaggedOption("app-folder-path").setRequired(true).setHelp("required path leading to the app in which themes should be created. If path specifies a themes folder then the CSS theme is created only within that folder."));
    argsParser.registerParameter(new UnflaggedOption("copy-from-theme-name").setRequired(true).setHelp("the name of the theme that will be copied"));
    argsParser.registerParameter(new UnflaggedOption("copy-to-theme-name").setRequired(true).setHelp("the name of the new theme into which the content will be copied"));
   
  }
View Full Code Here

TOP

Related Classes of com.martiansoftware.jsap.UnflaggedOption

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.