public class GDE2PCD
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CURRENT_DIR
This constant is set to the path of where biolegato was run
The value of this constant determined at runtime.
|
static java.lang.String |
HOME_DIR
Stores the user's home directory
|
static java.lang.String |
PCD_EXTENSION
The extension to use for the menu files
|
static java.lang.String |
PROGRAM_DIR
This constant is set to the path of BioLegato.jar
The value of this constant determined at runtime.
|
static java.net.URL |
purl
The ProtectionDomain CodeSource URL for the GDE2PCD class (used for
getting the path of the program directory -- PROGRAM_DIR).
|
static java.io.File |
WRITE_DIR
The output directory for the generated PCD menus.
|
Constructor and Description |
---|
GDE2PCD() |
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args)
The main method for this object (does the GDE to PCD conversion)
|
static void |
printKey(java.lang.Appendable out,
int level,
java.lang.String key,
java.util.Map<? extends java.lang.String,? extends java.lang.Object> menu,
boolean quote)
Formats and prints an individual key within a map
|
static void |
printRecursive(java.lang.Appendable out,
int level,
java.util.Map<? extends java.lang.String,? extends java.lang.Object> menu,
boolean quote)
Recursively prints a Map to an Appendable object
|
static void |
tabbedPrint(java.lang.Appendable out,
int level,
java.lang.Object value)
Prints a string at a given indentation level.
|
static boolean |
testNumber(char[] test)
Checks if a character array is all digits.
|
public static final java.net.URL purl
public static final java.lang.String PROGRAM_DIR
public static final java.io.File WRITE_DIR
public static final java.lang.String CURRENT_DIR
public static final java.lang.String HOME_DIR
public static final java.lang.String PCD_EXTENSION
public static void main(java.lang.String[] args)
args
- the command line argumentspublic static void printRecursive(java.lang.Appendable out, int level, java.util.Map<? extends java.lang.String,? extends java.lang.Object> menu, boolean quote) throws java.io.IOException
out
- the appendable objectlevel
- the level of indentation to print the entries atmenu
- the map object to printquote
- whether or not to quote the entriesjava.io.IOException
- any IOExceptions thrown by writing to outpublic static void printKey(java.lang.Appendable out, int level, java.lang.String key, java.util.Map<? extends java.lang.String,? extends java.lang.Object> menu, boolean quote) throws java.io.IOException
out
- the Appendable object to print to.level
- the level of indentation to print the entry at.key
- the key within the map object to print.menu
- the map object to print from.quote
- whether or not to quote the entries.java.io.IOException
- any IOExceptions thrown by writing to outpublic static void tabbedPrint(java.lang.Appendable out, int level, java.lang.Object value) throws java.io.IOException
out
- the appendable object to print to.level
- the level of indentation to print the string.value
- the string to print.java.io.IOException
public static boolean testNumber(char[] test)
test
- the character array to test.Copyright © 2008-2022 University of Manitoba.