gov.nasa.pds.krtool.options
Class OptionsProcessor

java.lang.Object
  extended by gov.nasa.pds.krtool.options.OptionsProcessor
All Implemented Interfaces:
ConfigKeys, KRToolFlags, gov.nasa.pds.tools.flags.ToolsFlags

public class OptionsProcessor
extends java.lang.Object
implements KRToolFlags, ConfigKeys

Class to process the Keyword Report Tool (KRTool) options.

Author:
mcayanan

Field Summary
 
Fields inherited from interface gov.nasa.pds.krtool.options.KRToolFlags
IGNOREDIR, IGNOREFILE, KEYWORDS, LOCAL, REGEXP, TARGET, WHATIS_IGNOREDIR, WHATIS_IGNOREFILE, WHATIS_KEYWORDS, WHATIS_LOCAL, WHATIS_REGEXP, WHATIS_TARGET
 
Fields inherited from interface gov.nasa.pds.tools.flags.ToolsFlags
ARGNAME, CONFIG, DICT, HELP, LONG, REPORT, SHORT, VERSION, WHATIS_CONFIG, WHATIS_DICT, WHATIS_HELP, WHATIS_REPORT, WHATIS_VERSION
 
Fields inherited from interface gov.nasa.pds.krtool.options.ConfigKeys
IGNOREDIRKEY, IGNOREFILEKEY, KEYWORDSKEY, LOCALKEY, REGEXPKEY, REPORTKEY, TARGETKEY
 
Constructor Summary
OptionsProcessor()
           
 
Method Summary
static CommandLineOptions query(org.apache.commons.cli.CommandLine line)
          Process the options that are set in the CommandLine object.
static CommandLineOptions query(java.net.URL file)
          Process the options in the configuration file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OptionsProcessor

public OptionsProcessor()
Method Detail

query

public static CommandLineOptions query(org.apache.commons.cli.CommandLine line)
                                throws InvalidOptionException
Process the options that are set in the CommandLine object.

Parameters:
line - The CommandLine object that holds the options that were selected.
Throws:
InvalidOptionException - If there was an error processing the options.

query

public static CommandLineOptions query(java.net.URL file)
                                throws org.apache.commons.configuration.ConfigurationException
Process the options in the configuration file.

Parameters:
file - The configuration file
Throws:
org.apache.commons.configuration.ConfigurationException - If there was an error processing the config file.


Copyright © 2005-2009 Planetary Data System. All Rights Reserved.