|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
edu.ucsb.nceas.metacat.MetacatReplication
Constructor Summary | |
MetacatReplication()
|
Method Summary | |
void |
destroy()
|
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
static java.lang.String |
getCatalogXML()
Returns the xml_catalog table encoded in xml |
static int |
getHomeServerCodeForDocId(java.lang.String accNum)
Returns a home server location given a accnum |
static java.util.Hashtable |
getHomeServerInfoForDocId(java.lang.String docId)
Method to get a host server information for given docid |
static int |
getServerCodeForServerName(java.lang.String server)
Returns a server code given a server name |
static java.lang.String |
getServerNameForServerCode(int serverCode)
Returns the name of a server given a serverCode |
static java.lang.String |
getURLContent(java.net.URL u)
This method returns the content of a url |
void |
init(javax.servlet.ServletConfig config)
Initialize the servlet by creating appropriate database connections |
static void |
replLog(java.lang.String message)
Method for writing replication messages to a log file specified in metacat.properties |
static boolean |
replToServer(java.lang.String server)
Returns true if the replicate field for server in xml_replication is 1. |
void |
run()
this method handles the timeout for a file lock. |
Constructor Detail |
public MetacatReplication()
Method Detail |
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
public void destroy()
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
public static java.lang.String getCatalogXML()
public void run()
run
in interface java.lang.Runnable
public static java.lang.String getServerNameForServerCode(int serverCode)
serverCode
- the serverid of the serverpublic static int getServerCodeForServerName(java.lang.String server) throws java.lang.Exception
server
- the name of the serverpublic static java.util.Hashtable getHomeServerInfoForDocId(java.lang.String docId)
conn
- a connection to the databasepublic static int getHomeServerCodeForDocId(java.lang.String accNum) throws java.lang.Exception
accNum
- , given accNum for a documentpublic static java.lang.String getURLContent(java.net.URL u) throws java.io.IOException
u
- the url to return the content fromjava.io.IOException
- public static void replLog(java.lang.String message)
public static boolean replToServer(java.lang.String server)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |