Package hudson.util

Examples of hudson.util.ListBoxModel$Option


  public static void main(String[] args) throws IOException {
    DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
    ArgumentBuilder abuilder = new ArgumentBuilder();
    GroupBuilder gbuilder = new GroupBuilder();
   
    Option inputOpt = obuilder.withLongName("input").withRequired(true).withShortName("i").withArgument(
      abuilder.withName("input").withMinimum(1).withMaximum(1).create()).withDescription(
      "The Path for input data directory.").create();
   
    Option labelOpt = obuilder.withLongName("label").withRequired(true).withShortName("l").withArgument(
      abuilder.withName("index").withMinimum(1).withMaximum(1).create()).withDescription("label's index.")
        .create();
   
    Option thresholdOpt = obuilder.withLongName("threshold").withRequired(false).withShortName("t")
        .withArgument(abuilder.withName("threshold").withMinimum(1).withMaximum(1).create()).withDescription(
          "Condition activation threshold, default = 0.5.").create();
   
    Option crosspntsOpt = obuilder.withLongName("crosspnts").withRequired(false).withShortName("cp")
        .withArgument(abuilder.withName("points").withMinimum(1).withMaximum(1).create()).withDescription(
          "Number of crossover points to use, default = 1.").create();
   
    Option mutrateOpt = obuilder.withLongName("mutrate").withRequired(true).withShortName("m").withArgument(
      abuilder.withName("true").withMinimum(1).withMaximum(1).create()).withDescription(
      "Mutation rate (float).").create();
   
    Option mutrangeOpt = obuilder.withLongName("mutrange").withRequired(false).withShortName("mr")
        .withArgument(abuilder.withName("range").withMinimum(1).withMaximum(1).create()).withDescription(
          "Mutation range, default = 0.1 (10%).").create();
   
    Option mutprecOpt = obuilder.withLongName("mutprec").withRequired(false).withShortName("mp")
        .withArgument(abuilder.withName("precision").withMinimum(1).withMaximum(1).create()).withDescription(
          "Mutation precision, default = 2.").create();
   
    Option popsizeOpt = obuilder.withLongName("popsize").withRequired(true).withShortName("p").withArgument(
      abuilder.withName("size").withMinimum(1).withMaximum(1).create()).withDescription("Population size.")
        .create();
   
    Option gencntOpt = obuilder.withLongName("gencnt").withRequired(true).withShortName("g").withArgument(
      abuilder.withName("count").withMinimum(1).withMaximum(1).create())
        .withDescription("Generations count.").create();
   
    Option helpOpt = DefaultOptionCreator.helpOption();
   
    Group group = gbuilder.withName("Options").withOption(inputOpt).withOption(helpOpt).withOption(labelOpt)
        .withOption(thresholdOpt).withOption(crosspntsOpt).withOption(mutrateOpt).withOption(mutrangeOpt)
        .withOption(mutprecOpt).withOption(popsizeOpt).withOption(gencntOpt).create();
   
View Full Code Here


   
    DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
    ArgumentBuilder abuilder = new ArgumentBuilder();
    GroupBuilder gbuilder = new GroupBuilder();
   
    Option indexOpt = obuilder.withLongName("dir").withRequired(true).withArgument(
      abuilder.withName("dir").withMinimum(1).withMaximum(1).create()).withDescription(
      "The Lucene index directory").withShortName("d").create();
   
    Option outputOpt = obuilder.withLongName("output").withRequired(false).withArgument(
      abuilder.withName("output").withMinimum(1).withMaximum(1).create()).withDescription(
      "The output file. If not specified, the result is printed on console.").withShortName("o").create();
   
    Option fieldOpt = obuilder.withLongName("field").withRequired(true).withArgument(
      abuilder.withName("field").withMinimum(1).withMaximum(1).create()).withDescription(
      "The content field in the index").withShortName("f").create();
   
    Option idFieldOpt = obuilder.withLongName("idField").withRequired(false).withArgument(
      abuilder.withName("idField").withMinimum(1).withMaximum(1).create()).withDescription(
      "The field for the document ID in the index.  If null, then the Lucene internal doc "
          + "id is used which is prone to error if the underlying index changes").withShortName("i").create();
   
    Option seqOpt = obuilder.withLongName("seqFileDir").withRequired(true).withArgument(
      abuilder.withName("seqFileDir").withMinimum(1).withMaximum(1).create()).withDescription(
      "The directory containing Sequence Files for the Clusters").withShortName("s").create();
   
    Option pointsOpt = obuilder.withLongName("pointsDir").withRequired(true).withArgument(
      abuilder.withName("pointsDir").withMinimum(1).withMaximum(1).create()).withDescription(
      "The directory containing points sequence files mapping input vectors to their cluster.  ")
        .withShortName("p").create();
    Option minClusterSizeOpt = obuilder.withLongName("minClusterSize").withRequired(false).withArgument(
      abuilder.withName("minClusterSize").withMinimum(1).withMaximum(1).create()).withDescription(
      "The minimum number of points required in a cluster to print the labels for").withShortName("m")
        .create();
    Option maxLabelsOpt = obuilder.withLongName("maxLabels").withRequired(false).withArgument(
      abuilder.withName("maxLabels").withMinimum(1).withMaximum(1).create()).withDescription(
      "The maximum number of labels to print per cluster").withShortName("x").create();
    Option helpOpt = obuilder.withLongName("help").withDescription("Print out help").withShortName("h")
        .create();
   
    Group group = gbuilder.withName("Options").withOption(indexOpt).withOption(idFieldOpt).withOption(
      outputOpt).withOption(fieldOpt).withOption(seqOpt).withOption(pointsOpt).withOption(helpOpt)
        .withOption(maxLabelsOpt).withOption(minClusterSizeOpt).create();
View Full Code Here

  public static void main(String[] args) throws IOException {
    DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
    ArgumentBuilder abuilder = new ArgumentBuilder();
    GroupBuilder gbuilder = new GroupBuilder();
   
    Option dirInputPathOpt = obuilder.withLongName("input").withRequired(true).withArgument(
      abuilder.withName("input").withMinimum(1).withMaximum(1).create()).withDescription(
      "The input directory path").withShortName("i").create();
   
    Option dirOutputPathOpt = obuilder.withLongName("output").withRequired(true).withArgument(
      abuilder.withName("output").withMinimum(1).withMaximum(1).create()).withDescription(
      "The output directory Path").withShortName("o").create();
   
    Option categoriesOpt = obuilder.withLongName("categories").withRequired(true).withArgument(
      abuilder.withName("categories").withMinimum(1).withMaximum(1).create()).withDescription(
      "Location of the categories file.  One entry per line. "
          + "Will be used to make a string match in Wikipedia Category field").withShortName("c").create();
   
    Option exactMatchOpt = obuilder.withLongName("exactMatch").withDescription(
      "If set, then the category name must exactly match the "
          + "entry in the categories file. Default is false").withShortName("e").create();
    Option analyzerOpt = obuilder.withLongName("analyzer").withRequired(false).withArgument(
      abuilder.withName("analyzer").withMinimum(1).withMaximum(1).create()).withDescription(
      "The analyzer to use, must have a no argument constructor").withShortName("a").create();
    Option helpOpt = obuilder.withLongName("help").withDescription("Print out help").withShortName("h")
        .create();
   
    Group group = gbuilder.withName("Options").withOption(categoriesOpt).withOption(dirInputPathOpt)
        .withOption(dirOutputPathOpt).withOption(exactMatchOpt).withOption(analyzerOpt).withOption(helpOpt)
        .create();
View Full Code Here

  public static void main(String[] args) throws IOException {
    DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
    ArgumentBuilder abuilder = new ArgumentBuilder();
    GroupBuilder gbuilder = new GroupBuilder();
   
    Option inputOpt = obuilder
        .withLongName("input")
        .withRequired(true)
        .withArgument(abuilder.withName("input").withMinimum(1).withMaximum(1).create())
        .withDescription(
          "The file or directory containing the ARFF files.  If it is a directory, all .arff files will be converted")
        .withShortName("d").create();
   
    Option outputOpt = obuilder.withLongName("output").withRequired(true).withArgument(
      abuilder.withName("output").withMinimum(1).withMaximum(1).create()).withDescription(
      "The output directory.  Files will have the same name as the input, but with the extension .mvc")
        .withShortName("o").create();
   
    Option maxOpt = obuilder.withLongName("max").withRequired(false).withArgument(
      abuilder.withName("max").withMinimum(1).withMaximum(1).create()).withDescription(
      "The maximum number of vectors to output.  If not specified, then it will loop over all docs")
        .withShortName("m").create();
   
    Option dictOutOpt = obuilder.withLongName("dictOut").withRequired(true).withArgument(
      abuilder.withName("dictOut").withMinimum(1).withMaximum(1).create()).withDescription(
      "The file to output the label bindings").withShortName("t").create();
   
    Option delimiterOpt = obuilder.withLongName("delimiter").withRequired(false).withArgument(
      abuilder.withName("delimiter").withMinimum(1).withMaximum(1).create()).withDescription(
      "The delimiter for outputing the dictionary").withShortName("l").create();
   
    Option outWriterOpt = obuilder.withLongName("outputWriter").withRequired(false).withArgument(
      abuilder.withName("outputWriter").withMinimum(1).withMaximum(1).create()).withDescription(
      "The VectorWriter to use, either seq (SequenceFileVectorWriter - default) or"
          + "file (Writes to a File using JSON format)").withShortName("e").create();
   
    Option helpOpt = obuilder.withLongName("help").withDescription("Print out help").withShortName("h")
        .create();
    Group group = gbuilder.withName("Options").withOption(inputOpt).withOption(outputOpt).withOption(maxOpt)
        .withOption(helpOpt).withOption(dictOutOpt).withOption(outWriterOpt).withOption(delimiterOpt)
        .create();
    try {
View Full Code Here

  public static void main(String[] args) throws IOException {
    DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
    ArgumentBuilder abuilder = new ArgumentBuilder();
    GroupBuilder gbuilder = new GroupBuilder();
   
    Option dirInputPathOpt = obuilder.withLongName("input").withRequired(true).withArgument(
      abuilder.withName("input").withMinimum(1).withMaximum(1).create()).withDescription(
      "The input directory path").withShortName("i").create();
   
    Option dirOutputPathOpt = obuilder.withLongName("output").withRequired(true).withArgument(
      abuilder.withName("output").withMinimum(1).withMaximum(1).create()).withDescription(
      "The output directory Path").withShortName("o").create();
   
    Option categoriesOpt = obuilder.withLongName("categories").withArgument(
      abuilder.withName("categories").withMinimum(1).withMaximum(1).create()).withDescription(
      "Location of the categories file.  One entry per line. "
          + "Will be used to make a string match in Wikipedia Category field").withShortName("c").create();
   
    Option exactMatchOpt = obuilder.withLongName("exactMatch").withDescription(
      "If set, then the category name must exactly match the "
          + "entry in the categories file. Default is false").withShortName("e").create();
   
    Option allOpt = obuilder.withLongName("all")
        .withDescription("If set, Select all files. Default is false").withShortName("all").create();
   
    Option helpOpt = obuilder.withLongName("help").withDescription("Print out help").withShortName("h")
        .create();
   
    Group group = gbuilder.withName("Options").withOption(categoriesOpt).withOption(dirInputPathOpt)
        .withOption(dirOutputPathOpt).withOption(exactMatchOpt).withOption(allOpt).withOption(helpOpt)
        .create();
View Full Code Here

  public static void main(String[] args) throws IOException, IllegalAccessException, InstantiationException {
    DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
    ArgumentBuilder abuilder = new ArgumentBuilder();
    GroupBuilder gbuilder = new GroupBuilder();

    Option seqOpt = obuilder.withLongName("seqFileDir").withRequired(false).withArgument(
      abuilder.withName("seqFileDir").withMinimum(1).withMaximum(1).create()).withDescription(
      "The directory containing Sequence Files for the Clusters").withShortName("s").create();
    Option outputOpt = obuilder.withLongName("output").withRequired(false).withArgument(
      abuilder.withName("output").withMinimum(1).withMaximum(1).create()).withDescription(
      "The output file.  If not specified, dumps to the console").withShortName("o").create();
    Option substringOpt = obuilder.withLongName("substring").withRequired(false).withArgument(
      abuilder.withName("substring").withMinimum(1).withMaximum(1).create()).withDescription(
      "The number of chars of the asFormatString() to print").withShortName("b").create();
    Option numWordsOpt = obuilder.withLongName("numWords").withRequired(false).withArgument(
      abuilder.withName("numWords").withMinimum(1).withMaximum(1).create()).withDescription(
      "The number of top terms to print").withShortName("n").create();
    Option centroidJSonOpt = obuilder.withLongName("json").withRequired(false).withDescription(
      "Output the centroid as JSON.  Otherwise it substitues in the terms for vector cell entries")
        .withShortName("j").create();
    Option pointsOpt = obuilder.withLongName("pointsDir").withRequired(false).withArgument(
      abuilder.withName("pointsDir").withMinimum(1).withMaximum(1).create()).withDescription(
      "The directory containing points sequence files mapping input vectors to their cluster.  "
          + "If specified, then the program will output the points associated with a cluster").withShortName(
      "p").create();
    Option dictOpt = obuilder.withLongName("dictionary").withRequired(false).withArgument(
      abuilder.withName("dictionary").withMinimum(1).withMaximum(1).create()).withDescription(
      "The dictionary file. ").withShortName("d").create();
    Option dictTypeOpt = obuilder.withLongName("dictionaryType").withRequired(false).withArgument(
      abuilder.withName("dictionaryType").withMinimum(1).withMaximum(1).create()).withDescription(
      "The dictionary file type (text|sequencefile)").withShortName("dt").create();
    Option helpOpt = obuilder.withLongName("help").withDescription("Print out help").withShortName("h")
        .create();

    Group group = gbuilder.withName("Options").withOption(helpOpt).withOption(seqOpt).withOption(outputOpt)
        .withOption(substringOpt).withOption(pointsOpt).withOption(centroidJSonOpt).withOption(dictOpt)
        .withOption(dictTypeOpt).withOption(numWordsOpt).create();
View Full Code Here

public final class RecommenderJob extends AbstractJob {
 
  @Override
  public int run(String[] args) throws IOException {
   
    Option recommendClassOpt = AbstractJob.buildOption("recommenderClassName", "r",
      "Name of recommender class to instantiate");
    Option numReccomendationsOpt = AbstractJob.buildOption("numRecommendations", "n",
      "Number of recommendations per user", "10");
    Option usersFileOpt = AbstractJob.buildOption("usersFile", "n", "Number of recommendations per user",
      null);
   
    Map<String,String> parsedArgs = AbstractJob.parseArguments(args, recommendClassOpt,
      numReccomendationsOpt, usersFileOpt);
    if (parsedArgs == null) {
View Full Code Here

  public static void main(String[] args) throws Exception {
    DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
    ArgumentBuilder abuilder = new ArgumentBuilder();
    GroupBuilder gbuilder = new GroupBuilder();
   
    Option inputOpt = obuilder.withLongName("input").withRequired(true).withArgument(
      abuilder.withName("input").withMinimum(1).withMaximum(1).create()).withDescription(
      "Path to an LDA output (a state)").withShortName("i").create();
   
    Option dictOpt = obuilder.withLongName("dict").withRequired(true).withArgument(
      abuilder.withName("dict").withMinimum(1).withMaximum(1).create()).withDescription(
      "Dictionary to read in, in the same format as one created by "
          + "org.apache.mahout.utils.vectors.lucene.Driver").withShortName("d").create();
   
    Option outOpt = obuilder.withLongName("output").withRequired(false).withArgument(
      abuilder.withName("output").withMinimum(1).withMaximum(1).create()).withDescription(
      "Output directory to write top words").withShortName("o").create();
   
    Option wordOpt = obuilder.withLongName("words").withRequired(false).withArgument(
      abuilder.withName("words").withMinimum(0).withMaximum(1).withDefault("20").create()).withDescription(
      "Number of words to print").withShortName("w").create();
    Option dictTypeOpt = obuilder.withLongName("dictionaryType").withRequired(false).withArgument(
      abuilder.withName("dictionaryType").withMinimum(1).withMaximum(1).create()).withDescription(
      "The dictionary file type (text|sequencefile)").withShortName("dt").create();
    Option helpOpt = obuilder.withLongName("help").withDescription("Print out help").withShortName("h")
        .create();
   
    Group group = gbuilder.withName("Options").withOption(dictOpt).withOption(outOpt).withOption(wordOpt)
        .withOption(inputOpt).withOption(dictTypeOpt).create();
    try {
View Full Code Here

  public static void main(String[] args) throws Exception {
    DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
    ArgumentBuilder abuilder = new ArgumentBuilder();
    GroupBuilder gbuilder = new GroupBuilder();
   
    Option inputOpt = DefaultOptionCreator.inputOption().create();
    Option outputOpt = DefaultOptionCreator.outputOption().create();
    Option maxIterOpt = DefaultOptionCreator.maxIterOption().create();
    Option topicsOpt = DefaultOptionCreator.kOption().create();
    Option helpOpt = DefaultOptionCreator.helpOption();
   
    Option mOpt = obuilder.withLongName("alpha").withRequired(true).withShortName("m").withArgument(
      abuilder.withName("alpha").withMinimum(1).withMaximum(1).create()).withDescription(
      "The alpha0 value for the DirichletDistribution.").create();
   
    Option modelOpt = obuilder.withLongName("modelClass").withRequired(false).withShortName("d")
        .withArgument(abuilder.withName("modelClass").withMinimum(1).withMaximum(1).create())
        .withDescription(
          "The ModelDistribution class name."
              + "Defaults to org.apache.mahout.clustering.dirichlet.models.NormalModelDistribution").create();
   
    Option prototypeOpt = obuilder.withLongName("modelPrototypeClass").withRequired(false).withShortName("p")
        .withArgument(abuilder.withName("prototypeClass").withMinimum(1).withMaximum(1).create())
        .withDescription(
          "The ModelDistribution prototype Vector class name."
              + "Defaults to org.apache.mahout.math.RandomAccessSparseVector").create();
   
    Option sizeOpt = obuilder.withLongName("prototypeSize").withRequired(true).withShortName("s")
        .withArgument(abuilder.withName("prototypeSize").withMinimum(1).withMaximum(1).create())
        .withDescription("The ModelDistribution prototype Vector size.").create();
   
    Group group = gbuilder.withName("Options").withOption(inputOpt).withOption(outputOpt)
        .withOption(modelOpt).withOption(prototypeOpt).withOption(sizeOpt).withOption(maxIterOpt).withOption(
View Full Code Here

 
  public static void main(String[] args) throws Exception {
    DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
    ArgumentBuilder abuilder = new ArgumentBuilder();
    GroupBuilder gbuilder = new GroupBuilder();
    Option inputOpt = obuilder.withLongName("input").withRequired(true).withArgument(
      abuilder.withName("input").withMinimum(1).withMaximum(1).create()).withDescription(
      "The Path for input Vectors. Must be a SequenceFile of Writable, Vector").withShortName("i").create();
   
    Option clustersOpt = obuilder.withLongName("clusters").withRequired(true).withArgument(
      abuilder.withName("clusters").withMinimum(1).withMaximum(1).create()).withDescription(
      "The input centroids, as Vectors.  Must be a SequenceFile of Writable, Cluster/Canopy.  "
          + "If k is also specified, then a random set of vectors will be selected"
          + " and written out to this path first").withShortName("c").create();
   
    Option kOpt = obuilder.withLongName("k").withRequired(false).withArgument(
      abuilder.withName("k").withMinimum(1).withMaximum(1).create()).withDescription(
      "The k in k-Means.  If specified, then a random selection of k Vectors will be chosen"
          + " as the Centroid and written to the clusters output path.").withShortName("k").create();
   
    Option outputOpt = obuilder.withLongName("output").withRequired(true).withArgument(
      abuilder.withName("output").withMinimum(1).withMaximum(1).create()).withDescription(
      "The Path to put the output in").withShortName("o").create();
   
    Option measureClassOpt = obuilder.withLongName("distance").withRequired(false).withArgument(
      abuilder.withName("distance").withMinimum(1).withMaximum(1).create()).withDescription(
      "The Distance Measure to use.  Default is SquaredEuclidean").withShortName("dm").create();
   
    Option convergenceDeltaOpt = obuilder.withLongName("convergence").withRequired(false).withArgument(
      abuilder.withName("convergence").withMinimum(1).withMaximum(1).create()).withDescription(
      "The threshold below which the clusters are considered to be converged.  Default is 0.5")
        .withShortName("d").create();
   
    Option maxIterationsOpt = obuilder.withLongName("max").withRequired(false).withArgument(
      abuilder.withName("max").withMinimum(1).withMaximum(1).create()).withDescription(
      "The maximum number of iterations to perform.  Default is 20").withShortName("x").create();
   
    Option vectorClassOpt = obuilder.withLongName("vectorClass").withRequired(false).withArgument(
      abuilder.withName("vectorClass").withMinimum(1).withMaximum(1).create()).withDescription(
      "The Vector implementation class name.  Default is RandomAccessSparseVector.class").withShortName("v")
        .create();
   
    Option helpOpt = obuilder.withLongName("help").withDescription("Print out help").withShortName("h")
        .create();
   
    Option overwriteOutput = obuilder.withLongName("overwrite").withRequired(false).withDescription(
      "If set, overwrite the output directory").withShortName("w").create();
   
    Option clusteringOpt = obuilder.withLongName("clustering").withRequired(false).withDescription(
      "If true, run clustering only (assumes the iterations have already taken place").withShortName("l")
        .create();
   
    Option mOpt = obuilder.withLongName("m").withRequired(true).withArgument(
      abuilder.withName("m").withMinimum(1).withMaximum(1).create()).withDescription(
      "coefficient normalization factor, must be greater than 1").withShortName("m").create();
   
    Option numReduceTasksOpt = obuilder.withLongName("numReduce").withRequired(false).withArgument(
      abuilder.withName("numReduce").withMinimum(1).withMaximum(1).create()).withDescription(
      "The number of reduce tasks").withShortName("r").create();
   
    Option numMapTasksOpt = obuilder.withLongName("numMap").withRequired(false).withArgument(
      abuilder.withName("numMap").withMinimum(1).withMaximum(1).create()).withDescription(
      "The number of map tasks").withShortName("u").create();
   
    Group group = gbuilder.withName("Options").withOption(inputOpt).withOption(clustersOpt).withOption(
      outputOpt).withOption(measureClassOpt).withOption(convergenceDeltaOpt).withOption(maxIterationsOpt)
View Full Code Here

TOP

Related Classes of hudson.util.ListBoxModel$Option

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.