package de.vanitasvitae.imi.codes; import org.apache.commons.cli.Option; import org.apache.commons.cli.Options; class Arguments { static final Option STUDY_NUMBER = Option.builder("s") .longOpt("study") .desc("Three-letter code of the associated study") .required() .hasArg() .argName("SNR") .build(); static final Option SAMPLE_TYPE = Option.builder("t") .longOpt("type") .desc("Type of the sample (b = blood, u = urine)") .required() .hasArg() .argName("sample type") .build(); static final Option NUMBER_CODES = Option.builder("n") .longOpt("number") .desc("Number of codes to be generated") .required() .hasArg() .argName("n") .build(); static final Option OUTPUT_DESTINATION = Option.builder("o") .longOpt("output") .desc("Filename for the generated html output") .hasArg() .argName("file name") .build(); static final Option EXTERNAL_BROWSER = Option.builder("b") .longOpt("browser") .desc("Open the generated HTML output in a an external browser") .build(); static final Option HELP = Option.builder("h") .longOpt("help") .desc("Print this help text") .build(); /** * Assemble and return the available command line options. * * @return command line options. */ public static Options getCommandLineOptions() { return new Options() .addOption(STUDY_NUMBER) .addOption(SAMPLE_TYPE) .addOption(NUMBER_CODES) .addOption(OUTPUT_DESTINATION) .addOption(EXTERNAL_BROWSER) .addOption(HELP); } }