Example usage for org.apache.commons.cli Option setArgName

List of usage examples for org.apache.commons.cli Option setArgName

Introduction

In this page you can find the example usage for org.apache.commons.cli Option setArgName.

Prototype

public void setArgName(String argName) 

Source Link

Document

Sets the display name for the argument value.

Usage

From source file:org.jhub1.agent.run.cli.ParamsProcessorSample.java

public ParamsProcessorSample() {
    Option sample = new Option("s", "sample", false, "performs operations on samples");
    //sample.isRequired();
    //sample.setRequired(true);
    addToOptionsReg(sample);/*  ww w.j  a va 2s. c om*/

    Option udpReceiver = new Option("r", "udpreceiver", false, "udp samples receiver server");
    addToOptionsReg(udpReceiver);

    Option sampleProvider = new Option("p", "provide", true,
            "simulate providing sample of specified type: FILE or UDP");
    sampleProvider.setArgName("type");
    addToOptionsReg(sampleProvider);

    Option name = new Option("n", "name", true, "sample name");
    name.setArgName("name");
    addToOptionsReg(name);

    Option value = new Option("v", "value", true, "sample value");
    value.setArgName("value");
    addToOptionsReg(value);

    Option timestamp = new Option("t", "timestamp", true, "sample date as timestamp");
    timestamp.setArgName("timestamp");
    addToOptionsReg(timestamp);

    Option generate = new Option("g", "generate", true,
            "generate random 'number' of samples; -n -t -v ignored");
    generate.setArgName("number");
    addToOptionsReg(generate);
}

From source file:org.lexgrid.extension.loaders.icdgem.admin.LoadICDGEM.java

/**
 * Return supported command options.//from   w w w . j  a  va 2  s  . co m
 * 
 * @return org.apache.commons.cli.Options
 */
private Options getCommandOptions() {
    Options options = new Options();
    Option o;

    o = new Option("in", "in", true, "ICD GEM source file.");
    o.setArgName("in");
    o.setRequired(true);
    options.addOption(o);

    o = new Option("type", "type", true,
            "Type of ICD GEM input data; 'i10to9cm', 'i9to10cm', 'i10to9pcs', 'i9to10pcs' are supported values.");
    o.setArgName("type");
    o.setRequired(true);
    options.addOption(o);

    o = new Option("ver", "ver", true,
            "ICD GEM version. If not specified today's date/time will be used as a verison number.");
    o.setArgName("ver");
    o.setRequired(false);
    options.addOption(o);

    o = new Option("a", "activate", false, "ActivateScheme on successful load; if unspecified the "
            + "vocabulary is loaded but not activated.");
    o.setRequired(false);
    options.addOption(o);

    o = new Option("t", "tag", true, "An optional tag ID (e.g. 'PRODUCTION' or 'TEST') to assign.");
    o.setArgName("id");
    o.setRequired(false);
    options.addOption(o);

    return options;
}

From source file:org.LexGrid.LexBIG.admin.ActivateScheme.java

/**
 * Return supported command options./*from   www .  java2s  .com*/
 * 
 * @return org.apache.commons.cli.Options
 */
private Options getCommandOptions() {
    Options options = new Options();
    Option o;

    o = new Option("u", "urn", true, "URN uniquely identifying the code system.");
    o.setArgName("name");
    o.setRequired(false);
    options.addOption(o);

    o = new Option("v", "version", true, "Version identifier.");
    o.setArgName("id");
    o.setRequired(false);
    options.addOption(o);

    o = new Option("f", "force", false, "Force activation (no confirmation).");
    o.setRequired(false);
    options.addOption(o);

    return options;
}

From source file:org.LexGrid.LexBIG.admin.DeactivateScheme.java

/**
 * Return supported command options.//from w w w  .j av  a 2 s.co m
 * 
 * @return org.apache.commons.cli.Options
 */
