|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.ucsb.nceas.metacat.util.DocumentUtil
public class DocumentUtil
A suite of utility classes for the metadata catalog server
| Field Summary | |
|---|---|
static AbstractDatabase |
dbAdapter
|
| Constructor Summary | |
|---|---|
DocumentUtil()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
getAccessionNumberFromEcogridIdentifier(java.lang.String identifier)
Eocgorid identifier will look like: ecogrid://knb/tao.1.1 The AccessionNumber tao.1.1 will be returned. |
static java.lang.String |
getDocIdFromAccessionNumber(java.lang.String accessionNumber)
This method will get docid from an AccessionNumber. |
static java.lang.String |
getDocIdFromString(java.lang.String str)
Utility method to get docid from a given string |
static java.lang.String |
getDocIdWithoutRevFromInlineDataID(java.lang.String inlineDataID)
Method to get docidwithrev from eml2 inline data id The eml inline data id would look like eml.200.2.3 |
static java.lang.String |
getDocIdWithRevFromOnlineURL(java.lang.String url)
Get docid from online/url string |
static java.lang.String |
getInlineDataIdWithoutRev(java.lang.String accessionNumber)
This method will get inline data id without the revision number. |
static int |
getRevisionFromAccessionNumber(java.lang.String accessionNumber)
This method will get revision from an AccessionNumber. |
static java.lang.String |
getRevisionStringFromString(java.lang.String str)
Utility method to get version string from a given string |
static java.lang.String |
getSmartDocId(java.lang.String str)
This method will call both getDocIdFromString and getDocIdFromAccessionNumber. |
static int |
getVersionFromString(java.lang.String str)
Utility method to get version number from a given string |
static void |
isAuthorized(java.io.PrintWriter out,
java.util.Hashtable<java.lang.String,java.lang.String[]> params,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
static java.util.Stack<NodeRecord> |
reviseStack(java.util.Stack<NodeRecord> stack)
Revise stack change a stack to opposite order |
| 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 DocumentUtil()
| Method Detail |
|---|
public static java.lang.String getDocIdWithRevFromOnlineURL(java.lang.String url)
public static java.lang.String getAccessionNumberFromEcogridIdentifier(java.lang.String identifier)
identifier - String
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 char
public 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 =-2
java.lang.NumberFormatException
public 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;
java.lang.NumberFormatExceptionpublic static java.lang.String getDocIdFromAccessionNumber(java.lang.String accessionNumber)
public static java.lang.String getInlineDataIdWithoutRev(java.lang.String accessionNumber)
public static java.lang.String getSmartDocId(java.lang.String str)
public static int getRevisionFromAccessionNumber(java.lang.String accessionNumber)
throws java.lang.NumberFormatException
java.lang.NumberFormatExceptionpublic static java.lang.String getDocIdWithoutRevFromInlineDataID(java.lang.String inlineDataID)
public static java.util.Stack<NodeRecord> reviseStack(java.util.Stack<NodeRecord> stack)
public static void isAuthorized(java.io.PrintWriter out,
java.util.Hashtable<java.lang.String,java.lang.String[]> params,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws MetacatUtilException
MetacatUtilException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||