r4604 - in trunk: docs/user src/edu/ucsb/nceas/metacat

daigle at ecoinformatics.org daigle at ecoinformatics.org
Thu Nov 20 11:51:01 PST 2008


Author: daigle
Date: 2008-11-20 11:51:01 -0800 (Thu, 20 Nov 2008)
New Revision: 4604

Modified:
   trunk/docs/user/metacatapi.html
   trunk/src/edu/ucsb/nceas/metacat/MetaCatServlet.java
Log:
Update metacat api documentation

Modified: trunk/docs/user/metacatapi.html
===================================================================
--- trunk/docs/user/metacatapi.html	2008-11-20 19:50:31 UTC (rev 4603)
+++ trunk/docs/user/metacatapi.html	2008-11-20 19:51:01 UTC (rev 4604)
@@ -98,6 +98,19 @@
       <td>Perform a structured query.</td>
     </tr>
     <tr>
+      <td>spatial_query</td>
+      <td>
+      <ul>
+        <li>xmax - max x spacial coordinate</li>
+        <li>ymax - max y spacial coordinate</li>
+        <li>xmin - min x spacial coordinate</li>
+        <li>ymin - min y spacial coordinate</li>
+      </ul>
+      </td>
+      <td>Perform a spatial query.  These queries may include any of the 
+          queries supported by the WFS / WMS standards.</td>
+    </tr>
+    <tr>
       <td>read</td>
       <td>
       <ul>
@@ -109,6 +122,15 @@
       <td>Get docid from the database and return it in qformat form.</td>
     </tr>
     <tr>
+      <td>readinlinedata</td>
+      <td>
+      <ul>
+        <li>inlinedataid - the id of the inline data to read</li>
+      </ul>
+      </td>
+      <td>Read inline data only.</td>
+    </tr>
+    <tr>
       <td>insert</td>
       <td>
         <ul>
@@ -119,6 +141,16 @@
       <td>Insert an XML document into the database.</td>
     </tr>
     <tr>
+      <td>insertmultipart</td>
+      <td>
+        <ul>
+          <li>docid - the user defined docid to assign to the new XML document.</li>
+          <li>doctext - the text of the XML document to insert</li>
+        </ul>
+      </td>
+      <td>insert an xml document into the database using multipart encoding.</td>
+    </tr>
+    <tr>
       <td>update</td>
       <td>
       <ul>
@@ -151,6 +183,19 @@
       <td>Delete the specified docid from the database.</td>
     </tr>
     <tr>
+      <td>setaccess</td>
+      <td>
+        <ul>
+          <li>docid - the docid of the document whose access we want to change</li>
+          <li>principal - the user or group whose permissions want to change</li>
+          <li>permission - the permission we want to set (read, write, all)</li>
+          <li>permType - the type of permission to set (allow, deny)</li>
+          <li>permOrder - the order to apply the permission (allowFirst, denyFirst)</li>
+        </ul>
+      </td>
+      <td>Change access permissions for a user on a document.</td>
+    </tr>
+    <tr>
       <td>validate</td>
       <td>
       <ul>
@@ -208,6 +253,40 @@
       <td>Get the latest docid with rev number used by user.</td>
     </tr>
     <tr>
+      <td>getalldocids</td>
+      <td>
+        <ul>
+          <li>scope - a string used to match a range of docids in a SQL LIKE statement.</td>
+        </ul>
+      </td>
+      <td>retrieves a list of all docids registered with the system.</td>
+    </tr>
+    <tr>
+      <td>isregistered</td>
+      <td>
+        <ul>
+          <li>docid - the docid of the document to check for.</td>
+        </ul>
+      </td>
+      <td>checks if an individual document exists in either the xml_documents
+          or xml_revisions tables.</td>
+    </tr>
+    <tr>
+      <td>getrevisionanddoctype</td>
+      <td>
+        <ul>
+          <li>docid - the docid of the document to check for.</td>
+        </ul>
+      </td>
+      <td>Return the revision and doctype of a document. The output is String 
+      that looks like "rev;doctype"</td>
+    </tr>
+    <tr>
+      <td>getversion - get Metacat version.</td>
+      <td>none</td>
+      <td>Returns the current version of Metacat as XML.</td>
+    </tr>
+    <tr>
       <td>protocoltest</td>
       <td>
         <ul>
@@ -219,12 +298,33 @@
     <tr>
       <td>export</td>
       <td>
-        <li>docid - the docid of the package you wish to export</li>
+        <ul>
+          <li>docid - the docid of the package you wish to export</li>
+        </ul>
       </td>
       <td>
         Exports a data package in a zip file.
       </td>
     </tr>
+    <tr>
+      <td>getlog</td>
+      <td>
+        <ul>
+            <li>ipaddress - the internet protocol address for the event</li>
+            <li>principal - the principal for the event (a username, etc)</li>
+            <li>docid - the identifier of the document to which the event applies</li>
+            <li>event - the string code for the event</li>
+            <li>start - beginning of date range for query</li>
+            <li>end - end of date range for query</li>
+        </ul>
+      </td>
+      <td>Print a report from the Metacat event log.</td>
+    </tr>
+    <tr>
+      <td>getloggedinuserinfo</td>
+      <td>none</td>
+      <td>Get user info for the currently logged in user.</td>
+    </tr>
   </table>
   
   <br>

Modified: trunk/src/edu/ucsb/nceas/metacat/MetaCatServlet.java
===================================================================
--- trunk/src/edu/ucsb/nceas/metacat/MetaCatServlet.java	2008-11-20 19:50:31 UTC (rev 4603)
+++ trunk/src/edu/ucsb/nceas/metacat/MetaCatServlet.java	2008-11-20 19:51:01 UTC (rev 4604)
@@ -98,16 +98,18 @@
  *
  * <p>
  * Valid parameters are: <br>
- * action=query -- query the values of all elements and attributes and return a
- * result set of nodes <br>
+ * action=query -- query the values of all elements and attributes and return a result set of nodes <br>
+ * action=spatial_query -- run a spatial query.  these queries may include any of the
+ *      queries supported by the WFS / WMS standards
  * action=squery -- structured query (see pathquery.dtd) <br>
- * action= -- export a zip format for data packadge <br>
- * action=read -- read any metadata/data file from Metacat and from Internet
- * <br>
+ * action=export -- export a zip format for data packadge <br>
+ * action=read -- read any metadata/data file from Metacat and from Internet<br>
+ * action=readinlinedata -- read inline data only<br>
  * action=insert -- insert an XML document into the database store <br>
  * action=insertmultipart -- insert an xml document into the database using multipart encoding<br>
  * action=update -- update an XML document that is in the database store <br>
  * action=delete -- delete an XML document from the database store <br>
+ * action=setaccess -- change access permissions for a user on a document. <br>
  * action=validate -- vallidate the xml contained in valtext <br>
  * doctype -- document type list returned by the query (publicID) <br>
  * qformat=xml -- display resultset from query in XML <br>
@@ -117,20 +119,22 @@
  * doctext -- XML text of the document to load into the database <br>
  * acltext -- XML access text for a document to load into the database <br>
  * dtdtext -- XML DTD text for a new DTD to load into Metacat XML Catalog <br>
- * query -- actual query text (to go with 'action=query' or 'action=squery')
- * <br>
+ * query -- actual query text (to go with 'action=query' or 'action=squery')<br>
  * valtext -- XML text to be validated <br>
  * action=getaccesscontrol -- retrieve acl info for Metacat document <br>
  * action=getalldocids -- retrieves a list of all docids registered with the system<br>
  * scope --can limit the query by the scope of the id
  * action=isregistered -- checks to see if the provided docid is registered<br>
+ * action=getrevisionanddoctype -- get a document's revision and doctype from database 
+ * action=getversion -- 
  * docid --the docid to check
  * action=getdoctypes -- retrieve all doctypes (publicID) <br>
  * action=getdtdschema -- retrieve a DTD or Schema file <br>
  * action=getdataguide -- retrieve a Data Guide <br>
- * action=getprincipals -- retrieve a list of principals in XML <br>
+ * action=getprincipals -- retrieve a list of principals in XML <br> 
  * datadoc -- data document name (id) <br>
  * action=getlog -- get a report of events that have occurred in the system<br>
+ * action=getloggedinuserinfo -- get user info for the currently logged in user<br>
  * ipAddress --  filter on one or more IP addresses<br>
  * principal -- filter on one or more principals (LDAP DN syntax)<br>
  * docid -- filter on one or more document identifiers (with revision)<br>
@@ -2562,6 +2566,12 @@
         
     }
     
+    /**
+     * Check if the document is registered in either the xml_documents or xml_revisions table
+     * @param out the writer to write the xml results to
+     * @param params request parameters
+     * @param response the http servlet response
+     */
     private void handleIdIsRegisteredAction(PrintWriter out, Hashtable<String, String[]> params,
             HttpServletResponse response) {
         String id = null;



More information about the Metacat-cvs mailing list