Project

General

Profile

« Previous | Next » 

Revision 4604

Added by daigle over 15 years ago

Update metacat api documentation

View differences:

src/edu/ucsb/nceas/metacat/MetaCatServlet.java
98 98
 *
99 99
 * <p>
100 100
 * Valid parameters are: <br>
101
 * action=query -- query the values of all elements and attributes and return a
102
 * result set of nodes <br>
101
 * action=query -- query the values of all elements and attributes and return a result set of nodes <br>
102
 * action=spatial_query -- run a spatial query.  these queries may include any of the
103
 *      queries supported by the WFS / WMS standards
103 104
 * action=squery -- structured query (see pathquery.dtd) <br>
104
 * action= -- export a zip format for data packadge <br>
105
 * action=read -- read any metadata/data file from Metacat and from Internet
106
 * <br>
105
 * action=export -- export a zip format for data packadge <br>
106
 * action=read -- read any metadata/data file from Metacat and from Internet<br>
107
 * action=readinlinedata -- read inline data only<br>
107 108
 * action=insert -- insert an XML document into the database store <br>
108 109
 * action=insertmultipart -- insert an xml document into the database using multipart encoding<br>
109 110
 * action=update -- update an XML document that is in the database store <br>
110 111
 * action=delete -- delete an XML document from the database store <br>
112
 * action=setaccess -- change access permissions for a user on a document. <br>
111 113
 * action=validate -- vallidate the xml contained in valtext <br>
112 114
 * doctype -- document type list returned by the query (publicID) <br>
113 115
 * qformat=xml -- display resultset from query in XML <br>
......
117 119
 * doctext -- XML text of the document to load into the database <br>
118 120
 * acltext -- XML access text for a document to load into the database <br>
119 121
 * dtdtext -- XML DTD text for a new DTD to load into Metacat XML Catalog <br>
120
 * query -- actual query text (to go with 'action=query' or 'action=squery')
121
 * <br>
122
 * query -- actual query text (to go with 'action=query' or 'action=squery')<br>
122 123
 * valtext -- XML text to be validated <br>
123 124
 * action=getaccesscontrol -- retrieve acl info for Metacat document <br>
124 125
 * action=getalldocids -- retrieves a list of all docids registered with the system<br>
125 126
 * scope --can limit the query by the scope of the id
126 127
 * action=isregistered -- checks to see if the provided docid is registered<br>
128
 * action=getrevisionanddoctype -- get a document's revision and doctype from database 
129
 * action=getversion -- 
127 130
 * docid --the docid to check
128 131
 * action=getdoctypes -- retrieve all doctypes (publicID) <br>
129 132
 * action=getdtdschema -- retrieve a DTD or Schema file <br>
130 133
 * action=getdataguide -- retrieve a Data Guide <br>
131
 * action=getprincipals -- retrieve a list of principals in XML <br>
134
 * action=getprincipals -- retrieve a list of principals in XML <br> 
132 135
 * datadoc -- data document name (id) <br>
133 136
 * action=getlog -- get a report of events that have occurred in the system<br>
137
 * action=getloggedinuserinfo -- get user info for the currently logged in user<br>
134 138
 * ipAddress --  filter on one or more IP addresses<br>
135 139
 * principal -- filter on one or more principals (LDAP DN syntax)<br>
136 140
 * docid -- filter on one or more document identifiers (with revision)<br>
......
2562 2566
        
2563 2567
    }
2564 2568
    
2569
    /**
2570
     * Check if the document is registered in either the xml_documents or xml_revisions table
2571
     * @param out the writer to write the xml results to
2572
     * @param params request parameters
2573
     * @param response the http servlet response
2574
     */
2565 2575
    private void handleIdIsRegisteredAction(PrintWriter out, Hashtable<String, String[]> params,
2566 2576
            HttpServletResponse response) {
2567 2577
        String id = null;
docs/user/metacatapi.html
98 98
      <td>Perform a structured query.</td>
99 99
    </tr>
100 100
    <tr>
101
      <td>spatial_query</td>
102
      <td>
103
      <ul>
104
        <li>xmax - max x spacial coordinate</li>
105
        <li>ymax - max y spacial coordinate</li>
106
        <li>xmin - min x spacial coordinate</li>
107
        <li>ymin - min y spacial coordinate</li>
108
      </ul>
109
      </td>
110
      <td>Perform a spatial query.  These queries may include any of the 
111
          queries supported by the WFS / WMS standards.</td>
112
    </tr>
113
    <tr>
101 114
      <td>read</td>
102 115
      <td>
103 116
      <ul>
......
109 122
      <td>Get docid from the database and return it in qformat form.</td>
110 123
    </tr>
111 124
    <tr>
125
      <td>readinlinedata</td>
126
      <td>
127
      <ul>
128
        <li>inlinedataid - the id of the inline data to read</li>
129
      </ul>
130
      </td>
131
      <td>Read inline data only.</td>
132
    </tr>
133
    <tr>
112 134
      <td>insert</td>
113 135
      <td>
114 136
        <ul>
......
119 141
      <td>Insert an XML document into the database.</td>
120 142
    </tr>
121 143
    <tr>
144
      <td>insertmultipart</td>
145
      <td>
146
        <ul>
147
          <li>docid - the user defined docid to assign to the new XML document.</li>
148
          <li>doctext - the text of the XML document to insert</li>
149
        </ul>
150
      </td>
151
      <td>insert an xml document into the database using multipart encoding.</td>
152
    </tr>
153
    <tr>
122 154
      <td>update</td>
123 155
      <td>
124 156
      <ul>
......
151 183
      <td>Delete the specified docid from the database.</td>
152 184
    </tr>
153 185
    <tr>
186
      <td>setaccess</td>
187
      <td>
188
        <ul>
189
          <li>docid - the docid of the document whose access we want to change</li>
190
          <li>principal - the user or group whose permissions want to change</li>
191
          <li>permission - the permission we want to set (read, write, all)</li>
192
          <li>permType - the type of permission to set (allow, deny)</li>
193
          <li>permOrder - the order to apply the permission (allowFirst, denyFirst)</li>
194
        </ul>
195
      </td>
196
      <td>Change access permissions for a user on a document.</td>
197
    </tr>
198
    <tr>
154 199
      <td>validate</td>
155 200
      <td>
156 201
      <ul>
......
208 253
      <td>Get the latest docid with rev number used by user.</td>
209 254
    </tr>
210 255
    <tr>
256
      <td>getalldocids</td>
257
      <td>
258
        <ul>
259
          <li>scope - a string used to match a range of docids in a SQL LIKE statement.</td>
260
        </ul>
261
      </td>
262
      <td>retrieves a list of all docids registered with the system.</td>
263
    </tr>
264
    <tr>
265
      <td>isregistered</td>
266
      <td>
267
        <ul>
268
          <li>docid - the docid of the document to check for.</td>
269
        </ul>
270
      </td>
271
      <td>checks if an individual document exists in either the xml_documents
272
          or xml_revisions tables.</td>
273
    </tr>
274
    <tr>
275
      <td>getrevisionanddoctype</td>
276
      <td>
277
        <ul>
278
          <li>docid - the docid of the document to check for.</td>
279
        </ul>
280
      </td>
281
      <td>Return the revision and doctype of a document. The output is String 
282
      that looks like "rev;doctype"</td>
283
    </tr>
284
    <tr>
285
      <td>getversion - get Metacat version.</td>
286
      <td>none</td>
287
      <td>Returns the current version of Metacat as XML.</td>
288
    </tr>
289
    <tr>
211 290
      <td>protocoltest</td>
212 291
      <td>
213 292
        <ul>
......
219 298
    <tr>
220 299
      <td>export</td>
221 300
      <td>
222
        <li>docid - the docid of the package you wish to export</li>
301
        <ul>
302
          <li>docid - the docid of the package you wish to export</li>
303
        </ul>
223 304
      </td>
224 305
      <td>
225 306
        Exports a data package in a zip file.
226 307
      </td>
227 308
    </tr>
309
    <tr>
310
      <td>getlog</td>
311
      <td>
312
        <ul>
313
            <li>ipaddress - the internet protocol address for the event</li>
314
            <li>principal - the principal for the event (a username, etc)</li>
315
            <li>docid - the identifier of the document to which the event applies</li>
316
            <li>event - the string code for the event</li>
317
            <li>start - beginning of date range for query</li>
318
            <li>end - end of date range for query</li>
319
        </ul>
320
      </td>
321
      <td>Print a report from the Metacat event log.</td>
322
    </tr>
323
    <tr>
324
      <td>getloggedinuserinfo</td>
325
      <td>none</td>
326
      <td>Get user info for the currently logged in user.</td>
327
    </tr>
228 328
  </table>
229 329
  
230 330
  <br>

Also available in: Unified diff