org.carrot2.dcs
Class CliOptions

java.lang.Object
  extended by org.carrot2.dcs.CliOptions

public final class CliOptions
extends Object

Shared methods for adding and parsing command line Options.


Field Summary
 org.apache.commons.cli.Option benchmarkAlgorithms
           
 org.apache.commons.cli.Option benchmarkCacheInput
           
 org.apache.commons.cli.Option benchmarkInputs
           
 org.apache.commons.cli.Option benchmarkQueries
           
 org.apache.commons.cli.Option benchmarkResults
           
 org.apache.commons.cli.Option benchmarkRounds
           
 org.apache.commons.cli.Option benchmarkWarmupRounds
           
 org.apache.commons.cli.Option benchmarkXMLFolder
           
 org.apache.commons.cli.Option clustersOnly
           
 org.apache.commons.cli.Option descriptorsDir
           
 org.apache.commons.cli.Option outputFolder
           
 org.apache.commons.cli.Option outputFormat
           
 org.apache.commons.cli.Option port
           
 org.apache.commons.cli.Option processName
           
 org.apache.commons.cli.Option verbose
           
 
Constructor Summary
CliOptions()
           
 
Method Summary
static void addAll(org.apache.commons.cli.Options options, Object[] array)
          Adds all Options and OptionGroups from array to option.
static Object getOption(org.apache.commons.cli.CommandLine options, org.apache.commons.cli.Option option, Object defaultValue)
          Return the option's value or, if undefined, the default value.
 String[] parseBenchmarkAlgorithmsOption(org.apache.commons.cli.CommandLine options, ControllerContext context)
           
 int[] parseBenchmarkResultsOption(org.apache.commons.cli.CommandLine options)
           
 String parseOutputFormat(org.apache.commons.cli.CommandLine options)
          Parses the content of outputFormat option and throws a ConfigurationException if the output format is not valid.
 String parseProcessIdOption(org.apache.commons.cli.CommandLine options, ControllerContext context)
          Parses the content of processName option and throws a ConfigurationException if the process is not present in the ControllerContext or if it is null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

processName

public final org.apache.commons.cli.Option processName

descriptorsDir

public final org.apache.commons.cli.Option descriptorsDir

outputFolder

public final org.apache.commons.cli.Option outputFolder

verbose

public final org.apache.commons.cli.Option verbose

clustersOnly

public final org.apache.commons.cli.Option clustersOnly

outputFormat

public final org.apache.commons.cli.Option outputFormat

port

public final org.apache.commons.cli.Option port

benchmarkInputs

public final org.apache.commons.cli.Option benchmarkInputs

benchmarkAlgorithms

public final org.apache.commons.cli.Option benchmarkAlgorithms

benchmarkResults

public final org.apache.commons.cli.Option benchmarkResults

benchmarkQueries

public final org.apache.commons.cli.Option benchmarkQueries

benchmarkRounds

public final org.apache.commons.cli.Option benchmarkRounds

benchmarkWarmupRounds

public final org.apache.commons.cli.Option benchmarkWarmupRounds

benchmarkCacheInput

public final org.apache.commons.cli.Option benchmarkCacheInput

benchmarkXMLFolder

public final org.apache.commons.cli.Option benchmarkXMLFolder
Constructor Detail

CliOptions

public CliOptions()
Method Detail

getOption

public static Object getOption(org.apache.commons.cli.CommandLine options,
                               org.apache.commons.cli.Option option,
                               Object defaultValue)
Return the option's value or, if undefined, the default value.


addAll

public static void addAll(org.apache.commons.cli.Options options,
                          Object[] array)
Adds all Options and OptionGroups from array to option.


parseProcessIdOption

public String parseProcessIdOption(org.apache.commons.cli.CommandLine options,
                                   ControllerContext context)
                            throws ConfigurationException
Parses the content of processName option and throws a ConfigurationException if the process is not present in the ControllerContext or if it is null.

Throws:
ConfigurationException

parseOutputFormat

public String parseOutputFormat(org.apache.commons.cli.CommandLine options)
                         throws ConfigurationException
Parses the content of outputFormat option and throws a ConfigurationException if the output format is not valid.

Throws:
ConfigurationException

parseBenchmarkAlgorithmsOption

public String[] parseBenchmarkAlgorithmsOption(org.apache.commons.cli.CommandLine options,
                                               ControllerContext context)
                                        throws ConfigurationException
Throws:
ConfigurationException

parseBenchmarkResultsOption

public int[] parseBenchmarkResultsOption(org.apache.commons.cli.CommandLine options)
                                  throws ConfigurationException
Throws:
ConfigurationException


Copyright (c) Dawid Weiss, Stanislaw Osinski