public abstract class WikipediaCliMinimum
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
command |
protected java.lang.String |
footer |
protected java.lang.String |
header |
protected java.lang.String |
LABEL |
protected java.util.Locale |
locale
The Wikipedia language
|
protected LumpLogger |
logger |
protected Options |
options
The options for the given CLI
|
protected java.util.Properties |
p
Configuration file
|
protected int |
year
Year of the Wikipedia edition
|
Constructor and Description |
---|
WikipediaCliMinimum()
Loads the logger and the available options (by calling loadOptions)
|
Modifier and Type | Method and Description |
---|---|
protected void |
exitError(HelpFormatter formatter,
java.lang.String message)
Finish the process with the CLI help and the an error message.
|
protected void |
exitHelp(HelpFormatter formatter)
Exit displaying the CLI help
|
java.util.Locale |
getLanguage() |
int |
getPropertyInt(java.lang.String key) |
java.lang.String |
getPropertyStr(java.lang.String key) |
int |
getYear() |
protected void |
loadOptions()
Load the options for language, year, and help
|
void |
parseArguments(java.lang.String[] args)
Method to parse the arguments received.
|
protected CommandLine |
parseLine(java.lang.String[] args)
Parses the arguments and generates the command line for further
processing the parameters.
|
protected java.lang.String LABEL
protected java.lang.String command
protected java.lang.String header
protected java.lang.String footer
protected java.util.Locale locale
protected int year
protected java.util.Properties p
protected LumpLogger logger
protected Options options
public WikipediaCliMinimum()
public void parseArguments(java.lang.String[] args)
args
- protected void loadOptions()
protected CommandLine parseLine(java.lang.String[] args)
args
- Array of arguments as received from the command lineprotected void exitError(HelpFormatter formatter, java.lang.String message)
formatter
- message
- protected void exitHelp(HelpFormatter formatter)
formatter
- public java.util.Locale getLanguage()
public int getYear()
public int getPropertyInt(java.lang.String key)
public java.lang.String getPropertyStr(java.lang.String key)