1
|
<!--
|
2
|
* Metacatapi.html
|
3
|
*
|
4
|
* Authors: Jivka Bojilova
|
5
|
* Copyright: 2000 Regents of the University of California and the
|
6
|
* National Center for Ecological Analysis and Synthesis
|
7
|
* For Details: http://www.nceas.ucsb.edu/
|
8
|
* Created: 2000 April 5
|
9
|
* Version: 0.01
|
10
|
* File Info: '$Id: metacatapi.html 985 2002-04-08 17:21:45Z berkley $'
|
11
|
*
|
12
|
* October Meeting SDSC, 2000
|
13
|
-->
|
14
|
<HTML>
|
15
|
<HEAD>
|
16
|
<TITLE>Metacat</TITLE>
|
17
|
<link rel="stylesheet" type="text/css" href="@docrooturl@default.css">
|
18
|
</HEAD>
|
19
|
<BODY>
|
20
|
<table width="100%">
|
21
|
<tr>
|
22
|
<td class="tablehead" colspan="2"><p class="label">Metacat High Level API</p></td>
|
23
|
<td class="tablehead" colspan="2" align="right">
|
24
|
<a href="./metacatout.html">Back</a> | <a href="./metacattour.html">Home</a> |
|
25
|
<a href="./packages.html">Next</a>
|
26
|
</td>
|
27
|
</tr>
|
28
|
</table>
|
29
|
<p>
|
30
|
<b>Multiple client interface</b> <br>
|
31
|
Since Metacat Servlet is a subclass of HttpServlet, this allows any client
|
32
|
to communicate with Metacat by essentially passing a URL with embedded
|
33
|
servlet parameters.
|
34
|
Metacat Servlet provides an HTTP Interface and can handle GET and POST
|
35
|
requests. HTTP requests are sent from the the Client application and contain
|
36
|
a number of parameters. These parameters, in form of name/value pairs, provide
|
37
|
input data for the Servlet and also provide the Servlet any extra information it
|
38
|
needs to handle the request. </p>
|
39
|
<P> <b>Extensions of HttpServlet</b> <br>
|
40
|
Metacat Server adds the functionality for writing, quering, and reading of
|
41
|
XML stored in the Metacat Database as well functions for validating and
|
42
|
transforming XML documents. </p>
|
43
|
<b>MetacatServlet Parameters</b>
|
44
|
<table border="1">
|
45
|
<tr>
|
46
|
<td><b>Action</b></td>
|
47
|
<td><b>Supplemental Parameters</b></td>
|
48
|
<td><b>Description</b></td>
|
49
|
</tr>
|
50
|
<tr>
|
51
|
<td>login</td>
|
52
|
<td>
|
53
|
<ul>
|
54
|
<li>username - the user's login name</li>
|
55
|
<li>password - the user's password</li>
|
56
|
</ul>
|
57
|
</td>
|
58
|
<td>Log the user in.</td>
|
59
|
</tr>
|
60
|
<tr>
|
61
|
<td>logout</td>
|
62
|
<td>none</td>
|
63
|
<td>Log the current user out and destroy the associated session.</td>
|
64
|
</tr>
|
65
|
<tr>
|
66
|
<td>query</td>
|
67
|
<td>
|
68
|
<ul>
|
69
|
<li>returndoctype - the doctype that you wish to use for your
|
70
|
<a href="./packages.html">Package View</a></li>
|
71
|
<li>qformat - the format that you wish to return the resultset in.
|
72
|
Possible values are 'html' or 'xml'.</li>
|
73
|
<li>querytitle - OPTIONAL - the title of the query</li>
|
74
|
<li>doctype - OPTIONAL - if doctype is specified, the search is limited
|
75
|
only to the doctype(s) specified.</li>
|
76
|
<li>returnfield - a custom field to be returned by any hit document.
|
77
|
This is explained in more detail in <a href="./metacatquery.html">
|
78
|
Queries and Results</a>.</li>
|
79
|
<li>operator - the boolean operator to apply to the query - Possible
|
80
|
values are: UNION or INTERSECT</li>
|
81
|
<li>searchmode - the type of search to be performed. Possible values
|
82
|
are: contains, starts-with, ends-with, equals, isnot-equal, greater-than,
|
83
|
less-than, greater-than-equals, less-than-equals.</li>
|
84
|
<li>anyfield - a freetext search variable. A value placed in this
|
85
|
parameter will be searched for in any document in any node.</li>
|
86
|
</ul>
|
87
|
</td>
|
88
|
<td>Perform a free text query.</td>
|
89
|
</tr>
|
90
|
<tr>
|
91
|
<td>squery</td>
|
92
|
<td>
|
93
|
<ul>
|
94
|
<li>query - the text of the pathquery document that is being sent to the
|
95
|
server</li>
|
96
|
</ul>
|
97
|
</td>
|
98
|
<td>Perform a structured query.</td>
|
99
|
</tr>
|
100
|
<tr>
|
101
|
<td>read</td>
|
102
|
<td>
|
103
|
<ul>
|
104
|
<li>docid - the docid of the document to read</li>
|
105
|
<li>qformat - the format to return the document in. Possible values
|
106
|
are: html, xml</li>
|
107
|
</ul>
|
108
|
</td>
|
109
|
<td>Get docid from the database and return it in qformat form.</td>
|
110
|
</tr>
|
111
|
<tr>
|
112
|
<td>insert</td>
|
113
|
<td>
|
114
|
<ul>
|
115
|
<li>docid - the user defined docid to assign to the new document.</li>
|
116
|
<li>doctext - the text of the document to insert</li>
|
117
|
</ul>
|
118
|
</td>
|
119
|
<td>Insert doctext into the database.</td>
|
120
|
</tr>
|
121
|
<tr>
|
122
|
<td>update</td>
|
123
|
<td>
|
124
|
<ul>
|
125
|
<li>docid - the docid of the document to update</li>
|
126
|
<li>doctext - the text with which to update the document</li>
|
127
|
</ul>
|
128
|
</td>
|
129
|
<td>Overwrite a document with a new one and give the new one
|
130
|
the same docid but with next revision number.</td>
|
131
|
</tr>
|
132
|
<tr>
|
133
|
<td>delete</td>
|
134
|
<td>
|
135
|
<ul>
|
136
|
<li>docid - the docid of the document to delete</li>
|
137
|
</ul>
|
138
|
</td>
|
139
|
<td>Delete the specified docid from the database.</td>
|
140
|
</tr>
|
141
|
<tr>
|
142
|
<td>validate</td>
|
143
|
<td>
|
144
|
<ul>
|
145
|
<li>docid - the docid of the document to validate</li>
|
146
|
<li>valtext - the DTD by which to validate this document</li>
|
147
|
</ul>
|
148
|
</td>
|
149
|
<td>Validate docid against its DTD.</td>
|
150
|
</tr>
|
151
|
<tr>
|
152
|
<td>getaccesscontrol</td>
|
153
|
<td>
|
154
|
<ul>
|
155
|
<li>docid - the docid of the document to get the ACL for</li>
|
156
|
</ul>
|
157
|
</td>
|
158
|
<td>Get ACL for document with that docid</td>
|
159
|
</tr>
|
160
|
<tr>
|
161
|
<td>getprincipals</td>
|
162
|
<td>none</td>
|
163
|
<td>Get all users and groups in the current authentication schema</td>
|
164
|
</tr>
|
165
|
<tr>
|
166
|
<td>getdoctypes</td>
|
167
|
<td>none</td>
|
168
|
<td>Get all doctypes currently available in Metacat Catalog System.</td>
|
169
|
</tr>
|
170
|
<tr>
|
171
|
<td>getdtdschema</td>
|
172
|
<td>
|
173
|
<ul>
|
174
|
<li>doctype - the doctype which DTD or XMLSchema file to read.</td>
|
175
|
</ul>
|
176
|
</td>
|
177
|
<td>Read DTD or XMLSchema file for the specified doctype.</td>
|
178
|
</tr>
|
179
|
<tr>
|
180
|
<td>getdataguide</td>
|
181
|
<td>
|
182
|
<ul>
|
183
|
<li>doctype - the doctype for which to get the data guide</li> <br>
|
184
|
<i><b> Deprecated. </b></i> Use getdtdschema action instead.
|
185
|
</ul>
|
186
|
</td>
|
187
|
<td>Read a dataguide for doctype.</td>
|
188
|
</tr>
|
189
|
<tr>
|
190
|
<td>getlastdocid</td>
|
191
|
<td>
|
192
|
<ul>
|
193
|
<li>username - the user's login name which last docid to get.</td>
|
194
|
</ul>
|
195
|
</td>
|
196
|
<td>Get the latest docid with rev number used by user.</td>
|
197
|
</tr>
|
198
|
<tr>
|
199
|
<td>protocoltest</td>
|
200
|
<td>
|
201
|
<ul>
|
202
|
<li>url - the url to test against the protocol handler</li>
|
203
|
</ul>
|
204
|
</td>
|
205
|
<td>Test the protocol handlers installed for metacat:// URLs.</td>
|
206
|
</tr>
|
207
|
<tr>
|
208
|
<td>export</td>
|
209
|
<td>
|
210
|
<li>docid - the docid of the package you wish to export</li>
|
211
|
</td>
|
212
|
<td>
|
213
|
Exports a data package in a zip file.
|
214
|
</td>
|
215
|
</tr>
|
216
|
</table>
|
217
|
|
218
|
<br>
|
219
|
<b><a href="./replication.html">MetacatReplication</a> Parameters</b>
|
220
|
<table border="1">
|
221
|
<tr>
|
222
|
<td><b>Action</b></td>
|
223
|
<td><b>Supplemental Parameters</b></td>
|
224
|
<td><b>Description</b></td>
|
225
|
</tr>
|
226
|
<tr>
|
227
|
<td>forcereplicate</td>
|
228
|
<td>
|
229
|
<ul>
|
230
|
<li>server - The server to which this document is being sent</li>
|
231
|
<li>docid - The docid of the document to send</li>
|
232
|
<li>dbaction - DEFAULTS TO UPDATE - The action to perform on the
|
233
|
document. INSERT or UPDATE.</li>
|
234
|
</ul>
|
235
|
</td>
|
236
|
<td>Force this server to get docid from the remote host.</td>
|
237
|
</tr>
|
238
|
<tr>
|
239
|
<td>getall</td>
|
240
|
<td>none</td>
|
241
|
<td>Forces the local server to check all known servers for updated
|
242
|
documents.</td>
|
243
|
</tr>
|
244
|
<tr>
|
245
|
<td>getcatalog</td>
|
246
|
<td>none</td>
|
247
|
<td>Sends the contents of the xml_catalog table encoded in XML.</td>
|
248
|
</tr>
|
249
|
<tr>
|
250
|
<td>getlock</td>
|
251
|
<td>
|
252
|
<ul>
|
253
|
<li>docid - the docid to get the lock for</li>
|
254
|
<li>updaterev - the revision number of docid</li>
|
255
|
</ul>
|
256
|
</td>
|
257
|
<td>Request a lock on docid.</td>
|
258
|
</tr>
|
259
|
<tr>
|
260
|
<td>gettime</td>
|
261
|
<td>none</td>
|
262
|
<td>Return the local time on this server.</td>
|
263
|
</tr>
|
264
|
<tr>
|
265
|
<td>servercontrol</td>
|
266
|
<td>
|
267
|
<ul>
|
268
|
<li>subaction - The replication control to be performed. Possible
|
269
|
values:
|
270
|
<ul>
|
271
|
<li>add - add a new server to the replication list</li>
|
272
|
<li>delete - remove a server from the replication list</li>
|
273
|
<li>list - list all of the servers currently in the server list</li>
|
274
|
</ul>
|
275
|
<li>replicate - a boolean flag (1 or 0) which determines if this
|
276
|
server is to copy files from the newly added server.</li>
|
277
|
<li>server - the server to add/delete</li>
|
278
|
</ul>
|
279
|
</td>
|
280
|
<td>Perform subaction on the Replication daemon.</td>
|
281
|
</tr>
|
282
|
<tr>
|
283
|
<td>read</td>
|
284
|
<td>
|
285
|
<ul>
|
286
|
<li>docid - the docid to read</li>
|
287
|
</ul>
|
288
|
</td>
|
289
|
<td>Sends docid to the remote host.</td>
|
290
|
</tr>
|
291
|
<tr>
|
292
|
<td>start</td>
|
293
|
<td>
|
294
|
<ul>
|
295
|
<li>rate - DEFAULTS TO 1000 - The rate (in seconds) at which you want
|
296
|
the replication daemon to check for updated documents. The value
|
297
|
cannot be less than 30.</li>
|
298
|
</ul>
|
299
|
</td>
|
300
|
<td>Start the Replication daemon with a time interval of deltaT.</td>
|
301
|
</tr>
|
302
|
<tr>
|
303
|
<td>stop</td>
|
304
|
<td>none</td>
|
305
|
<td>Stop the Replication daemon.</td>
|
306
|
</tr>
|
307
|
<tr>
|
308
|
<td>update</td>
|
309
|
<td>none</td>
|
310
|
<td>Send a list of all documents on the local server along with their
|
311
|
revision numbers.</td>
|
312
|
</tr>
|
313
|
</table>
|
314
|
<br>
|
315
|
<a href="./metacatout.html">Back</a> | <a href="./metacattour.html">Home</a> |
|
316
|
<a href="./packages.html">Next</a>
|
317
|
</BODY>
|
318
|
</HTML>
|
319
|
|