|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.ucla.sspace.common.ArgOptions
gov.llnl.ontology.mapreduce.MRArgOptions
public class MRArgOptions
This class sets up some basic options that will be used in a wide number of
map reduce jobs that connect to either a CorpusTable
or a EvidenceTable
.
MRArgOptions
provides the following options:
-C
, --corpusTable
: Specifies the type of CorpusTable
being used.-E
, --EvidenceTable
: Specifies the type of EvidenceTable
being used.-S
, --sourceCorpus
: Specifies name of the source corpus
to be processed.
Constructor Summary | |
---|---|
MRArgOptions()
Creates a new MRArgOptions . |
Method Summary | |
---|---|
CorpusTable |
corpusTable()
Returns an instance of the CorpusTable specified via the command
line. |
String |
corpusTableType()
Returns the type of the CorpusTable specified via the command
line. |
EvidenceTable |
evidenceTable()
Returns an instance of the EvidenceTable specified via the
command line. |
String |
evidenceTableType()
Returns the type of the EvidenceTable specified via the command
line. |
void |
fail(String message,
String extraOptionDescription,
Class c)
Reports an usage message to the user and exits with failure. |
String |
sourceCorpus()
Returns the name of the source corpus specified via the command line, or the empty string if none was specified. |
void |
validate(String message,
String extraOptionDescription,
Class c,
int expectedPosArgs,
char... requiredList)
Validates the parsed options. |
Methods inherited from class edu.ucla.sspace.common.ArgOptions |
---|
addOption, addOption, addOption, getBooleanOption, getBooleanOption, getBooleanOption, getBooleanOption, getDoubleOption, getDoubleOption, getDoubleOption, getDoubleOption, getIntOption, getIntOption, getIntOption, getIntOption, getLongOption, getLongOption, getLongOption, getLongOption, getObjectOption, getObjectOption, getPositionalArg, getPositionalArgs, getStringOption, getStringOption, getStringOption, getStringOption, hasOption, hasOption, numPositionalArgs, numProvidedOptions, parseOptions, prettyPrint, removeOption, removeOption, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MRArgOptions()
MRArgOptions
.
Method Detail |
---|
public CorpusTable corpusTable()
CorpusTable
specified via the command
line.
public String corpusTableType()
CorpusTable
specified via the command
line.
public EvidenceTable evidenceTable()
EvidenceTable
specified via the
command line.
public String evidenceTableType()
EvidenceTable
specified via the command
line.
public String sourceCorpus()
public void validate(String message, String extraOptionDescription, Class c, int expectedPosArgs, char... requiredList)
message
will be printed instructing the user with
the available options and the program will immediately exit. When
exiting, the format output format will be:
usage: java CLASSNAME [OPTIONS] extraAgs
Options:
. . .
message
message
- An error message to print that is specific to the calling
programextraOptionDescription
- A one line summary of the extra positional
options that are expctedc
- The class type of the running programexpectedPosArgs
- The number of expected positional argumentsrequiredList
- A list of chars denoting the required optionspublic void fail(String message, String extraOptionDescription, Class c)
message
message
- An error message to print that is specific to the calling
programextraOptionDescription
- A one line summary of the extra positional
options that are expctedc
- The class type of the running program
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |