<!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:51 UTC 2020 --> <title>MetacatClient (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="MetacatClient (MetaCat API)"; } } catch(err) { } //--> var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":9,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":9,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10}; 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/MetacatClient.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/client/MetacatAuthException.html" title="class in edu.ucsb.nceas.metacat.client"><span class="typeNameLink">Prev Class</span></a></li> <li><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client"><span class="typeNameLink">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?edu/ucsb/nceas/metacat/client/MetacatClient.html" target="_top">Frames</a></li> <li><a href="MetacatClient.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>Field | </li> <li><a href="#constructor.summary">Constr</a> | </li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail: </li> <li>Field | </li> <li><a href="#constructor.detail">Constr</a> | </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.client</div> <h2 title="Class MetacatClient" class="title">Class MetacatClient</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li>edu.ucsb.nceas.metacat.client.MetacatClient</li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <dl> <dt>All Implemented Interfaces:</dt> <dd><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html" title="interface in edu.ucsb.nceas.metacat.client">Metacat</a></dd> </dl> <hr> <br> <pre>public class <span class="typeNameLabel">MetacatClient</span> extends java.lang.Object implements <a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html" title="interface in edu.ucsb.nceas.metacat.client">Metacat</a></pre> <div class="block">This interface provides methods for initializing and logging in to a Metacat server, and then querying, reading, transforming, inserting, updating and deleting documents from that server.</div> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor.summary"> <!-- --> </a> <h3>Constructor Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd"> </span></caption> <tr> <th class="colFirst" scope="col">Modifier</th> <th class="colLast" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colFirst"><code>protected </code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#MetacatClient--">MetacatClient</a></span>()</code> <div class="block">Constructor to create a new instance.</div> </td> </tr> </table> </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>java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#delete-java.lang.String-">delete</a></span>(java.lang.String docid)</code> <div class="block">Delete an XML document in the repository.</div> </td> </tr> <tr id="i1" class="rowColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#getAccessControl-java.lang.String-">getAccessControl</a></span>(java.lang.String docid)</code> <div class="block">get the access control info for a given document id.</div> </td> </tr> <tr id="i2" class="altColor"> <td class="colFirst"><code>java.util.Vector</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#getAllDocids-java.lang.String-">getAllDocids</a></span>(java.lang.String scope)</code> <div class="block">return a list of all docids that match a given scope.</div> </td> </tr> <tr id="i3" class="rowColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#getEncoding--">getEncoding</a></span>()</code> <div class="block">Returns the character encoding used used when communicating with Metacat.</div> </td> </tr> <tr id="i4" class="altColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#getLastDocid-java.lang.String-">getLastDocid</a></span>(java.lang.String scope)</code> <div class="block">Return the highest document id for a given scope.</div> </td> </tr> <tr id="i5" class="rowColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#getloggedinuserinfo--">getloggedinuserinfo</a></span>()</code> <div class="block">Method used to log in to a metacat server.</div> </td> </tr> <tr id="i6" class="altColor"> <td class="colFirst"><code>static <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html" title="class in edu.ucsb.nceas.metacat.client">MetacatClient</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#getMetacatClient-javax.servlet.http.HttpServletRequest-">getMetacatClient</a></span>(javax.servlet.http.HttpServletRequest request)</code> <div class="block">JSP API: This is a convenience method to reduce the amount of code in a Metacat Client JSP.</div> </td> </tr> <tr id="i7" class="rowColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#getNewestDocRevision-java.lang.String-">getNewestDocRevision</a></span>(java.lang.String docId)</code> <div class="block">The method will return the latest revision in metacat server for a given document id.</div> </td> </tr> <tr id="i8" class="altColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#getSessionId--">getSessionId</a></span>()</code> <div class="block">Get the session identifier for this session.</div> </td> </tr> <tr id="i9" class="rowColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#insert-java.lang.String-java.io.Reader-java.io.Reader-">insert</a></span>(java.lang.String docid, java.io.Reader xmlDocument, java.io.Reader schema)</code> <div class="block">Insert an XML document into the repository.</div> </td> </tr> <tr id="i10" class="altColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#isAuthorized-java.lang.String-java.lang.String-java.lang.String-">isAuthorized</a></span>(java.lang.String resourceLsid, java.lang.String permission, java.lang.String sessionId)</code> <div class="block">Method used to log in to a metacat server.</div> </td> </tr> <tr id="i11" class="rowColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#isRegistered-java.lang.String-">isRegistered</a></span>(java.lang.String docid)</code> <div class="block">return true of the given docid is registered, false if not</div> </td> </tr> <tr id="i12" class="altColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#login-java.lang.String-java.lang.String-">login</a></span>(java.lang.String username, java.lang.String password)</code> <div class="block">Method used to log in to a metacat server.</div> </td> </tr> <tr id="i13" class="rowColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#logout--">logout</a></span>()</code> <div class="block">Method used to log out a metacat server.</div> </td> </tr> <tr id="i14" class="altColor"> <td class="colFirst"><code>static void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#main-java.lang.String:A-">main</a></span>(java.lang.String[] args)</code> </td> </tr> <tr id="i15" class="rowColor"> <td class="colFirst"><code>java.io.Reader</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#query-java.io.Reader-">query</a></span>(java.io.Reader xmlQuery)</code> <div class="block">Query the metacat document store with the given metacat-compatible query document and default qformat xml, and return the result set as a Reader.</div> </td> </tr> <tr id="i16" class="altColor"> <td class="colFirst"><code>java.io.Reader</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#query-java.io.Reader-java.lang.String-">query</a></span>(java.io.Reader xmlQuery, java.lang.String qformat)</code> <div class="block">Query the metacat document store with the given metacat-compatible query document and qformat, and return the result set as a Reader.</div> </td> </tr> <tr id="i17" class="rowColor"> <td class="colFirst"><code>java.io.InputStream</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#read-java.lang.String-">read</a></span>(java.lang.String docid)</code> <div class="block">Read an XML document from the metacat server session, accessed by docid, and returned as a Reader.</div> </td> </tr> <tr id="i18" class="altColor"> <td class="colFirst"><code>java.io.InputStream</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#readInlineData-java.lang.String-">readInlineData</a></span>(java.lang.String inlinedataid)</code> <div class="block">Read inline data from the metacat server session, accessed by inlinedataid and returned as a Reader.</div> </td> </tr> <tr id="i19" class="rowColor"> <td class="colFirst"><code>java.io.InputStream</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#sendParameters-java.util.Properties-">sendParameters</a></span>(java.util.Properties prop)</code> <div class="block">Send a request to Metacat.</div> </td> </tr> <tr id="i20" class="altColor"> <td class="colFirst"><code>java.io.InputStream</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#sendParametersInverted-java.util.Properties-">sendParametersInverted</a></span>(java.util.Properties prop)</code> <div class="block">Send a request to Metacat.</div> </td> </tr> <tr id="i21" class="rowColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#setAccess-java.lang.String-java.lang.String-">setAccess</a></span>(java.lang.String docid, java.lang.String accessBlock)</code> <div class="block">Set access for a given doc id.</div> </td> </tr> <tr id="i22" class="altColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#setAccess-java.lang.String-java.lang.String-java.lang.String-java.lang.String-java.lang.String-">setAccess</a></span>(java.lang.String docid, java.lang.String principal, java.lang.String permission, java.lang.String permType, java.lang.String permOrder)</code> <div class="block">set the access on an XML document in the repository.</div> </td> </tr> <tr id="i23" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#setEncoding-java.lang.String-">setEncoding</a></span>(java.lang.String encoding)</code> <div class="block">Returns the character encoding used used when communicating with Metacat.</div> </td> </tr> <tr id="i24" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#setMetacatUrl-java.lang.String-">setMetacatUrl</a></span>(java.lang.String metacatUrl)</code> <div class="block">When the MetacatFactory creates an instance it needs to set the MetacatUrl to which connections should be made.</div> </td> </tr> <tr id="i25" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#setSessionId-java.lang.String-">setSessionId</a></span>(java.lang.String sessionId)</code> <div class="block">Set the session identifier for this session.</div> </td> </tr> <tr id="i26" class="altColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#update-java.lang.String-java.io.Reader-java.io.Reader-">update</a></span>(java.lang.String docid, java.io.Reader xmlDocument, java.io.Reader schema)</code> <div class="block">Update an XML document in the repository.</div> </td> </tr> <tr id="i27" class="rowColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#upload-java.lang.String-java.io.File-">upload</a></span>(java.lang.String docid, java.io.File file)</code> <div class="block">Upload a data document into the repository.</div> </td> </tr> <tr id="i28" class="altColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#upload-java.lang.String-java.lang.String-java.io.InputStream-int-">upload</a></span>(java.lang.String docid, java.lang.String filename, java.io.InputStream fileData, int size)</code> <div class="block">Upload a data document into the repository.</div> </td> </tr> <tr id="i29" class="rowColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html#validateSession-java.lang.String-">validateSession</a></span>(java.lang.String sessionId)</code> <div class="block">Method used to log in to a metacat server.</div> </td> </tr> </table> <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"> <!-- ========= CONSTRUCTOR DETAIL ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor.detail"> <!-- --> </a> <h3>Constructor Detail</h3> <a name="MetacatClient--"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>MetacatClient</h4> <pre>protected MetacatClient()</pre> <div class="block">Constructor to create a new instance. Protected because instances should only be created by the factory MetacatFactory.</div> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method.detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="main-java.lang.String:A-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>main</h4> <pre>public static void main(java.lang.String[] args)</pre> </li> </ul> <a name="login-java.lang.String-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>login</h4> <pre>public java.lang.String login(java.lang.String username, java.lang.String password) throws <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatAuthException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatAuthException</a>, <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></pre> <div class="block">Method used to log in to a metacat server. Implementations will need to cache a cookie value to make the session persistent. Each time a call is made to one of the other methods (e.g., read), the cookie will need to be passed back to the metacat server along with the request.</div> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html#login-java.lang.String-java.lang.String-">login</a></code> in interface <code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html" title="interface in edu.ucsb.nceas.metacat.client">Metacat</a></code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>username</code> - the username of the user, like an LDAP DN</dd> <dd><code>password</code> - the password for that user for authentication</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>the response string from metacat in XML format</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatAuthException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatAuthException</a></code> - when the username/password could not be authenticated</dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></code></dd> </dl> </li> </ul> <a name="getloggedinuserinfo--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getloggedinuserinfo</h4> <pre>public java.lang.String getloggedinuserinfo() throws <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></pre> <div class="block">Method used to log in to a metacat server. Implementations will need to cache a cookie value to make the session persistent. Each time a call is made to one of the other methods (e.g., read), the cookie will need to be passed back to the metacat server along with the request.</div> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html#getloggedinuserinfo--">getloggedinuserinfo</a></code> in interface <code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html" title="interface in edu.ucsb.nceas.metacat.client">Metacat</a></code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>username</code> - the username of the user, like an LDAP DN</dd> <dd><code>password</code> - the password for that user for authentication</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>the response string from metacat in XML format</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatAuthException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatAuthException</a></code> - when the username/password could not be authenticated</dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></code></dd> </dl> </li> </ul> <a name="logout--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>logout</h4> <pre>public java.lang.String logout() throws <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a>, <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a></pre> <div class="block">Method used to log out a metacat server. The Metacat server will end the session when this call is invoked.</div> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html#logout--">logout</a></code> in interface <code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html" title="interface in edu.ucsb.nceas.metacat.client">Metacat</a></code></dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>the response string from metacat in XML format</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></code> - when the metacat server can not be reached or does not respond</dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a></code></dd> </dl> </li> </ul> <a name="validateSession-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>validateSession</h4> <pre>public java.lang.String validateSession(java.lang.String sessionId) throws <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatAuthException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatAuthException</a>, <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></pre> <div class="block">Method used to log in to a metacat server. Implementations will need to cache a cookie value to make the session persistent. Each time a call is made to one of the other methods (e.g., read), the cookie will need to be passed back to the metacat server along with the request.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>username</code> - the username of the user, like an LDAP DN</dd> <dd><code>password</code> - the password for that user for authentication</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>the response string from metacat in XML format</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatAuthException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatAuthException</a></code> - when the username/password could not be authenticated</dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></code></dd> </dl> </li> </ul> <a name="isAuthorized-java.lang.String-java.lang.String-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>isAuthorized</h4> <pre>public java.lang.String isAuthorized(java.lang.String resourceLsid, java.lang.String permission, java.lang.String sessionId) throws <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatAuthException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatAuthException</a>, <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></pre> <div class="block">Method used to log in to a metacat server. Implementations will need to cache a cookie value to make the session persistent. Each time a call is made to one of the other methods (e.g., read), the cookie will need to be passed back to the metacat server along with the request.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>username</code> - the username of the user, like an LDAP DN</dd> <dd><code>password</code> - the password for that user for authentication</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>the response string from metacat in XML format</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatAuthException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatAuthException</a></code> - when the username/password could not be authenticated</dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></code></dd> </dl> </li> </ul> <a name="read-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>read</h4> <pre>public java.io.InputStream read(java.lang.String docid) throws <a href="../../../../../edu/ucsb/nceas/metacat/client/InsufficientKarmaException.html" title="class in edu.ucsb.nceas.metacat.client">InsufficientKarmaException</a>, <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a>, <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a>, <a href="../../../../../edu/ucsb/nceas/metacat/client/DocumentNotFoundException.html" title="class in edu.ucsb.nceas.metacat.client">DocumentNotFoundException</a></pre> <div class="block">Read an XML document from the metacat server session, accessed by docid, and returned as a Reader.</div> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html#read-java.lang.String-">read</a></code> in interface <code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html" title="interface in edu.ucsb.nceas.metacat.client">Metacat</a></code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>docid</code> - the identifier of the document to be read</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>a Reader for accessing the document</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/InsufficientKarmaException.html" title="class in edu.ucsb.nceas.metacat.client">InsufficientKarmaException</a></code> - when the user has insufficent rights for the operation</dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></code> - when the metacat server can not be reached or does not respond</dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a></code> - when the metacat server generates another error</dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/DocumentNotFoundException.html" title="class in edu.ucsb.nceas.metacat.client">DocumentNotFoundException</a></code></dd> </dl> </li> </ul> <a name="readInlineData-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>readInlineData</h4> <pre>public java.io.InputStream readInlineData(java.lang.String inlinedataid) throws <a href="../../../../../edu/ucsb/nceas/metacat/client/InsufficientKarmaException.html" title="class in edu.ucsb.nceas.metacat.client">InsufficientKarmaException</a>, <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a>, <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a></pre> <div class="block">Read inline data from the metacat server session, accessed by inlinedataid and returned as a Reader.</div> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html#readInlineData-java.lang.String-">readInlineData</a></code> in interface <code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html" title="interface in edu.ucsb.nceas.metacat.client">Metacat</a></code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>inlinedataid</code> - the identifier of the data to be read</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>a Reader for accessing the document</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/InsufficientKarmaException.html" title="class in edu.ucsb.nceas.metacat.client">InsufficientKarmaException</a></code> - when the user has insufficent rights for the operation</dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></code> - when the metacat server can not be reached or does not respond</dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a></code> - when the metacat server generates another error</dd> </dl> </li> </ul> <a name="query-java.io.Reader-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>query</h4> <pre>public java.io.Reader query(java.io.Reader xmlQuery) throws <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a>, java.io.IOException</pre> <div class="block">Query the metacat document store with the given metacat-compatible query document and default qformat xml, and return the result set as a Reader.</div> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html#query-java.io.Reader-">query</a></code> in interface <code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html" title="interface in edu.ucsb.nceas.metacat.client">Metacat</a></code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>xmlQuery</code> - a Reader for accessing the XML version of the query</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>a Reader for accessing the result set</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></code></dd> <dd><code>java.io.IOException</code></dd> </dl> </li> </ul> <a name="query-java.io.Reader-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>query</h4> <pre>public java.io.Reader query(java.io.Reader xmlQuery, java.lang.String qformat) throws <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a>, java.io.IOException</pre> <div class="block">Query the metacat document store with the given metacat-compatible query document and qformat, and return the result set as a Reader.</div> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html#query-java.io.Reader-java.lang.String-">query</a></code> in interface <code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html" title="interface in edu.ucsb.nceas.metacat.client">Metacat</a></code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>xmlQuery</code> - a Reader for accessing the XML version of the query</dd> <dd><code>qformat</code> - the format of return doc. It can be xml, knb, lter and etal.</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>a Reader for accessing the result set</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></code></dd> <dd><code>java.io.IOException</code></dd> </dl> </li> </ul> <a name="insert-java.lang.String-java.io.Reader-java.io.Reader-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>insert</h4> <pre>public java.lang.String insert(java.lang.String docid, java.io.Reader xmlDocument, java.io.Reader schema) throws <a href="../../../../../edu/ucsb/nceas/metacat/client/InsufficientKarmaException.html" title="class in edu.ucsb.nceas.metacat.client">InsufficientKarmaException</a>, <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a>, java.io.IOException, <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></pre> <div class="block">Insert an XML document into the repository.</div> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html#insert-java.lang.String-java.io.Reader-java.io.Reader-">insert</a></code> in interface <code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html" title="interface in edu.ucsb.nceas.metacat.client">Metacat</a></code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>docid</code> - the docid to insert the document</dd> <dd><code>xmlDocument</code> - a Reader for accessing the XML document to be inserted</dd> <dd><code>schema</code> - a Reader for accessing the DTD or XML Schema for the document</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>the metacat response message</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/InsufficientKarmaException.html" title="class in edu.ucsb.nceas.metacat.client">InsufficientKarmaException</a></code> - when the user has insufficent rights for the operation</dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></code> - when the metacat server can not be reached or does not respond</dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a></code> - when the metacat server generates another error</dd> <dd><code>java.io.IOException</code> - when there is an error reading the xml document</dd> </dl> </li> </ul> <a name="update-java.lang.String-java.io.Reader-java.io.Reader-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>update</h4> <pre>public java.lang.String update(java.lang.String docid, java.io.Reader xmlDocument, java.io.Reader schema) throws <a href="../../../../../edu/ucsb/nceas/metacat/client/InsufficientKarmaException.html" title="class in edu.ucsb.nceas.metacat.client">InsufficientKarmaException</a>, <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a>, java.io.IOException, <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></pre> <div class="block">Update an XML document in the repository.</div> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html#update-java.lang.String-java.io.Reader-java.io.Reader-">update</a></code> in interface <code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html" title="interface in edu.ucsb.nceas.metacat.client">Metacat</a></code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>docid</code> - the docid to update</dd> <dd><code>xmlDocument</code> - a Reader for accessing the XML text to be updated</dd> <dd><code>schema</code> - a Reader for accessing the DTD or XML Schema for the document</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>the metacat response message</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/InsufficientKarmaException.html" title="class in edu.ucsb.nceas.metacat.client">InsufficientKarmaException</a></code> - when the user has insufficent rights for the operation</dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></code> - when the metacat server can not be reached or does not respond</dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a></code> - when the metacat server generates another error</dd> <dd><code>java.io.IOException</code> - when there is an error reading the xml document</dd> </dl> </li> </ul> <a name="upload-java.lang.String-java.io.File-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>upload</h4> <pre>public java.lang.String upload(java.lang.String docid, java.io.File file) throws <a href="../../../../../edu/ucsb/nceas/metacat/client/InsufficientKarmaException.html" title="class in edu.ucsb.nceas.metacat.client">InsufficientKarmaException</a>, <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a>, java.io.IOException, <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></pre> <div class="block">Upload a data document into the repository. Data files are stored on metacat and may be in any format (binary or text), but they are all treated as if they were binary. Data files are not searched by the query() methods because they are not loaded into the XML store because they are not XML documents. The File parameter is used to determine a name for the uploaded document.</div> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html#upload-java.lang.String-java.io.File-">upload</a></code> in interface <code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html" title="interface in edu.ucsb.nceas.metacat.client">Metacat</a></code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>docid</code> - the identifier to be used for the document</dd> <dd><code>file</code> - the File to be uploaded</dd> <dd><code>document</code> - a InputStream containing the data to be uploaded</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>the metacat response message</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/InsufficientKarmaException.html" title="class in edu.ucsb.nceas.metacat.client">InsufficientKarmaException</a></code> - when the user has insufficent rights for the operation</dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></code> - when the metacat server can not be reached or does not respond</dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a></code> - when the metacat server generates another error</dd> <dd><code>java.io.IOException</code> - when there is an error reading the xml document</dd> </dl> </li> </ul> <a name="upload-java.lang.String-java.lang.String-java.io.InputStream-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>upload</h4> <pre>public java.lang.String upload(java.lang.String docid, java.lang.String filename, java.io.InputStream fileData, int size) throws <a href="../../../../../edu/ucsb/nceas/metacat/client/InsufficientKarmaException.html" title="class in edu.ucsb.nceas.metacat.client">InsufficientKarmaException</a>, <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a>, java.io.IOException, <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></pre> <div class="block">Upload a data document into the repository. Data files are stored on metacat and may be in any format (binary or text), but they are all treated as if they were binary. Data files are not searched by the query() methods because they are not loaded into the XML store because they are not XML documents. The name for the document is set explicitly using the filename parameter.</div> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html#upload-java.lang.String-java.lang.String-java.io.InputStream-int-">upload</a></code> in interface <code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html" title="interface in edu.ucsb.nceas.metacat.client">Metacat</a></code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>docid</code> - the identifier to be used for the document</dd> <dd><code>filename</code> - the name to be used in the MIME description of the uploaded file</dd> <dd><code>document</code> - a InputStream containing the data to be uploaded</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>the metacat response message</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/InsufficientKarmaException.html" title="class in edu.ucsb.nceas.metacat.client">InsufficientKarmaException</a></code> - when the user has insufficent rights for the operation</dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></code> - when the metacat server can not be reached or does not respond</dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a></code> - when the metacat server generates another error</dd> <dd><code>java.io.IOException</code> - when there is an error reading the xml document</dd> </dl> </li> </ul> <a name="delete-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>delete</h4> <pre>public java.lang.String delete(java.lang.String docid) throws <a href="../../../../../edu/ucsb/nceas/metacat/client/InsufficientKarmaException.html" title="class in edu.ucsb.nceas.metacat.client">InsufficientKarmaException</a>, <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a>, <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></pre> <div class="block">Delete an XML document in the repository.</div> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html#delete-java.lang.String-">delete</a></code> in interface <code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html" title="interface in edu.ucsb.nceas.metacat.client">Metacat</a></code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>docid</code> - the docid to delete</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>the metacat response message</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/InsufficientKarmaException.html" title="class in edu.ucsb.nceas.metacat.client">InsufficientKarmaException</a></code> - when the user has insufficent rights for the operation</dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></code> - when the metacat server can not be reached or does not respond</dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a></code> - when the metacat server generates another error</dd> </dl> </li> </ul> <a name="getAccessControl-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getAccessControl</h4> <pre>public java.lang.String getAccessControl(java.lang.String docid) throws <a href="../../../../../edu/ucsb/nceas/metacat/client/InsufficientKarmaException.html" title="class in edu.ucsb.nceas.metacat.client">InsufficientKarmaException</a>, <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a>, <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></pre> <div class="block">get the access control info for a given document id.</div> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html#getAccessControl-java.lang.String-">getAccessControl</a></code> in interface <code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html" title="interface in edu.ucsb.nceas.metacat.client">Metacat</a></code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>_docid</code> - the docid of the document for which the access should be applied.</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>the metacat access xml</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/InsufficientKarmaException.html" title="class in edu.ucsb.nceas.metacat.client">InsufficientKarmaException</a></code></dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a></code></dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></code></dd> </dl> </li> </ul> <a name="setAccess-java.lang.String-java.lang.String-java.lang.String-java.lang.String-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setAccess</h4> <pre>public java.lang.String setAccess(java.lang.String docid, java.lang.String principal, java.lang.String permission, java.lang.String permType, java.lang.String permOrder) throws <a href="../../../../../edu/ucsb/nceas/metacat/client/InsufficientKarmaException.html" title="class in edu.ucsb.nceas.metacat.client">InsufficientKarmaException</a>, <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a>, <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></pre> <div class="block">set the access on an XML document in the repository.</div> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html#setAccess-java.lang.String-java.lang.String-java.lang.String-java.lang.String-java.lang.String-">setAccess</a></code> in interface <code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html" title="interface in edu.ucsb.nceas.metacat.client">Metacat</a></code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>_docid</code> - the docid of the document for which the access should be applied.</dd> <dd><code>_principal</code> - the document's principal</dd> <dd><code>_permission</code> - the access permission to be applied to the docid {e.g. read,write,all}</dd> <dd><code>_permType</code> - the permission type to be applied to the document {e.g. allow or deny}</dd> <dd><code>_permOrder</code> - the order that the document's permissions should be processed {e.g. denyFirst or allowFirst}</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>the metacat response message</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/InsufficientKarmaException.html" title="class in edu.ucsb.nceas.metacat.client">InsufficientKarmaException</a></code> - when the user has insufficent rights for the operation</dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></code> - when the metacat server can not be reached or does not respond</dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a></code> - when the metacat server generates another error</dd> </dl> </li> </ul> <a name="setAccess-java.lang.String-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setAccess</h4> <pre>public java.lang.String setAccess(java.lang.String docid, java.lang.String accessBlock) throws <a href="../../../../../edu/ucsb/nceas/metacat/client/InsufficientKarmaException.html" title="class in edu.ucsb.nceas.metacat.client">InsufficientKarmaException</a>, <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a>, <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></pre> <div class="block">Set access for a given doc id. The access is represented in an access block of xml. All existing access will be replaced with the access provided in the access block.</div> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html#setAccess-java.lang.String-java.lang.String-">setAccess</a></code> in interface <code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html" title="interface in edu.ucsb.nceas.metacat.client">Metacat</a></code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>docid</code> - the doc id for the doc we want to update</dd> <dd><code>accessBlock</code> - the xml access block. This is the same structure as that returned by the getdocumentinfo action in metacat.</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>a string holding the response xml</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/InsufficientKarmaException.html" title="class in edu.ucsb.nceas.metacat.client">InsufficientKarmaException</a></code></dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a></code></dd> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></code></dd> </dl> </li> </ul> <a name="setMetacatUrl-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setMetacatUrl</h4> <pre>public void setMetacatUrl(java.lang.String metacatUrl)</pre> <div class="block">When the MetacatFactory creates an instance it needs to set the MetacatUrl to which connections should be made.</div> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html#setMetacatUrl-java.lang.String-">setMetacatUrl</a></code> in interface <code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html" title="interface in edu.ucsb.nceas.metacat.client">Metacat</a></code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>metacatUrl</code> - the URL for the metacat server</dd> </dl> </li> </ul> <a name="getSessionId--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getSessionId</h4> <pre>public java.lang.String getSessionId()</pre> <div class="block">Get the session identifier for this session. This is only valid if the login methods has been called successfully for this Metacat object beforehand.</div> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html#getSessionId--">getSessionId</a></code> in interface <code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html" title="interface in edu.ucsb.nceas.metacat.client">Metacat</a></code></dd> </dl> </li> </ul> <a name="setSessionId-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>setSessionId</h4> <pre>public void setSessionId(java.lang.String sessionId)</pre> <div class="block">Set the session identifier for this session. This identifier was previously established with a call to login. To continue to use the same session, set the session id before making a call to one of the metacat access methods (e.g., read, query, insert, etc.).</div> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html#setSessionId-java.lang.String-">setSessionId</a></code> in interface <code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html" title="interface in edu.ucsb.nceas.metacat.client">Metacat</a></code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>String</code> - the sessionId from a previously established session</dd> </dl> </li> </ul> <a name="getNewestDocRevision-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getNewestDocRevision</h4> <pre>public int getNewestDocRevision(java.lang.String docId) throws <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a></pre> <div class="block">The method will return the latest revision in metacat server for a given document id. If some error happens, this method will throw an exception.</div> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html#getNewestDocRevision-java.lang.String-">getNewestDocRevision</a></code> in interface <code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html" title="interface in edu.ucsb.nceas.metacat.client">Metacat</a></code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>docId</code> - String the given docid you want to use. the docid it self can have or haven't revision number</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a></code></dd> </dl> </li> </ul> <a name="getLastDocid-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getLastDocid</h4> <pre>public java.lang.String getLastDocid(java.lang.String scope) throws <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a></pre> <div class="block">Return the highest document id for a given scope. This is used by clients to make it easier to determine the next free identifier in a sequence for a given scope.</div> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html#getLastDocid-java.lang.String-">getLastDocid</a></code> in interface <code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html" title="interface in edu.ucsb.nceas.metacat.client">Metacat</a></code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>scope</code> - String the scope to use for looking up the latest id</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a></code> - when an error occurs</dd> </dl> </li> </ul> <a name="getAllDocids-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getAllDocids</h4> <pre>public java.util.Vector getAllDocids(java.lang.String scope) throws <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a></pre> <div class="block">return a list of all docids that match a given scope. if scope is null return all docids registered in the system</div> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html#getAllDocids-java.lang.String-">getAllDocids</a></code> in interface <code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html" title="interface in edu.ucsb.nceas.metacat.client">Metacat</a></code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>scope</code> - String the scope to use to limit the docid query</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a></code> - when an error occurs</dd> </dl> </li> </ul> <a name="isRegistered-java.lang.String-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>isRegistered</h4> <pre>public boolean isRegistered(java.lang.String docid) throws <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a></pre> <div class="block">return true of the given docid is registered, false if not</div> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html#isRegistered-java.lang.String-">isRegistered</a></code> in interface <code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html" title="interface in edu.ucsb.nceas.metacat.client">Metacat</a></code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>scope</code> - String the scope to use to limit the docid query</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatException</a></code> - when an error occurs</dd> </dl> </li> </ul> <a name="sendParameters-java.util.Properties-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>sendParameters</h4> <pre>public java.io.InputStream sendParameters(java.util.Properties prop) throws java.lang.Exception</pre> <div class="block">Send a request to Metacat. An alternative to the sentData method. Allows for sending multiple parameters with the same name, different names, or any combo. Send properties where the entry key contains the "param key", and the entry value contains the "param value". Constraint: no multi-valued parameters are supported</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>args</code> - Properties of the parameters to be sent to Metacat, where, key = param key value = param value</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>InputStream as returned by Metacat</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>java.lang.Exception</code> - thrown</dd> </dl> </li> </ul> <a name="sendParametersInverted-java.util.Properties-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>sendParametersInverted</h4> <pre>public java.io.InputStream sendParametersInverted(java.util.Properties prop) throws java.lang.Exception</pre> <div class="block">Send a request to Metacat. NOTE: Send properties where the entry key contains the "param value", and the entry value contains the "param name". Constraint: param values must be unique.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>args</code> - Properties of the parameters to be sent to Metacat, where, key = param value value = param name</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>InputStream as returned by Metacat</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>java.lang.Exception</code> - thrown</dd> </dl> </li> </ul> <a name="getMetacatClient-javax.servlet.http.HttpServletRequest-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getMetacatClient</h4> <pre>public static <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatClient.html" title="class in edu.ucsb.nceas.metacat.client">MetacatClient</a> getMetacatClient(javax.servlet.http.HttpServletRequest request) throws <a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></pre> <div class="block">JSP API: This is a convenience method to reduce the amount of code in a Metacat Client JSP. It handles creating/reusing an instance of a MetacatClient.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>request</code> - Since this is intended to be used by a JSP, it is passed the available "request" variable (the HttpServletRequest).</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>MetacatClient instance.</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatInaccessibleException.html" title="class in edu.ucsb.nceas.metacat.client">MetacatInaccessibleException</a></code> - Received by MetacatFactory.</dd> </dl> </li> </ul> <a name="getEncoding--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getEncoding</h4> <pre>public java.lang.String getEncoding()</pre> <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html#getEncoding--">Metacat</a></code></span></div> <div class="block">Returns the character encoding used used when communicating with Metacat.</div> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html#getEncoding--">getEncoding</a></code> in interface <code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html" title="interface in edu.ucsb.nceas.metacat.client">Metacat</a></code></dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>character encoding name</dd> </dl> </li> </ul> <a name="setEncoding-java.lang.String-"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>setEncoding</h4> <pre>public void setEncoding(java.lang.String encoding)</pre> <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html#setEncoding-java.lang.String-">Metacat</a></code></span></div> <div class="block">Returns the character encoding used used when communicating with Metacat.</div> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html#setEncoding-java.lang.String-">setEncoding</a></code> in interface <code><a href="../../../../../edu/ucsb/nceas/metacat/client/Metacat.html" title="interface in edu.ucsb.nceas.metacat.client">Metacat</a></code></dd> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>encoding</code> - The encoding (i.e. "UTF-8")</dd> </dl> </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/MetacatClient.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/client/MetacatAuthException.html" title="class in edu.ucsb.nceas.metacat.client"><span class="typeNameLink">Prev Class</span></a></li> <li><a href="../../../../../edu/ucsb/nceas/metacat/client/MetacatException.html" title="class in edu.ucsb.nceas.metacat.client"><span class="typeNameLink">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?edu/ucsb/nceas/metacat/client/MetacatClient.html" target="_top">Frames</a></li> <li><a href="MetacatClient.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>Field | </li> <li><a href="#constructor.summary">Constr</a> | </li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail: </li> <li>Field | </li> <li><a href="#constructor.detail">Constr</a> | </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>