|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.ucsb.nceas.metacat.MetaCatUtil
A suite of utility classes for the metadata catalog server
Field Summary | |
static AbstractDatabase |
dbAdapter
|
Constructor Summary | |
MetaCatUtil()
|
Method Summary | |
static java.lang.Object |
createObject(java.lang.String className)
Instantiate a class using the name of the class at runtime |
static void |
debug(java.lang.String msg)
|
static void |
debugMessage(int flag)
Utility method to print debugging messages |
static void |
debugMessage(java.lang.String msg)
Utility method to print debugging messages |
static void |
debugMessage(java.lang.String msg,
int debugLevel)
Utility method to print debugging messages. |
static java.net.URL |
fileToURL(java.io.File file)
Utility method to convert a file handle into a URL |
static java.lang.String |
getDocIdFromString(java.lang.String str)
Utility method to get docid from a given string |
static java.lang.String |
getLocalReplicationServerName()
Method to get the name of local replication server |
static java.lang.String |
getOption(java.lang.String optionName)
Utility method to get an option value from the properties file |
java.lang.String |
getOption(java.lang.String optionName,
java.lang.String propFile)
Utility method to get an option value from a properties file |
static java.util.Vector |
getOptionList(java.lang.String optiontext)
|
static java.lang.String |
getRevisionStringFromString(java.lang.String str)
Utility method to get version string from a given string |
static int |
getVersionFromString(java.lang.String str)
Utility method to get version number from a given string |
static java.lang.String |
normalize(java.lang.String s)
Normalizes the given string. |
static java.util.Hashtable |
parseQuery(java.lang.String query)
Utility method to parse the query part of a URL into parameters. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static AbstractDatabase dbAdapter
Constructor Detail |
public MetaCatUtil()
Method Detail |
public static java.lang.Object createObject(java.lang.String className) throws java.lang.Exception
className
- the fully qualified name of the class to instantiatepublic static java.lang.String getOption(java.lang.String optionName)
optionName
- the name of the option requestedpublic java.lang.String getOption(java.lang.String optionName, java.lang.String propFile)
optionName
- the name of the option requestedpropFile
- the name of the file where to get the properties frompublic static java.net.URL fileToURL(java.io.File file)
public static java.util.Hashtable parseQuery(java.lang.String query) throws java.net.MalformedURLException
public static void debugMessage(java.lang.String msg, int debugLevel)
msg,
- the content of the messagedebugLevel,
- an integer indicating the message debug levepublic static void debugMessage(int flag)
flag
- an integer indicating the message numberpublic static void debugMessage(java.lang.String msg)
flag
- an integer indicating the message numberpublic static void debug(java.lang.String msg)
public static java.util.Vector getOptionList(java.lang.String optiontext)
public static java.lang.String normalize(java.lang.String s)
public static java.lang.String getDocIdFromString(java.lang.String str)
string,
- the given string should be these two format:
1) str1.str2 in this case docid= str1.str2
2) str1.str2.str3, in this case docid =str1.str2the
- sperator charpublic static int getVersionFromString(java.lang.String str) throws java.lang.NumberFormatException
string,
- the given string should be these two format:
1) str1.str2(no version) version =-1;
2) str1.str2.str3, in this case version = str3;
3) other, vresion =-2public static java.lang.String getRevisionStringFromString(java.lang.String str) throws java.lang.NumberFormatException
string,
- the given string should be these two format:
1) str1.str2(no version) version=null;
2) str1.str2.str3, in this case version = str3;
3) other, vresion =null;public static java.lang.String getLocalReplicationServerName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |