Example usage for org.apache.commons.cli OptionBuilder hasArg

List of usage examples for org.apache.commons.cli OptionBuilder hasArg

Introduction

In this page you can find the example usage for org.apache.commons.cli OptionBuilder hasArg.

Prototype

public static OptionBuilder hasArg() 

Source Link

Document

The next Option created will require an argument value.

Usage

From source file:org.psystems.dicomweb.Dcm2DcmCopy.java

private static CommandLine parse(String[] args) {
    Options opts = new Options();

    opts.addOption(null, "no-fmi", false, "Encode result without File Meta Information. At default, "
            + " File Meta Information is included.");
    opts.addOption("e", "explicit", false, "Encode result with Explicit VR Little Endian Transfer Syntax. "
            + "At default, Implicit VR Little Endian is used.");
    opts.addOption("b", "big-endian", false, "Encode result with Explicit VR Big Endian Transfer Syntax. "
            + "At default, Implicit VR Little Endian is used.");
    opts.addOption("z", "deflated", false, "Encode result with Deflated Explicit VR Little Endian Syntax. "
            + "At default, Implicit VR Little Endian is used.");

    OptionBuilder.withArgName("[seq/]attr=value");
    OptionBuilder.hasArgs(2);//from   w ww.  java 2 s. c  o  m
    OptionBuilder.withValueSeparator('=');
    OptionBuilder.withDescription(
            "specify value to set in the output stream.  Currently only works when transcoding images.");
    opts.addOption(OptionBuilder.create("s"));

    opts.addOption("t", "syntax", true,
            "Encode result with the specified transfer syntax - recodes" + " the image typically.");

    OptionBuilder.withArgName("KB");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("transcoder buffer size in KB, 1KB by default");
    OptionBuilder.withLongOpt("buffer");
    opts.addOption(OptionBuilder.create(null));

    opts.addOption("h", "help", false, "print this message");
    opts.addOption("V", "version", false, "print the version information and exit");
    CommandLine cl = null;
    try {
        cl = new PosixParser().parse(opts, args);
    } catch (ParseException e) {
        exit("dcm2dcm: " + e.getMessage());
        throw new RuntimeException("unreachable");
    }
    if (cl.hasOption('V')) {
        Package p = Dcm2DcmCopy.class.getPackage();
        System.out.println("dcm2dcm v" + p.getImplementationVersion());
        System.exit(0);
    }
    if (cl.hasOption('h') || cl.getArgList().size() < 2) {
        HelpFormatter formatter = new HelpFormatter();
        formatter.printHelp(USAGE, DESCRIPTION, opts, EXAMPLE);
        System.exit(0);
    }
    return cl;
}

From source file:org.psystems.dicomweb.Dcm2DcmOld.java

private static CommandLine parse(String[] args) {
    Options opts = new Options();

    opts.addOption(null, "no-fmi", false, "Encode result without File Meta Information. At default, "
            + " File Meta Information is included.");
    opts.addOption("e", "explicit", false, "Encode result with Explicit VR Little Endian Transfer Syntax. "
            + "At default, Implicit VR Little Endian is used.");
    opts.addOption("b", "big-endian", false, "Encode result with Explicit VR Big Endian Transfer Syntax. "
            + "At default, Implicit VR Little Endian is used.");
    opts.addOption("z", "deflated", false, "Encode result with Deflated Explicit VR Little Endian Syntax. "
            + "At default, Implicit VR Little Endian is used.");

    OptionBuilder.withArgName("[seq/]attr=value");
    OptionBuilder.hasArgs(2);/*from  w  ww.  jav  a 2s .c om*/
    OptionBuilder.withValueSeparator('=');
    OptionBuilder.withDescription(
            "specify value to set in the output stream.  Currently only works when transcoding images.");
    opts.addOption(OptionBuilder.create("s"));

    opts.addOption("t", "syntax", true,
            "Encode result with the specified transfer syntax - recodes" + " the image typically.");

    OptionBuilder.withArgName("KB");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("transcoder buffer size in KB, 1KB by default");
    OptionBuilder.withLongOpt("buffer");
    opts.addOption(OptionBuilder.create(null));

    opts.addOption("h", "help", false, "print this message");
    opts.addOption("V", "version", false, "print the version information and exit");
    CommandLine cl = null;
    try {
        cl = new PosixParser().parse(opts, args);
    } catch (ParseException e) {
        exit("dcm2dcm: " + e.getMessage());
        throw new RuntimeException("unreachable");
    }
    if (cl.hasOption('V')) {
        Package p = Dcm2DcmOld.class.getPackage();
        System.out.println("dcm2dcm v" + p.getImplementationVersion());
        System.exit(0);
    }
    if (cl.hasOption('h') || cl.getArgList().size() < 2) {
        HelpFormatter formatter = new HelpFormatter();
        formatter.printHelp(USAGE, DESCRIPTION, opts, EXAMPLE);
        System.exit(0);
    }
    return cl;
}

From source file:org.psystems.dicomweb.DcmRcv.java

private static CommandLine parse(String[] args) {
    Options opts = new Options();

    OptionBuilder.withArgName("name");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("set device name, use DCMRCV by default");
    opts.addOption(OptionBuilder.create("device"));

    OptionBuilder.withArgName("NULL|3DES|AES");
    OptionBuilder.hasArg();//from ww w . j a va  2s  .  c  o  m
    OptionBuilder.withDescription("enable TLS connection without, 3DES or AES encryption");
    opts.addOption(OptionBuilder.create("tls"));

    OptionGroup tlsProtocol = new OptionGroup();
    tlsProtocol.addOption(new Option("tls1", "disable the use of SSLv3 and SSLv2 for TLS connections"));
    tlsProtocol.addOption(new Option("ssl3", "disable the use of TLSv1 and SSLv2 for TLS connections"));
    tlsProtocol.addOption(new Option("no_tls1", "disable the use of TLSv1 for TLS connections"));
    tlsProtocol.addOption(new Option("no_ssl3", "disable the use of SSLv3 for TLS connections"));
    tlsProtocol.addOption(new Option("no_ssl2", "disable the use of SSLv2 for TLS connections"));
    opts.addOptionGroup(tlsProtocol);

    opts.addOption("noclientauth", false, "disable client authentification for TLS");

    OptionBuilder.withArgName("file|url");
    OptionBuilder.hasArg();
    OptionBuilder
            .withDescription("file path or URL of P12 or JKS keystore, resource:tls/test_sys_2.p12 by default");
    opts.addOption(OptionBuilder.create("keystore"));

    OptionBuilder.withArgName("password");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("password for keystore file, 'secret' by default");
    opts.addOption(OptionBuilder.create("keystorepw"));

    OptionBuilder.withArgName("password");
    OptionBuilder.hasArg();
    OptionBuilder
            .withDescription("password for accessing the key in the keystore, keystore password by default");
    opts.addOption(OptionBuilder.create("keypw"));

    OptionBuilder.withArgName("file|url");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("file path or URL of JKS truststore, resource:tls/mesa_certs.jks by default");
    opts.addOption(OptionBuilder.create("truststore"));

    OptionBuilder.withArgName("password");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("password for truststore file, 'secret' by default");
    opts.addOption(OptionBuilder.create("truststorepw"));

    OptionBuilder.withArgName("dir");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("store received objects into files in specified directory <dir>."
            + " Do not store received objects by default.");
    opts.addOption(OptionBuilder.create("dest"));

    OptionBuilder.withArgName("file|url");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("file path or URL of properties for mapping Calling AETs to "
            + "sub-directories of the storage directory specified by "
            + "-dest, to separate the storage location dependend on " + "Calling AETs.");
    opts.addOption(OptionBuilder.create("calling2dir"));

    OptionBuilder.withArgName("file|url");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("file path or URL of properties for mapping Called AETs to "
            + "sub-directories of the storage directory specified by "
            + "-dest, to separate the storage location dependend on " + "Called AETs.");
    opts.addOption(OptionBuilder.create("called2dir"));

    OptionBuilder.withArgName("sub-dir");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("storage sub-directory used for Calling AETs for which no "
            + " mapping is defined by properties specified by " + "-calling2dir, 'OTHER' by default.");
    opts.addOption(OptionBuilder.create("callingdefdir"));

    OptionBuilder.withArgName("sub-dir");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("storage sub-directory used for Called AETs for which no "
            + " mapping is defined by properties specified by " + "-called2dir, 'OTHER' by default.");
    opts.addOption(OptionBuilder.create("calleddefdir"));

    OptionBuilder.withArgName("dir");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("register stored objects in cache journal files in specified directory <dir>."
            + " Do not register stored objects by default.");
    opts.addOption(OptionBuilder.create("journal"));

    OptionBuilder.withArgName("pattern");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("cache journal file path, with "
            + "'yyyy' will be replaced by the current year, "
            + "'MM' by the current month, 'dd' by the current date, "
            + "'HH' by the current hour and 'mm' by the current minute. " + "'yyyy/MM/dd/HH/mm' by default.");
    opts.addOption(OptionBuilder.create("journalfilepath"));

    opts.addOption("defts", false, "accept only default transfer syntax.");
    opts.addOption("bigendian", false, "accept also Explict VR Big Endian transfer syntax.");
    opts.addOption("native", false, "accept only transfer syntax with uncompressed pixel data.");

    OptionBuilder.withArgName("maxops");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription(
            "maximum number of outstanding operations performed " + "asynchronously, unlimited by default.");
    opts.addOption(OptionBuilder.create("async"));

    opts.addOption("pdv1", false, "send only one PDV in one P-Data-TF PDU, "
            + "pack command and data PDV in one P-DATA-TF PDU by default.");
    opts.addOption("tcpdelay", false, "set TCP_NODELAY socket option to false, true by default");

    OptionBuilder.withArgName("ms");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("delay in ms for Socket close after sending A-ABORT, 50ms by default");
    opts.addOption(OptionBuilder.create("soclosedelay"));

    OptionBuilder.withArgName("ms");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("delay in ms for DIMSE-RSP; useful for testing asynchronous mode");
    opts.addOption(OptionBuilder.create("rspdelay"));

    OptionBuilder.withArgName("ms");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("timeout in ms for receiving -ASSOCIATE-RQ, 5s by default");
    opts.addOption(OptionBuilder.create("requestTO"));

    OptionBuilder.withArgName("ms");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("timeout in ms for receiving A-RELEASE-RP, 5s by default");
    opts.addOption(OptionBuilder.create("releaseTO"));

    OptionBuilder.withArgName("ms");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("period in ms to check for outstanding DIMSE-RSP, 10s by default");
    opts.addOption(OptionBuilder.create("reaper"));

    OptionBuilder.withArgName("ms");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("timeout in ms for receiving DIMSE-RQ, 60s by default");
    opts.addOption(OptionBuilder.create("idleTO"));

    OptionBuilder.withArgName("KB");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("maximal length in KB of received P-DATA-TF PDUs, 16KB by default");
    opts.addOption(OptionBuilder.create("rcvpdulen"));

    OptionBuilder.withArgName("KB");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("maximal length in KB of sent P-DATA-TF PDUs, 16KB by default");
    opts.addOption(OptionBuilder.create("sndpdulen"));

    OptionBuilder.withArgName("KB");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("set SO_RCVBUF socket option to specified value in KB");
    opts.addOption(OptionBuilder.create("sorcvbuf"));

    OptionBuilder.withArgName("KB");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("set SO_SNDBUF socket option to specified value in KB");
    opts.addOption(OptionBuilder.create("sosndbuf"));

    OptionBuilder.withArgName("KB");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("minimal buffer size to write received object to file, 1KB by default");
    opts.addOption(OptionBuilder.create("bufsize"));

    opts.addOption("h", "help", false, "print this message");
    opts.addOption("V", "version", false, "print the version information and exit");
    CommandLine cl = null;
    try {
        cl = new GnuParser().parse(opts, args);
    } catch (ParseException e) {
        exit("dcmrcv: " + e.getMessage());
        throw new RuntimeException("unreachable");
    }
    if (cl.hasOption("V")) {
        Package p = DcmRcv.class.getPackage();
        System.out.println("dcmrcv v" + p.getImplementationVersion());
        System.exit(0);
    }
    if (cl.hasOption("h") || cl.getArgList().size() == 0) {
        HelpFormatter formatter = new HelpFormatter();
        formatter.printHelp(USAGE, DESCRIPTION, opts, EXAMPLE);
        System.exit(0);
    }
    return cl;
}

From source file:org.rivalry.example.bestplace.BestPlaceDataCollectorMain.java

/**
 * @return application command line options.
 *///  w ww  .  java 2 s  .  c  o m
private static final Options createOptions() {
    final Options answer = new Options();

    final Option help = new Option("h", "print this message");

    OptionBuilder.withArgName("file");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("output file");

    final Option outputFile = OptionBuilder.create("f");

    answer.addOption(help);
    answer.addOption(outputFile);

    return answer;
}

From source file:org.rivalry.example.dogbreed.DogBreedReporterMain.java

/**
 * @return application command line options.
 *//*from   w  w w  . j  av  a2 s. c om*/
private static final Options createOptions() {
    final Options answer = new Options();

    final Option help = new Option("h", "print this message");

    OptionBuilder.withArgName("file");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("Dog breed data file");

    final Option inputFile = OptionBuilder.create("f");

    answer.addOption(help);
    answer.addOption(inputFile);

    return answer;
}

From source file:org.rivalry.example.illyriad.IllyriadDataCollectorMain.java

/**
 * @return application command line options.
 *//*from w w w .j  av a 2s. c  o m*/
private static final Options createOptions() {
    final Options answer = new Options();

    final Option help = new Option("h", "print this message");

    OptionBuilder.withArgName("username0");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("first Illyriad username");

    final Option username0 = OptionBuilder.create("u");

    OptionBuilder.withArgName("password0");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("first Illyriad password");

    final Option password0 = OptionBuilder.create("p");

    OptionBuilder.withArgName("username1");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("second Illyriad username");

    final Option username1 = OptionBuilder.create("U");

    OptionBuilder.withArgName("password1");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("second Illyriad password");

    final Option password1 = OptionBuilder.create("P");

    OptionBuilder.withArgName("file");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("output file");

    final Option outputFile = OptionBuilder.create("f");

    answer.addOption(help);
    answer.addOption(username0);
    answer.addOption(password0);
    answer.addOption(username1);
    answer.addOption(password1);
    answer.addOption(outputFile);

    return answer;
}

From source file:org.rivalry.example.skilldemand.SkillDemandReporterMain.java

/**
 * @return application command line options.
 *//*from w  w w . j  a va 2  s. c o m*/
private static final Options createOptions() {
    final Options answer = new Options();

    final Option help = new Option("h", "print this message");

    OptionBuilder.withArgName("file");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("Skill demand data file");

    final Option inputFile = OptionBuilder.create("f");

    // OptionBuilder.withArgName("directory");
    // OptionBuilder.hasArg();
    // OptionBuilder.withDescription("output directory");
    //
    // final Option directory = OptionBuilder.create("d");

    answer.addOption(help);
    answer.addOption(inputFile);
    // answer.addOption(directory);

    return answer;
}

From source file:org.signserver.client.cli.defaultimpl.TimeStampCommand.java

public TimeStampCommand() {
    // Create options
    final Option help = new Option("help", false, "Print this message.");
    final Option b64 = new Option("base64", false,
            "Give this option if the stored request/reply should be " + "base64 encoded, default is not.");
    final Option verifyopt = new Option("verify", false,
            "Give this option if verification of a stored reply should "
                    + "be done, work together with inrep and cafile. If given, no "
                    + "request to the TSA will happen.");
    final Option printopt = new Option("print", false, "Prints content of a request, response and/or token");

    OptionBuilder.hasArg();
    OptionBuilder.withDescription("Url of TSA, e.g. " + "http://127.0.0.1:8080/signserver/process?workerId=1.");
    OptionBuilder.withArgName("url");
    final Option url = OptionBuilder.create("url");

    OptionBuilder.hasArg();//  ww  w  .  jav a  2s .c o  m
    OptionBuilder.withArgName("file");
    OptionBuilder.withDescription(
            "Output file to store the recevied TSA " + "reply, if not given the reply is not stored.");
    final Option outrep = OptionBuilder.create("outrep");

    OptionBuilder.hasArg();
    OptionBuilder.withArgName("file");
    OptionBuilder.withDescription("Input file containing an earlier stored "
            + "base64 encoded response, to verify." + "You must specify the verify flag also.");
    final Option inrep = OptionBuilder.create("inrep");

    OptionBuilder.hasArg();
    OptionBuilder.withArgName("file");
    OptionBuilder.withDescription("Input file containing the PEM encoded " + "certificate of the TSA signer."
            + "Used to verify a stored response.");
    final Option cafileopt = OptionBuilder.create("signerfile");

    OptionBuilder.hasArg();
    OptionBuilder.withArgName("file");
    OptionBuilder.withDescription(
            "Output file to store the sent TSA " + "request, if not given the request is not stored.");
    final Option outreq = OptionBuilder.create("outreq");

    OptionBuilder.hasArg();
    OptionBuilder.withArgName("file");
    OptionBuilder.withDescription("File containing message to time stamp.");
    final Option infile = OptionBuilder.create("infile");

    OptionBuilder.hasArg();
    OptionBuilder.withArgName("string");
    OptionBuilder.withDescription("String to be time stamped, if neither "
            + "instr or infile is given, the client works in test-mode " + "generating it's own message.");
    final Option instr = OptionBuilder.create("instr");

    OptionBuilder.hasArg();
    OptionBuilder.withArgName("file");
    OptionBuilder.withDescription("Input file containing an earlier stored "
            + "request to use instead of creating a new. " + "You must specify the request flag also.");
    final Option inreq = OptionBuilder.create("inreq");

    OptionBuilder.hasArg();
    OptionBuilder.withArgName("num");
    OptionBuilder.withDescription("Sleep a number of milliseconds after " + "each request. Default 1000 ms.");
    final Option optionSleep = OptionBuilder.create("sleep");

    OptionBuilder.hasArg(false);
    OptionBuilder.withDescription("Request signer certificate");
    final Option certReqOption = OptionBuilder.create("certreq");

    OptionBuilder.hasArg();
    OptionBuilder.withArgName("oid");
    OptionBuilder.withDescription("Request timestamp issued under a policy OID");
    final Option reqPolicyOption = OptionBuilder.create("reqpolicy");

    // Add options
    options.addOption(help);
    options.addOption(verifyopt);
    options.addOption(printopt);
    options.addOption(url);
    options.addOption(outrep);
    options.addOption(inrep);
    options.addOption(cafileopt);
    options.addOption(outreq);
    options.addOption(b64);
    options.addOption(infile);
    options.addOption(instr);
    options.addOption(inreq);
    options.addOption(optionSleep);
    options.addOption(certReqOption);
    options.addOption(reqPolicyOption);

    for (Option option : KeyStoreOptions.getKeyStoreOptions()) {
        options.addOption(option);
    }
}

From source file:org.signserver.client.cli.validationservice.ValidateCertificateCommand.java

public ValidateCertificateCommand() {
    Option help = new Option(OPTION_HELP, false, "Display this info");
    Option silent = new Option(OPTION_SILENT, false, "Don't produce any output, only return value.");
    Option pem = new Option(OPTION_PEM, false, "Certificate is in PEM format (Default).");
    Option der = new Option(OPTION_DER, false, "Certificate is in DER format.");

    OptionBuilder.withArgName("service-name");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("The name or id of the validation service to process request. (Required)");
    Option serviceOption = OptionBuilder.create(OPTION_SERVICE);

    OptionBuilder.withArgName("cert-file");
    OptionBuilder.hasArg();/*from  ww  w .j  a  v  a2s  .  com*/
    OptionBuilder.withDescription("Path to certificate file (DER or PEM) (Required).");
    Option certOption = OptionBuilder.create(OPTION_CERT);

    OptionBuilder.withArgName("hosts");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription(
            "A ',' separated string containing the hostnames of the validation service nodes. Ex 'host1.someorg.org,host2.someorg.org'. When using the HTTP protocol, only one host name can be specified. (Required).");
    Option hostsOption = OptionBuilder.create(OPTION_HOSTS);

    OptionBuilder.withArgName("port");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("Remote port of service (Default is 8080 or 8442 for SSL).");
    Option portOption = OptionBuilder.create(OPTION_PORT);

    OptionBuilder.withArgName("certpurposes");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("A ',' separated string containing requested certificate purposes.");
    Option usagesOption = OptionBuilder.create(OPTION_CERTPURPOSES);

    OptionBuilder.withArgName("jks-file");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("Path to JKS truststore containing trusted CA for SSL Server certificates.");
    Option truststore = OptionBuilder.create(OPTION_TRUSTSTORE);

    OptionBuilder.withArgName("password");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("Password to unlock the truststore.");
    Option truststorepwd = OptionBuilder.create(OPTION_TRUSTSTOREPWD);

    OptionBuilder.withArgName("servlet-url");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription(
            "URL to the webservice servlet. Default: " + SignServerWSClientFactory.DEFAULT_WSDL_URL
                    + " when using the webservice protocol, otherwise /signserver/process");
    Option servlet = OptionBuilder.create(OPTION_SERVLET);

    OptionBuilder.withArgName("protocol");
    OptionBuilder.hasArg();
    OptionBuilder.withDescription("Protocol to use, either WEBSERVICES or HTTP. Default: WEBSERVICES.");
    Option protocol = OptionBuilder.create(OPTION_PROTOCOL);

    options.addOption(help);
    options.addOption(serviceOption);
    options.addOption(certOption);
    options.addOption(hostsOption);
    options.addOption(portOption);
    options.addOption(usagesOption);
    options.addOption(pem);
    options.addOption(der);
    options.addOption(silent);
    options.addOption(truststore);
    options.addOption(truststorepwd);
    options.addOption(servlet);
    options.addOption(protocol);
}

From source file:org.skb.util.cli.CliApache.java

public void setPropOptions(TSPropertyMap prop) {
    String optType;/*from   w ww .  jav  a 2 s.co  m*/
    String optShort;
    String optLong;
    String optDescr;
    String optArgName;

    HashSet<String> ts = new HashSet<String>(prop.getRows());
    for (Iterator<String> i = ts.iterator(); i.hasNext(); i.hasNext()) {
        String current = i.next();
        if (prop.get(current, TSPropertyMap.pmValCliOptionType) != null) {
            optType = prop.get(current, TSPropertyMap.pmValCliOptionType).toString();
            if (!(prop.get(current, TSPropertyMap.pmValCliOptionShort)).tsIsType(TEnum.TS_NULL))
                optShort = prop.get(current, TSPropertyMap.pmValCliOptionShort).toString();
            else
                optShort = null;
            if (!(prop.get(current, TSPropertyMap.pmValCliOptionLong)).tsIsType(TEnum.TS_NULL))
                optLong = prop.get(current, TSPropertyMap.pmValCliOptionLong).toString();
            else
                optLong = null;
            optDescr = prop.get(current, TSPropertyMap.pmValCliUsageDescr).toString();
            optArgName = prop.get(current, TSPropertyMap.pmValCliUsageDescrAdd).toString();

            if (optType.equals(TSRepository.TString.TS_ATOMIC_JAVA_STRING)
                    || optType.equals(TSRepository.TString.TS_ATOMIC_JAVA_INTEGER)
                    || optType.equals(TSRepository.TString.TS_ATOMIC_JAVA_DOUBLE)
                    || optType.equals(TSRepository.TString.TS_ATOMIC_JAVA_LONG)) {
                if (optShort != null && optLong != null) {
                    OptionBuilder.hasArg();
                    OptionBuilder.withDescription(optDescr);
                    OptionBuilder.withLongOpt(optLong);
                    OptionBuilder.withArgName(optArgName);
                    this.options.addOption(OptionBuilder.create(optShort.charAt(0)));
                    this.optionList.put(current, optLong);
                } else if (optLong != null) {
                    OptionBuilder.hasArg();
                    OptionBuilder.withDescription(optDescr);
                    OptionBuilder.withLongOpt(optLong);
                    OptionBuilder.withArgName(optArgName);
                    this.options.addOption(OptionBuilder.create());
                    this.optionList.put(current, optLong);
                }
            } else if (optType.equals(TSRepository.TString.TS_ATOMIC_JAVA_BOOLEAN)) {
                if (optShort != null && optLong != null) {
                    OptionBuilder.withDescription(optDescr);
                    OptionBuilder.withLongOpt(optLong);
                    this.options.addOption(OptionBuilder.create(optShort.charAt(0)));
                    this.optionList.put(current, optLong);
                } else if (optLong != null) {
                    OptionBuilder.withDescription(optDescr);
                    OptionBuilder.withLongOpt(optLong);
                    this.options.addOption(OptionBuilder.create());
                    this.optionList.put(current, optLong);
                }
            }
        }
    }
}