private Options getCommandOptions() {
    Options options = new Options();
    Option o;

    o = new Option("u", "urn", true, "URN uniquely identifying the code system.");
    o.setArgName("name");
    o.setRequired(false);
    options.addOption(o);

    o = new Option("v", "version", true, "Version identifier.");
    o.setArgName("id");
    o.setRequired(false);
    options.addOption(o);

    o = new Option("d", "date", true,
            "Date and time for deactivation to take effect; immediate if not specified.");
    o.setArgName("yyyy-MM-dd,HH:mm:ss");
    o.setRequired(false);
    options.addOption(o);

    o = new Option("f", "force", false, "Force deactivation (no confirmation).");
    o.setRequired(false);
    options.addOption(o);

    return options;
}

From source file:org.LexGrid.LexBIG.admin.ExportLgXML.java

/**
 * Return supported command options.// ww  w  .  j  ava2 s . c om
 * 
 * @return org.apache.commons.cli.Options
 */
private Options getCommandOptions() {
    Options options = new Options();
    Option o;

    o = new Option("out", "output", true,
            "URI or path of the directory to contain the "
                    + "resulting XML file.  The file name will be automatically "
                    + "derived from the coding scheme name.");
    o.setArgName("uri");
    o.setRequired(true);
    options.addOption(o);

    o = new Option("u", "urn", true, "URN or local name of the coding scheme to export.");
    o.setArgName("name");
    o.setRequired(true);
    options.addOption(o);

    o = new Option("v", "version", true,
            "The assigned tag/label or absolute version identifier of the coding scheme.");
    o.setRequired(true);
    options.addOption(o);

    o = new Option("f", "force", false,
            "If specified, allows the destination file to be overwritten " + "if present.");
    o.setRequired(false);
    options.addOption(o);

    o = new Option("xall", "exportAll", false, "Type of export: export all content. Default behavior.");
    o.setRequired(false);
    options.addOption(o);

    o = new Option("xc", "exportConcepts", false, "Type of export: export only concepts.");
    o.setRequired(false);
    options.addOption(o);

    o = new Option("xa", "exportAssociations", false, "Type of export:  export only associations.");
    o.setRequired(false);
    options.addOption(o);

    o = new Option("an", "associationsName", true,
            "Export associations with this name. Only valid with export type \'xa\'");
    o.setRequired(false);
    options.addOption(o);

    return options;
}

From source file:org.LexGrid.LexBIG.admin.ExportOBO.java

/**
 * Return supported command options.//from  w  ww  . j a  v a 2  s  .co  m
 * 
 * @return org.apache.commons.cli.Options
 */
private Options getCommandOptions() {
    Options options = new Options();
    Option o;

    o = new Option("out", "output", true,
            "URI or path of the directory to contain the "
                    + "resulting OBO file.  The file name will be automatically "
                    + "derived from the coding scheme name.");
    o.setArgName("uri");
    o.setRequired(true);
    options.addOption(o);

    o = new Option("u", "urn", true, "URN or local name of the coding scheme to export.");
    o.setArgName("name");
    o.setRequired(false);
    options.addOption(o);

    o = new Option("v", "version", true,
            "The assigned tag/label or absolute version identifier of the coding scheme.");
    o.setRequired(false);
    options.addOption(o);

    o = new Option("f", "force", false,
            "If specified, allows the destination file to be overwritten " + "if present.");
    o.setRequired(false);
    options.addOption(o);

    return options;
}

From source file:org.LexGrid.LexBIG.admin.Load.java

/**
 * Return supported command options./* w  w  w .ja v  a  2s . c  o m*/
 * 
 * @return org.apache.commons.cli.Options
 */
private Options getCommandOptions() {
    Options options = new Options();
    Option o;

    o = new Option("l", "loader", true, "LexEVS Loader Extension to use.");
    o.setArgName("name");
    o.setRequired(true);
    options.addOption(o);

    o = new Option("in", "input", true, "URI or path specifying location of the source file.");
    o.setArgName("uri");
    o.setRequired(true);
    options.addOption(o);

    o = new Option("mf", "manifest", true, "URI or path specifying location of the manifest file.");
    o.setArgName("uri");
    o.setRequired(false);
    options.addOption(o);

    o = new Option("a", "activate", false, "ActivateScheme on successful load; if unspecified the "
            + "vocabulary is loaded but not activated.");
    o.setRequired(false);
    options.addOption(o);

    o = new Option("t", "tag", true, "An optional tag ID (e.g. 'PRODUCTION' or 'TEST') to assign.");
    o.setArgName("id");
    o.setRequired(false);
    options.addOption(o);

    return options;
}

From source file:org.LexGrid.LexBIG.admin.LoadHL7RIM.java

/**
 * Return supported command options.//from   w  w w.  j  a va2 s  .c o  m
 * 
 * @return org.apache.commons.cli.Options
 */
private Options getCommandOptions() {
    Options options = new Options();
    Option o;

    o = new Option("in", "input", true, "URI or path specifying location of the source file.");
    o.setArgName("uri");
    o.setRequired(true);
    options.addOption(o);

    o = new Option("mf", "manifest", true, "URI or path specifying location of the manifest file.");
    o.setArgName("uri");
    o.setRequired(false);
    options.addOption(o);

    o = new Option("lp", "loaderPrefs", true, "URI or path specifying location of the loader preference file.");
    o.setArgName("uri");
    o.setRequired(false);
    options.addOption(o);

    o = new Option("v", "validate", true, "Validation only; no load. If specified, 'a' and 't' "
            + "are ignored. 0 to verify the file conforms to the HL7RIM format.");
    o.setArgName("int");
    o.setRequired(false);
    options.addOption(o);

    o = new Option("d", "driver", true, "Name of the JDBC driver to use when accessing the database.");
    o.setArgName("drv");
    o.setRequired(false);

    o = new Option("a", "activate", false, "ActivateScheme on successful load; if unspecified the "
            + "vocabulary is loaded but not activated.");
    o.setRequired(false);
    options.addOption(o);

    o = new Option("t", "tag", true, "An optional tag ID (e.g. 'PRODUCTION' or 'TEST') to assign.");
    o.setArgName("id");
    o.setRequired(false);
    options.addOption(o);

    return options;
}

From source file:org.LexGrid.LexBIG.admin.LoadLgXML.java

/**
 * Return supported command options./*  w  w  w . j  ava2 s  . c  o m*/
 * 
 * @return org.apache.commons.cli.Options
 */
private Options getCommandOptions() {
    Options options = new Options();
    Option o;

    o = new Option("in", "input", true, "URI or path specifying location of the source file.");
    o.setArgName("uri");
    o.setRequired(true);
    options.addOption(o);

    o = new Option("v", "validate", true, "Validation only; no load. If specified, 'a' and 't' "
            + "are ignored. 0 to verify well-formed xml; 1 to check validity.");
    o.setArgName("int");
    o.setRequired(false);
    options.addOption(o);

    o = new Option("a", "activate", false, "ActivateScheme on successful load; if unspecified the "
            + "vocabulary is loaded but not activated.");
    o.setRequired(false);
    options.addOption(o);

    o = new Option("t", "tag", true, "An optional tag ID (e.g. 'PRODUCTION' or 'TEST') to assign.");
    o.setArgName("id");
    o.setRequired(false);
    options.addOption(o);

    o = new Option("mf", "manifest", true, "URI or path specifying location of the manifest file.");
    o.setArgName("uri");
    o.setRequired(false);
    options.addOption(o);

    return options;
}

From source file:org.LexGrid.LexBIG.admin.LoadManifest.java

/**
 * Return supported command options./*from ww  w  .j a  va2s . com*/
 * 
 * @return org.apache.commons.cli.Options
 */
private Options getCommandOptions() {
    Options options = new Options();
    Option o;

    o = new Option("u", "urn", true, "URN uniquely identifying the code system.");
    o.setArgName("name");
    o.setRequired(false);
    options.addOption(o);

    o = new Option("v", "version", true, "Version identifier.");
    o.setArgName("id");
    o.setRequired(false);
    options.addOption(o);

    o = new Option("mf", "manifest", true, "manifest file URI.");
    o.setArgName("file:///path/to/manifest.xml");
    o.setRequired(true);
    options.addOption(o);

    return options;
}