<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_265) on Tue Aug 25 19:30:52 UTC 2020 --> <title>ReplicationService (MetaCat API)</title> <meta name="date" content="2020-08-25"> <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="ReplicationService (MetaCat API)"; } } catch(err) { } //--> var methods = {"i0":10,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":10,"i27":9,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":9}; var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/ReplicationService.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationServerList.html" title="class in edu.ucsb.nceas.metacat.replication"><span class="typeNameLink">Prev Class</span></a></li> <li><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationServlet.html" title="class in edu.ucsb.nceas.metacat.replication"><span class="typeNameLink">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?edu/ucsb/nceas/metacat/replication/ReplicationService.html" target="_top">Frames</a></li> <li><a href="ReplicationService.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary: </li> <li>Nested | </li> <li><a href="#field.summary">Field</a> | </li> <li>Constr | </li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail: </li> <li><a href="#field.detail">Field</a> | </li> <li>Constr | </li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">edu.ucsb.nceas.metacat.replication</div> <h2 title="Class ReplicationService" class="title">Class ReplicationService</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li><a href="../../../../../edu/ucsb/nceas/metacat/shared/BaseService.html" title="class in edu.ucsb.nceas.metacat.shared">edu.ucsb.nceas.metacat.shared.BaseService</a></li> <li> <ul class="inheritance"> <li>edu.ucsb.nceas.metacat.replication.ReplicationService</li> </ul> </li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <hr> <br> <pre>public class <span class="typeNameLabel">ReplicationService</span> extends <a href="../../../../../edu/ucsb/nceas/metacat/shared/BaseService.html" title="class in edu.ucsb.nceas.metacat.shared">BaseService</a></pre> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- =========== FIELD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="field.summary"> <!-- --> </a> <h3>Field Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> <caption><span>Fields</span><span class="tabEnd"> </span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Field and Description</th> </tr> <tr class="altColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#FORCEREPLICATEDELETE">FORCEREPLICATEDELETE</a></span></code> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#FORCEREPLICATEDELETEALL">FORCEREPLICATEDELETEALL</a></span></code> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#METACAT_REPL_ERROR_MSG">METACAT_REPL_ERROR_MSG</a></span></code> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#REPLICATION_LOG_FILE_NAME">REPLICATION_LOG_FILE_NAME</a></span></code> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#REPLICATIONUSER">REPLICATIONUSER</a></span></code> </td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="fields.inherited.from.class.edu.ucsb.nceas.metacat.shared.BaseService"> <!-- --> </a> <h3>Fields inherited from class edu.ucsb.nceas.metacat.shared.<a href="../../../../../edu/ucsb/nceas/metacat/shared/BaseService.html" title="class in edu.ucsb.nceas.metacat.shared">BaseService</a></h3> <code><a href="../../../../../edu/ucsb/nceas/metacat/shared/BaseService.html#Z:Z_serviceName">_serviceName</a></code></li> </ul> </li> </ul> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method.summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code>protected void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#doRefresh--">doRefresh</a></span>()</code> </td> </tr> <tr id="i1" class="rowColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#getCatalogXML--">getCatalogXML</a></span>()</code> <div class="block">Returns the xml_catalog table encoded in xml</div> </td> </tr> <tr id="i2" class="altColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#getDocumentInfo-java.lang.String-">getDocumentInfo</a></span>(java.lang.String docid)</code> <div class="block">Gets a docInfo XML snippet for the replication API</div> </td> </tr> <tr id="i3" class="rowColor"> <td class="colFirst"><code>static java.util.Hashtable<java.lang.String,java.lang.String></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#getDocumentInfoMap-java.lang.String-">getDocumentInfoMap</a></span>(java.lang.String docid)</code> </td> </tr> <tr id="i4" class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#getHomeServerCodeForDocId-java.lang.String-">getHomeServerCodeForDocId</a></span>(java.lang.String accNum)</code> <div class="block">Returns a home server location given a accnum</div> </td> </tr> <tr id="i5" class="rowColor"> <td class="colFirst"><code>static java.util.Hashtable<java.lang.String,java.lang.String></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#getHomeServerInfoForDocId-java.lang.String-">getHomeServerInfoForDocId</a></span>(java.lang.String docId)</code> <div class="block">Method to get a host server information for given docid</div> </td> </tr> <tr id="i6" class="altColor"> <td class="colFirst"><code>static <a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html" title="class in edu.ucsb.nceas.metacat.replication">ReplicationService</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#getInstance--">getInstance</a></span>()</code> <div class="block">Get the single instance of SessionService.</div> </td> </tr> <tr id="i7" class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#getServerCodeForServerName-java.lang.String-">getServerCodeForServerName</a></span>(java.lang.String server)</code> <div class="block">Returns a server code given a server name</div> </td> </tr> <tr id="i8" class="altColor"> <td class="colFirst"><code>static java.util.Map<java.lang.Integer,java.lang.String></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#getServerCodes--">getServerCodes</a></span>()</code> <div class="block">Returns a Map of serverCode=serverName</div> </td> </tr> <tr id="i9" class="rowColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#getServerNameForServerCode-int-">getServerNameForServerCode</a></span>(int serverCode)</code> <div class="block">Returns the name of a server given a serverCode</div> </td> </tr> <tr id="i10" class="altColor"> <td class="colFirst"><code>static byte[]</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#getURLBytes-java.net.URL-">getURLBytes</a></span>(java.net.URL u)</code> <div class="block">This method returns a byte array after opening a url</div> </td> </tr> <tr id="i11" class="rowColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#getURLContent-java.net.URL-">getURLContent</a></span>(java.net.URL u)</code> <div class="block">This method returns the content of a url</div> </td> </tr> <tr id="i12" class="altColor"> <td class="colFirst"><code>static java.io.InputStream</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#getURLStream-java.net.URL-">getURLStream</a></span>(java.net.URL u)</code> <div class="block">This method returns the InputStream after opening a url</div> </td> </tr> <tr id="i13" class="rowColor"> <td class="colFirst"><code>protected static void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#handleForceReplicateDataFileRequest-java.util.Hashtable-javax.servlet.http.HttpServletRequest-">handleForceReplicateDataFileRequest</a></span>(java.util.Hashtable<java.lang.String,java.lang.String[]> params, javax.servlet.http.HttpServletRequest request)</code> <div class="block">when a forcereplication data file request comes in, local host sends a readdata request to the requesting server (remote server) for the specified docid.</div> </td> </tr> <tr id="i14" class="altColor"> <td class="colFirst"><code>protected static void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#handleForceReplicateDeleteRequest-java.util.Hashtable-javax.servlet.http.HttpServletResponse-javax.servlet.http.HttpServletRequest-boolean-">handleForceReplicateDeleteRequest</a></span>(java.util.Hashtable<java.lang.String,java.lang.String[]> params, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request, boolean removeAll)</code> </td> </tr> <tr id="i15" class="rowColor"> <td class="colFirst"><code>protected static void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#handleForceReplicateRequest-java.util.Hashtable-javax.servlet.http.HttpServletResponse-javax.servlet.http.HttpServletRequest-">handleForceReplicateRequest</a></span>(java.util.Hashtable<java.lang.String,java.lang.String[]> params, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request)</code> <div class="block">when a forcereplication request comes in, local host sends a read request to the requesting server (remote server) for the specified docid.</div> </td> </tr> <tr id="i16" class="altColor"> <td class="colFirst"><code>protected static void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#handleForceReplicateSystemMetadataRequest-java.util.Hashtable-javax.servlet.http.HttpServletResponse-javax.servlet.http.HttpServletRequest-">handleForceReplicateSystemMetadataRequest</a></span>(java.util.Hashtable<java.lang.String,java.lang.String[]> params, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request)</code> <div class="block">when a forcereplication request comes in, local host sends a read request to the requesting server (remote server) for the specified docid.</div> </td> </tr> <tr id="i17" class="rowColor"> <td class="colFirst"><code>protected static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#handleGetCatalogRequest-java.util.Hashtable-javax.servlet.http.HttpServletResponse-boolean-">handleGetCatalogRequest</a></span>(java.util.Hashtable<java.lang.String,java.lang.String[]> params, javax.servlet.http.HttpServletResponse response, boolean printFlag)</code> <div class="block">Sends the contents of the xml_catalog table encoded in xml The xml format is: <!ELEMENT xml_catalog (row*)> <!ELEMENT row (entry_type, source_doctype, target_doctype, public_id, system_id)> All of the sub elements of row are #PCDATA If printFlag == false then do not print to out.</div> </td> </tr> <tr id="i18" class="altColor"> <td class="colFirst"><code>protected static void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#handleGetDataFileRequest-java.io.OutputStream-java.util.Hashtable-javax.servlet.http.HttpServletResponse-">handleGetDataFileRequest</a></span>(java.io.OutputStream outPut, java.util.Hashtable<java.lang.String,java.lang.String[]> params, javax.servlet.http.HttpServletResponse response)</code> <div class="block">Sends a datafile to a remote host</div> </td> </tr> <tr id="i19" class="rowColor"> <td class="colFirst"><code>protected static void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#handleGetDocumentInfoRequest-java.util.Hashtable-javax.servlet.http.HttpServletResponse-">handleGetDocumentInfoRequest</a></span>(java.util.Hashtable<java.lang.String,java.lang.String[]> params, javax.servlet.http.HttpServletResponse response)</code> <div class="block">Sends all of the xml_documents information encoded in xml to a requestor the format is: <!ELEMENT documentinfo (docid, docname, doctype, doctitle, user_owner, user_updated, home_server, public_access, rev)/> all of the subelements of document info are #PCDATA</div> </td> </tr> <tr id="i20" class="altColor"> <td class="colFirst"><code>protected static void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#handleGetDocumentRequest-java.util.Hashtable-javax.servlet.http.HttpServletResponse-">handleGetDocumentRequest</a></span>(java.util.Hashtable<java.lang.String,java.lang.String[]> params, javax.servlet.http.HttpServletResponse response)</code> <div class="block">Sends a document to a remote host</div> </td> </tr> <tr id="i21" class="rowColor"> <td class="colFirst"><code>protected static void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#handleGetLockRequest-java.util.Hashtable-javax.servlet.http.HttpServletResponse-">handleGetLockRequest</a></span>(java.util.Hashtable<java.lang.String,java.lang.String[]> params, javax.servlet.http.HttpServletResponse response)</code> <div class="block">Grants or denies a lock to a requesting host.</div> </td> </tr> <tr id="i22" class="altColor"> <td class="colFirst"><code>protected static void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#handleGetSystemMetadataRequest-java.util.Hashtable-javax.servlet.http.HttpServletResponse-">handleGetSystemMetadataRequest</a></span>(java.util.Hashtable<java.lang.String,java.lang.String[]> params, javax.servlet.http.HttpServletResponse response)</code> <div class="block">Sends System Metadata as XML</div> </td> </tr> <tr id="i23" class="rowColor"> <td class="colFirst"><code>protected static void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#handleGetTimeRequest-java.util.Hashtable-javax.servlet.http.HttpServletResponse-">handleGetTimeRequest</a></span>(java.util.Hashtable<java.lang.String,java.lang.String[]> params, javax.servlet.http.HttpServletResponse response)</code> <div class="block">Sends the current system date to the remote server.</div> </td> </tr> <tr id="i24" class="altColor"> <td class="colFirst"><code>static void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#handleServerControlRequest-java.util.Hashtable-javax.servlet.http.HttpServletRequest-javax.servlet.http.HttpServletResponse-">handleServerControlRequest</a></span>(java.util.Hashtable<java.lang.String,java.lang.String[]> params, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)</code> <div class="block">This method can add, delete and list the servers currently included in xml_replication.</div> </td> </tr> <tr id="i25" class="rowColor"> <td class="colFirst"><code>protected static void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#handleUpdateRequest-java.util.Hashtable-javax.servlet.http.HttpServletResponse-">handleUpdateRequest</a></span>(java.util.Hashtable<java.lang.String,java.lang.String[]> params, javax.servlet.http.HttpServletResponse response)</code> <div class="block">Sends a list of all of the documents on this sever along with their revision numbers.</div> </td> </tr> <tr id="i26" class="altColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#refreshable--">refreshable</a></span>()</code> </td> </tr> <tr id="i27" class="rowColor"> <td class="colFirst"><code>static boolean</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#replToServer-java.lang.String-">replToServer</a></span>(java.lang.String server)</code> <div class="block">Returns true if the replicate field for server in xml_replication is 1.</div> </td> </tr> <tr id="i28" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#run--">run</a></span>()</code> <div class="block">this method handles the timeout for a file lock.</div> </td> </tr> <tr id="i29" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#runOnce--">runOnce</a></span>()</code> </td> </tr> <tr id="i30" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#startReplication-java.util.Hashtable-">startReplication</a></span>(java.util.Hashtable<java.lang.String,java.lang.String[]> params)</code> </td> </tr> <tr id="i31" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#stop--">stop</a></span>()</code> </td> </tr> <tr id="i32" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#stopReplication--">stopReplication</a></span>()</code> </td> </tr> <tr id="i33" class="rowColor"> <td class="colFirst"><code>static void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html#updateUserOwner-edu.ucsb.nceas.metacat.database.DBConnection-java.lang.String-java.lang.String-java.lang.String-">updateUserOwner</a></span>(<a href="../../../../../edu/ucsb/nceas/metacat/database/DBConnection.html" title="class in edu.ucsb.nceas.metacat.database">DBConnection</a> dbConn, java.lang.String docid, java.lang.String owner, java.lang.String updater)</code> </td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.edu.ucsb.nceas.metacat.shared.BaseService"> <!-- --> </a> <h3>Methods inherited from class edu.ucsb.nceas.metacat.shared.<a href="../../../../../edu/ucsb/nceas/metacat/shared/BaseService.html" title="class in edu.ucsb.nceas.metacat.shared">BaseService</a></h3> <code><a href="../../../../../edu/ucsb/nceas/metacat/shared/BaseService.html#refresh--">refresh</a></code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> <!-- --> </a> <h3>Methods inherited from class java.lang.Object</h3> <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ============ FIELD DETAIL =========== --> <ul class="blockList"> <li class="blockList"><a name="field.detail"> <!-- --> </a> <h3>Field Detail</h3> <a name="FORCEREPLICATEDELETE"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>FORCEREPLICATEDELETE</h4> <pre>public static final java.lang.String FORCEREPLICATEDELETE</pre> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../constant-values.html#edu.ucsb.nceas.metacat.replication.ReplicationService.FORCEREPLICATEDELETE">Constant Field Values</a></dd> </dl> </li> </ul> <a name="FORCEREPLICATEDELETEALL"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>FORCEREPLICATEDELETEALL</h4> <pre>public static final java.lang.String FORCEREPLICATEDELETEALL</pre> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../constant-values.html#edu.ucsb.nceas.metacat.replication.ReplicationService.FORCEREPLICATEDELETEALL">Constant Field Values</a></dd> </dl> </li> </ul> <a name="REPLICATIONUSER"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>REPLICATIONUSER</h4> <pre>public static final java.lang.String REPLICATIONUSER</pre> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../constant-values.html#edu.ucsb.nceas.metacat.replication.ReplicationService.REPLICATIONUSER">Constant Field Values</a></dd> </dl> </li> </ul> <a name="REPLICATION_LOG_FILE_NAME"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>REPLICATION_LOG_FILE_NAME</h4> <pre>public static final java.lang.String REPLICATION_LOG_FILE_NAME</pre> <dl> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../../constant-values.html#edu.ucsb.nceas.metacat.replication.ReplicationService.REPLICATION_LOG_FILE_NAME">Constant Field Values</a></dd> </dl> </li> </ul> <a name="METACAT_REPL_ERROR_MSG"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>METACAT_REPL_ERROR_MSG</h4> <pre>public static java.lang.String METACAT_REPL_ERROR_MSG</pre> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method.detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="getInstance--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getInstance</h4> <pre>public static <a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationService.html" title="class in edu.ucsb.nceas.metacat.replication">ReplicationService</a> getInstance() throws <a href="../../../../../edu/ucsb/nceas/metacat/shared/ServiceException.html" title="class in edu.ucsb.nceas.metacat.shared">ServiceException</a></pre> <div class="block">Get the single instance of SessionService.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the single instance of SessionService</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/shared/ServiceException.html" title="class in edu.ucsb.nceas.metacat.shared">ServiceException</a></code></dd> </dl> </li> </ul> <a name="refreshable--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>refreshable</h4> <pre>public boolean refreshable()</pre> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/shared/BaseService.html#refreshable--">refreshable</a></code> in class <code><a href="../../../../../edu/ucsb/nceas/metacat/shared/BaseService.html" title="class in edu.ucsb.nceas.metacat.shared">BaseService</a></code></dd> </dl> </li> </ul> <a name="doRefresh--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>doRefresh</h4> <pre>protected void doRefresh() throws <a href="../../../../../edu/ucsb/nceas/metacat/shared/ServiceException.html" title="class in edu.ucsb.nceas.metacat.shared">ServiceException</a></pre> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/shared/BaseService.html#doRefresh--">doRefresh</a></code> in class <code><a href="../../../../../edu/ucsb/nceas/metacat/shared/BaseService.html" title="class in edu.ucsb.nceas.metacat.shared">BaseService</a></code></dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/shared/ServiceException.html" title="class in edu.ucsb.nceas.metacat.shared">ServiceException</a></code></dd> </dl> </li> </ul> <a name="stop--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>stop</h4> <pre>public void stop() throws <a href="../../../../../edu/ucsb/nceas/metacat/shared/ServiceException.html" title="class in edu.ucsb.nceas.metacat.shared">ServiceException</a></pre> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/shared/BaseService.html#stop--">stop</a></code> in class <code><a href="../../../../../edu/ucsb/nceas/metacat/shared/BaseService.html" title="class in edu.ucsb.nceas.metacat.shared">BaseService</a></code></dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/shared/ServiceException.html" title="class in edu.ucsb.nceas.metacat.shared">ServiceException</a></code></dd> </dl> </li> </ul> <a name="stopReplication--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>stopReplication</h4> <pre>public void stopReplication() throws <a href="../../../../../edu/ucsb/nceas/metacat/shared/ServiceException.html" title="class in edu.ucsb.nceas.metacat.shared">ServiceException</a></pre> <dl> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/shared/ServiceException.html" title="class in edu.ucsb.nceas.metacat.shared">ServiceException</a></code></dd> </dl> </li> </ul> <a name="startReplication-java.util.Hashtable-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>startReplication</h4> <pre>public void startReplication(java.util.Hashtable<java.lang.String,java.lang.String[]> params) throws <a href="../../../../../edu/ucsb/nceas/metacat/shared/ServiceException.html" title="class in edu.ucsb.nceas.metacat.shared">ServiceException</a></pre> <dl> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/shared/ServiceException.html" title="class in edu.ucsb.nceas.metacat.shared">ServiceException</a></code></dd> </dl> </li> </ul> <a name="runOnce--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>runOnce</h4> <pre>public void runOnce() throws <a href="../../../../../edu/ucsb/nceas/metacat/shared/ServiceException.html" title="class in edu.ucsb.nceas.metacat.shared">ServiceException</a></pre> <dl> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/shared/ServiceException.html" title="class in edu.ucsb.nceas.metacat.shared">ServiceException</a></code></dd> </dl> </li> </ul> <a name="handleServerControlRequest-java.util.Hashtable-javax.servlet.http.HttpServletRequest-javax.servlet.http.HttpServletResponse-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>handleServerControlRequest</h4> <pre>public static void handleServerControlRequest(java.util.Hashtable<java.lang.String,java.lang.String[]> params, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)</pre> <div class="block">This method can add, delete and list the servers currently included in xml_replication. action subaction other needed params --------------------------------------------------------- servercontrol add server servercontrol delete server servercontrol list</div> </li> </ul> <a name="handleForceReplicateRequest-java.util.Hashtable-javax.servlet.http.HttpServletResponse-javax.servlet.http.HttpServletRequest-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>handleForceReplicateRequest</h4> <pre>protected static void handleForceReplicateRequest(java.util.Hashtable<java.lang.String,java.lang.String[]> params, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request)</pre> <div class="block">when a forcereplication request comes in, local host sends a read request to the requesting server (remote server) for the specified docid. Then store it in local database.</div> </li> </ul> <a name="handleForceReplicateDeleteRequest-java.util.Hashtable-javax.servlet.http.HttpServletResponse-javax.servlet.http.HttpServletRequest-boolean-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>handleForceReplicateDeleteRequest</h4> <pre>protected static void handleForceReplicateDeleteRequest(java.util.Hashtable<java.lang.String,java.lang.String[]> params, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request, boolean removeAll)</pre> </li> </ul> <a name="handleForceReplicateDataFileRequest-java.util.Hashtable-javax.servlet.http.HttpServletRequest-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>handleForceReplicateDataFileRequest</h4> <pre>protected static void handleForceReplicateDataFileRequest(java.util.Hashtable<java.lang.String,java.lang.String[]> params, javax.servlet.http.HttpServletRequest request)</pre> <div class="block">when a forcereplication data file request comes in, local host sends a readdata request to the requesting server (remote server) for the specified docid. Then store it in local database and file system</div> </li> </ul> <a name="handleGetLockRequest-java.util.Hashtable-javax.servlet.http.HttpServletResponse-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>handleGetLockRequest</h4> <pre>protected static void handleGetLockRequest(java.util.Hashtable<java.lang.String,java.lang.String[]> params, javax.servlet.http.HttpServletResponse response)</pre> <div class="block">Grants or denies a lock to a requesting host. The servlet parameters of interrest are: docid: the docid of the file the lock is being requested for currentdate: the timestamp of the document on the remote server</div> </li> </ul> <a name="handleGetDocumentInfoRequest-java.util.Hashtable-javax.servlet.http.HttpServletResponse-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>handleGetDocumentInfoRequest</h4> <pre>protected static void handleGetDocumentInfoRequest(java.util.Hashtable<java.lang.String,java.lang.String[]> params, javax.servlet.http.HttpServletResponse response)</pre> <div class="block">Sends all of the xml_documents information encoded in xml to a requestor the format is: <!ELEMENT documentinfo (docid, docname, doctype, doctitle, user_owner, user_updated, home_server, public_access, rev)/> all of the subelements of document info are #PCDATA</div> </li> </ul> <a name="getDocumentInfoMap-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getDocumentInfoMap</h4> <pre>public static java.util.Hashtable<java.lang.String,java.lang.String> getDocumentInfoMap(java.lang.String docid) throws <a href="../../../../../edu/ucsb/nceas/metacat/shared/HandlerException.html" title="class in edu.ucsb.nceas.metacat.shared">HandlerException</a>, <a href="../../../../../edu/ucsb/nceas/metacat/accesscontrol/AccessControlException.html" title="class in edu.ucsb.nceas.metacat.accesscontrol">AccessControlException</a>, org.dataone.exceptions.MarshallingException, java.io.IOException, <a href="../../../../../edu/ucsb/nceas/metacat/McdbException.html" title="class in edu.ucsb.nceas.metacat">McdbException</a>, org.xml.sax.SAXException</pre> <dl> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/shared/HandlerException.html" title="class in edu.ucsb.nceas.metacat.shared">HandlerException</a></code></dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/accesscontrol/AccessControlException.html" title="class in edu.ucsb.nceas.metacat.accesscontrol">AccessControlException</a></code></dd> <dd><code>org.dataone.exceptions.MarshallingException</code></dd> <dd><code>java.io.IOException</code></dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/McdbException.html" title="class in edu.ucsb.nceas.metacat">McdbException</a></code></dd> <dd><code>org.xml.sax.SAXException</code></dd> </dl> </li> </ul> <a name="getDocumentInfo-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getDocumentInfo</h4> <pre>public static java.lang.String getDocumentInfo(java.lang.String docid) throws <a href="../../../../../edu/ucsb/nceas/metacat/accesscontrol/AccessControlException.html" title="class in edu.ucsb.nceas.metacat.accesscontrol">AccessControlException</a>, org.dataone.exceptions.MarshallingException, java.io.IOException, <a href="../../../../../edu/ucsb/nceas/metacat/McdbException.html" title="class in edu.ucsb.nceas.metacat">McdbException</a></pre> <div class="block">Gets a docInfo XML snippet for the replication API</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>docid</code> - </dd> <dt><span class="returnLabel">Returns:</span></dt> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/accesscontrol/AccessControlException.html" title="class in edu.ucsb.nceas.metacat.accesscontrol">AccessControlException</a></code></dd> <dd><code>JiBXException</code></dd> <dd><code>java.io.IOException</code></dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/McdbException.html" title="class in edu.ucsb.nceas.metacat">McdbException</a></code></dd> <dd><code>org.dataone.exceptions.MarshallingException</code></dd> </dl> </li> </ul> <a name="handleGetSystemMetadataRequest-java.util.Hashtable-javax.servlet.http.HttpServletResponse-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>handleGetSystemMetadataRequest</h4> <pre>protected static void handleGetSystemMetadataRequest(java.util.Hashtable<java.lang.String,java.lang.String[]> params, javax.servlet.http.HttpServletResponse response)</pre> <div class="block">Sends System Metadata as XML</div> </li> </ul> <a name="handleForceReplicateSystemMetadataRequest-java.util.Hashtable-javax.servlet.http.HttpServletResponse-javax.servlet.http.HttpServletRequest-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>handleForceReplicateSystemMetadataRequest</h4> <pre>protected static void handleForceReplicateSystemMetadataRequest(java.util.Hashtable<java.lang.String,java.lang.String[]> params, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request)</pre> <div class="block">when a forcereplication request comes in, local host sends a read request to the requesting server (remote server) for the specified docid. Then store it in local database.</div> </li> </ul> <a name="handleGetDataFileRequest-java.io.OutputStream-java.util.Hashtable-javax.servlet.http.HttpServletResponse-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>handleGetDataFileRequest</h4> <pre>protected static void handleGetDataFileRequest(java.io.OutputStream outPut, java.util.Hashtable<java.lang.String,java.lang.String[]> params, javax.servlet.http.HttpServletResponse response)</pre> <div class="block">Sends a datafile to a remote host</div> </li> </ul> <a name="handleGetDocumentRequest-java.util.Hashtable-javax.servlet.http.HttpServletResponse-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>handleGetDocumentRequest</h4> <pre>protected static void handleGetDocumentRequest(java.util.Hashtable<java.lang.String,java.lang.String[]> params, javax.servlet.http.HttpServletResponse response)</pre> <div class="block">Sends a document to a remote host</div> </li> </ul> <a name="handleUpdateRequest-java.util.Hashtable-javax.servlet.http.HttpServletResponse-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>handleUpdateRequest</h4> <pre>protected static void handleUpdateRequest(java.util.Hashtable<java.lang.String,java.lang.String[]> params, javax.servlet.http.HttpServletResponse response)</pre> <div class="block">Sends a list of all of the documents on this sever along with their revision numbers. The format is: <!ELEMENT replication (server, updates)> <!ELEMENT server (#PCDATA)> <!ELEMENT updates ((updatedDocument | deleteDocument | revisionDocument)*)> <!ELEMENT updatedDocument (docid, rev, datafile*)> <!ELEMENT deletedDocument (docid, rev)> <!ELEMENT revisionDocument (docid, rev, datafile*)> <!ELEMENT docid (#PCDATA)> <!ELEMENT rev (#PCDATA)> <!ELEMENT datafile (#PCDATA)> note that the rev in deletedDocument is always empty. I just left it in there to make the parser implementation easier.</div> </li> </ul> <a name="updateUserOwner-edu.ucsb.nceas.metacat.database.DBConnection-java.lang.String-java.lang.String-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>updateUserOwner</h4> <pre>public static void updateUserOwner(<a href="../../../../../edu/ucsb/nceas/metacat/database/DBConnection.html" title="class in edu.ucsb.nceas.metacat.database">DBConnection</a> dbConn, java.lang.String docid, java.lang.String owner, java.lang.String updater) throws java.sql.SQLException</pre> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>dbConn</code> - connection for doing the update</dd> <dd><code>docid</code> - the document id to update</dd> <dd><code>owner</code> - the user_owner</dd> <dd><code>updater</code> - the user_updated</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>java.sql.SQLException</code></dd> </dl> </li> </ul> <a name="getCatalogXML--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getCatalogXML</h4> <pre>public static java.lang.String getCatalogXML()</pre> <div class="block">Returns the xml_catalog table encoded in xml</div> </li> </ul> <a name="handleGetCatalogRequest-java.util.Hashtable-javax.servlet.http.HttpServletResponse-boolean-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>handleGetCatalogRequest</h4> <pre>protected static java.lang.String handleGetCatalogRequest(java.util.Hashtable<java.lang.String,java.lang.String[]> params, javax.servlet.http.HttpServletResponse response, boolean printFlag)</pre> <div class="block">Sends the contents of the xml_catalog table encoded in xml The xml format is: <!ELEMENT xml_catalog (row*)> <!ELEMENT row (entry_type, source_doctype, target_doctype, public_id, system_id)> All of the sub elements of row are #PCDATA If printFlag == false then do not print to out.</div> </li> </ul> <a name="handleGetTimeRequest-java.util.Hashtable-javax.servlet.http.HttpServletResponse-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>handleGetTimeRequest</h4> <pre>protected static void handleGetTimeRequest(java.util.Hashtable<java.lang.String,java.lang.String[]> params, javax.servlet.http.HttpServletResponse response)</pre> <div class="block">Sends the current system date to the remote server. Using this action for replication gets rid of any problems with syncronizing clocks because a time specific to a document is always kept on its home server.</div> </li> </ul> <a name="run--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>run</h4> <pre>public void run()</pre> <div class="block">this method handles the timeout for a file lock. when a lock is granted it is granted for 30 seconds. When this thread runs out it deletes the docid from the queue, thus eliminating the lock.</div> </li> </ul> <a name="getServerNameForServerCode-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getServerNameForServerCode</h4> <pre>public static java.lang.String getServerNameForServerCode(int serverCode)</pre> <div class="block">Returns the name of a server given a serverCode</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>serverCode</code> - the serverid of the server</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>the servername or null if the specified serverCode does not exist.</dd> </dl> </li> </ul> <a name="getServerCodeForServerName-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getServerCodeForServerName</h4> <pre>public static int getServerCodeForServerName(java.lang.String server) throws <a href="../../../../../edu/ucsb/nceas/metacat/shared/ServiceException.html" title="class in edu.ucsb.nceas.metacat.shared">ServiceException</a></pre> <div class="block">Returns a server code given a server name</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>server</code> - the name of the server</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>integer > 0 representing the code of the server, 0 if the server does not exist.</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/shared/ServiceException.html" title="class in edu.ucsb.nceas.metacat.shared">ServiceException</a></code></dd> </dl> </li> </ul> <a name="getServerCodes--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getServerCodes</h4> <pre>public static java.util.Map<java.lang.Integer,java.lang.String> getServerCodes() throws <a href="../../../../../edu/ucsb/nceas/metacat/shared/ServiceException.html" title="class in edu.ucsb.nceas.metacat.shared">ServiceException</a></pre> <div class="block">Returns a Map of serverCode=serverName</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>Map of server codes to names (URIs)</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/shared/ServiceException.html" title="class in edu.ucsb.nceas.metacat.shared">ServiceException</a></code></dd> </dl> </li> </ul> <a name="getHomeServerInfoForDocId-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getHomeServerInfoForDocId</h4> <pre>public static java.util.Hashtable<java.lang.String,java.lang.String> getHomeServerInfoForDocId(java.lang.String docId)</pre> <div class="block">Method to get a host server information for given docid</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>conn</code> - a connection to the database</dd> </dl> </li> </ul> <a name="getHomeServerCodeForDocId-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getHomeServerCodeForDocId</h4> <pre>public static int getHomeServerCodeForDocId(java.lang.String accNum) throws <a href="../../../../../edu/ucsb/nceas/metacat/shared/ServiceException.html" title="class in edu.ucsb.nceas.metacat.shared">ServiceException</a></pre> <div class="block">Returns a home server location given a accnum</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>accNum</code> - , given accNum for a document</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/shared/ServiceException.html" title="class in edu.ucsb.nceas.metacat.shared">ServiceException</a></code></dd> </dl> </li> </ul> <a name="getURLContent-java.net.URL-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getURLContent</h4> <pre>public static java.lang.String getURLContent(java.net.URL u) throws java.lang.Exception</pre> <div class="block">This method returns the content of a url</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>u</code> - the url to return the content from</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>a string representing the content of the url</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>java.io.IOException</code></dd> <dd><code>java.lang.Exception</code></dd> </dl> </li> </ul> <a name="getURLStream-java.net.URL-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getURLStream</h4> <pre>public static java.io.InputStream getURLStream(java.net.URL u) throws java.lang.Exception</pre> <div class="block">This method returns the InputStream after opening a url</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>u</code> - the url to return the content from</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>a InputStream representing the content of the url</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>java.io.IOException</code></dd> <dd><code>java.lang.Exception</code></dd> </dl> </li> </ul> <a name="getURLBytes-java.net.URL-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getURLBytes</h4> <pre>public static byte[] getURLBytes(java.net.URL u) throws java.lang.Exception</pre> <div class="block">This method returns a byte array after opening a url</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>u</code> - the url to return the content from</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>a InputStream representing the content of the url</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>java.io.IOException</code></dd> <dd><code>java.lang.Exception</code></dd> </dl> </li> </ul> <a name="replToServer-java.lang.String-"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>replToServer</h4> <pre>public static boolean replToServer(java.lang.String server)</pre> <div class="block">Returns true if the replicate field for server in xml_replication is 1. Returns false otherwise</div> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/ReplicationService.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationServerList.html" title="class in edu.ucsb.nceas.metacat.replication"><span class="typeNameLink">Prev Class</span></a></li> <li><a href="../../../../../edu/ucsb/nceas/metacat/replication/ReplicationServlet.html" title="class in edu.ucsb.nceas.metacat.replication"><span class="typeNameLink">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?edu/ucsb/nceas/metacat/replication/ReplicationService.html" target="_top">Frames</a></li> <li><a href="ReplicationService.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary: </li> <li>Nested | </li> <li><a href="#field.summary">Field</a> | </li> <li>Constr | </li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail: </li> <li><a href="#field.detail">Field</a> | </li> <li>Constr | </li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small><i>Copyright © 2020 Regents of the University of California. All Rights Reserved.</i></small></p> </body> </html>