|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectxml2fol.Global
public class Global
A utility class that contains common constant and methods that can be called from the other classes.
Field Summary | |
---|---|
static java.lang.String |
CMDLINE_AGRGUMENT_DELIM
Deliminator for command line aruguments |
static java.lang.String |
CMDLINE_KEYVALUE_DELIM
Deliminator for key,values paris in command line aruguments |
static java.lang.String |
DEFAULT_XPATH_VALUE
default xpath value |
static java.lang.String |
ERROR_FILENAME
global error file filename |
static java.lang.String |
FOL_DELIM
Delimator for FOL documents |
static java.lang.String |
FOL_SUFFIX
Suffix for file,offset,length documents |
static java.lang.String |
HTML_SUFFIX
Suffix for HTML documents |
static java.lang.String |
JPG_SUFFIX
Suffix for JPG images |
static java.lang.String |
QRL_SUFFIX
Suffix for GPXRai Log documents |
static java.lang.String |
TXT_SUFFIX
Suffix for text documents |
static java.lang.String |
XML_SUFFIX
Suffix for XML documents |
static int |
XML_SUFFIX_LENGTH
Number of characters in XML suffix |
Constructor Summary | |
---|---|
Global()
|
Method Summary | |
---|---|
static int |
BinarySearch(java.util.Vector v,
java.lang.Object objp,
java.util.Comparator c)
A standard binary search program that returns the index of a given object in a vector |
static java.lang.Long |
GetHashKey(java.lang.String filename,
java.lang.String xpath)
a utility method that produces a unique key for a given filename and xpath Used to ensure that keys are kept consistant throughout the program Key is returned as a number derived via MD5 hash algorithm |
static java.lang.String |
GetJustFileName(java.lang.String filename)
a utility method that for a given will just the name of the file when given a given a complete filepath e.g. |
static java.lang.String |
GetKey(java.lang.String filename,
java.lang.String xpath)
a utility method that produces a unique key for a given filename and xpath Used to ensure that keys are kept consistant throughout the program |
static java.util.Hashtable |
ProcessCommandsLinrArguments(java.lang.String[] args)
Populates a hashtable with a set of command line arguments and values (in lower case) arguments should be in -key=value format otherwise entire argument will be returned as the key with a empty string as its value |
static void |
ReportProgress(int current,
int length,
int num_of_increments)
Reports progress the amount of progress that has been made is signifcant |
static void |
ReportProgress(long current,
long length,
long num_of_increments)
Reports progress the amount of progress that has been made is signifcant |
static void |
SetErrorFilename(java.lang.String filename)
Sets the filename of the global error file |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String XML_SUFFIX
public static java.lang.String TXT_SUFFIX
public static java.lang.String FOL_SUFFIX
public static java.lang.String JPG_SUFFIX
public static java.lang.String HTML_SUFFIX
public static java.lang.String QRL_SUFFIX
public static java.lang.String FOL_DELIM
public static java.lang.String CMDLINE_AGRGUMENT_DELIM
public static java.lang.String CMDLINE_KEYVALUE_DELIM
public static int XML_SUFFIX_LENGTH
public static java.lang.String DEFAULT_XPATH_VALUE
public static java.lang.String ERROR_FILENAME
Constructor Detail |
---|
public Global()
Method Detail |
---|
public static java.lang.String GetJustFileName(java.lang.String filename)
filename
- - the complete filename
public static java.lang.String GetKey(java.lang.String filename, java.lang.String xpath)
filename
- - the element's filenamexpath
- - the element's xpath
public static java.lang.Long GetHashKey(java.lang.String filename, java.lang.String xpath)
filename
- - the element's filenamexpath
- - the element's xpath
public static int BinarySearch(java.util.Vector v, java.lang.Object objp, java.util.Comparator c)
v
- - A vector of objectsobjp
- - The object whose index we are searching forc
- - The comparator used to compare objects in the vector
public static void ReportProgress(int current, int length, int num_of_increments)
current
- - The current iterationlength
- - The total number of iterationsnum_of_increments
- - Number of incremenets that are to be reportedpublic static void ReportProgress(long current, long length, long num_of_increments)
current
- - The current iterationlength
- - The total number of iterationsnum_of_increments
- - Number of incremenets that are to be reportedpublic static java.util.Hashtable ProcessCommandsLinrArguments(java.lang.String[] args)
args
- - The command line arguments
public static void SetErrorFilename(java.lang.String filename)
filename
- - The filename of the global error file
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |