|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pz.platypus.Platypus
public class Platypus
The main line.
Field Summary | |
---|---|
private static Literals |
lits
|
Constructor Summary | |
---|---|
Platypus()
|
Method Summary | |
---|---|
private static void |
addInputFileToFileList(CommandLineArgs clArgs,
GDD gdd)
add the input file to the file list |
private static void |
displayCopyright()
output the copyright notice to console |
static void |
findOutputFilePluginType(CommandLineArgs ClArgs,
GDD Gdd)
tries to determine the prefix in the config file for the output plugin. |
private static java.lang.String |
findPluginJar(java.lang.String pluginJarLookupName,
GDD gdd)
Get the actual name of the plugin, based on its lookup value in config file. |
private static java.lang.String |
getConfigFilename(CommandLineArgs ClArgs,
GDD Gdd)
Get the name of the config file either from the command file or from the default location |
private static java.lang.String |
loadOutputPlugin(GDD gdd,
CommandLineArgs clArgs)
Gets the full canonical name of the plugin (full path + file name). |
private static void |
logUnexpectedError(java.lang.Exception ex,
GDD gdd)
Prints out the error message in the event of an unexpected error. |
static void |
main(java.lang.String[] args)
Where the rubber meets the road... |
static CommandLineArgs |
processCommandLine(java.lang.String[] args,
GDD gdd)
Process the command line: store it, validate it, and process the args. |
static void |
processConfigFile(CommandLineArgs Clargs,
GDD Gdd)
Finds the config file, reads it in, and places an instance of it in GDD. |
static void |
processInputFile(GDD gdd,
CommandLineArgs clArgs)
Reads and parses the input file(s). |
static void |
putFormatInSystemStrings(CommandLineArgs clArgs,
GDD gdd)
Places the output format into the SystemStrings lookup table |
private static void |
runOutputPlugin(java.lang.String pluginName,
GDD gdd,
CommandLineArgs clArgs)
The method that actually calls and runs the output plugin |
private static GDD |
setupGdd(Literals lits)
GDD is the global document data block. |
static void |
setupLiterals(java.lang.String baseFilename)
Load the default literals file, which is a property file. |
static void |
showUsage(GDD Gdd)
Show the usage options. |
static void |
storeVersionNumber(GDD Gdd)
Stores the current Platypus version number in the table of system strings under _version |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static Literals lits
Constructor Detail |
---|
public Platypus()
Method Detail |
---|
private static void addInputFileToFileList(CommandLineArgs clArgs, GDD gdd)
clArgs
- command line containing the name of the input filegdd
- GDD containing the FileLits for this programprivate static void displayCopyright()
public static void findOutputFilePluginType(CommandLineArgs ClArgs, GDD Gdd)
ClArgs
- the command line argsGdd
- the GDD
java.util.MissingResourceException
- if the output file format cannot be determined.private static java.lang.String findPluginJar(java.lang.String pluginJarLookupName, GDD gdd)
pluginJarLookupName
- name of the plugin file (a JAR file) in the PLATYPUS_HOME\pluginsgdd
- the GDD
private static java.lang.String loadOutputPlugin(GDD gdd, CommandLineArgs clArgs) throws java.util.MissingResourceException
gdd
- the GDDclArgs
- the command line args
java.util.MissingResourceException
- in event the PLATYPUS_HOME directory has not been defined.private static void runOutputPlugin(java.lang.String pluginName, GDD gdd, CommandLineArgs clArgs)
pluginName
- name of the plugin filegdd
- the GDDclArgs
- command-line argsprivate static void logUnexpectedError(java.lang.Exception ex, GDD gdd)
ex
- the exceptiongdd
- the GDDpublic static CommandLineArgs processCommandLine(java.lang.String[] args, GDD gdd) throws HelpMessagePrinted, org.apache.commons.cli.ParseException
args
- the command-line argsgdd
- the GDD
HelpMessagePrinted
- if the user specified -help on the command line. In this case,
no further processing is needed (after the help message has been displayed).
org.apache.commons.cli.ParseException
- it the CLI args handling fails in CommandLineArgspublic static void putFormatInSystemStrings(CommandLineArgs clArgs, GDD gdd)
clArgs
- command-line argsgdd
- the GDDpublic static void processConfigFile(CommandLineArgs Clargs, GDD Gdd) throws java.util.MissingResourceException
Clargs
- the command line argsGdd
- the GDD
java.util.MissingResourceException
- in the event the config file cannot be loadedprivate static java.lang.String getConfigFilename(CommandLineArgs ClArgs, GDD Gdd)
Gdd
- the GDDClArgs
- object containing the command-line args
public static void processInputFile(GDD gdd, CommandLineArgs clArgs) throws java.lang.NoSuchFieldException
gdd
- the GDDclArgs
- the command-line arguments
java.lang.NoSuchFieldException
- if no input file is specified, or it's invalid.private static GDD setupGdd(Literals lits)
lits
- the Literals
public static void setupLiterals(java.lang.String baseFilename) throws java.util.MissingResourceException
baseFilename
- base of the Literals filename. ".properties" extension will be appended
java.util.MissingResourceException
- if an error occurs while file is read and loaded.public static void showUsage(GDD Gdd)
Gdd
- GDD containing the Literalspublic static void storeVersionNumber(GDD Gdd)
Gdd
- global document data structurepublic static void main(java.lang.String[] args) throws org.apache.commons.cli.ParseException
args
- command-line args
org.apache.commons.cli.ParseException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |