Project

General

Profile

« Previous | Next » 

Revision 5018

Added by daigle over 15 years ago

Updated comments to more accurately reflect the API

View differences:

src/edu/ucsb/nceas/metacat/MetaCatServlet.java
109 109
/**
110 110
 * A metadata catalog server implemented as a Java Servlet
111 111
 *
112
 * <p>
113
 * Valid parameters are: <br>
114
 * action=query -- query the values of all elements and attributes and return a result set of nodes <br>
112
 * Valid actions are:
113
 * 
114
 * action=login
115
 *     username
116
 *     password
117
 *     qformat
118
 * action=logout
119
 *     qformat
120
 * action=query -- query the values of all elements and attributes and return a result set of nodes
121
 *     meta_file_id --
122
 *     returndoctype --
123
 *     filterdoctype --
124
 *     returnfield --
125
 *     owner --
126
 *     site --
127
 *     operator --
128
 *     casesensitive --
129
 *     searchmode --
130
 *     anyfield --
115 131
 * action=spatial_query -- run a spatial query.  these queries may include any of the
116
 *      queries supported by the WFS / WMS standards
117
 * action=squery -- structured query (see pathquery.dtd) <br>
118
 * action=export -- export a zip format for data packadge <br>
119
 * action=read -- read any metadata/data file from Metacat and from Internet<br>
120
 * action=readinlinedata -- read inline data only<br>
121
 * action=insert -- insert an XML document into the database store <br>
122
 * action=insertmultipart -- insert an xml document into the database using multipart encoding<br>
123
 * action=update -- update an XML document that is in the database store <br>
124
 * action=delete -- delete an XML document from the database store <br>
125
 * action=setaccess -- change access permissions for a user on a document. <br>
126
 * action=validate -- vallidate the xml contained in valtext <br>
127
 * doctype -- document type list returned by the query (publicID) <br>
128
 * qformat=xml -- display resultset from query in XML <br>
129
 * qformat=html -- display resultset from query in HTML <br>
130
 * qformat=zip -- zip resultset from query <br>
131
 * docid=34 -- display the document with the document ID number 34 <br>
132
 * doctext -- XML text of the document to load into the database <br>
133
 * acltext -- XML access text for a document to load into the database <br>
134
 * dtdtext -- XML DTD text for a new DTD to load into Metacat XML Catalog <br>
135
 * query -- actual query text (to go with 'action=query' or 'action=squery')<br>
136
 * valtext -- XML text to be validated <br>
137
 * action=getaccesscontrol -- retrieve acl info for Metacat document <br>
138
 * action=getalldocids -- retrieves a list of all docids registered with the system<br>
139
 * scope --can limit the query by the scope of the id
140
 * action=isregistered -- checks to see if the provided docid is registered<br>
132
 *     queries supported by the WFS / WMS standards
133
 *     xmax --
134
 *     ymax --
135
 *     xmin --
136
 *     ymin --
137
 *     skin --
138
 *     pagesize --
139
 *     pagestart --
140
 * action=squery -- structured query (see pathquery.dtd)
141
 *     query --
142
 *     pagesize --
143
 *     pagestart --
144
 * action=export -- export a zip format for data packadge
145
 *     docid -- 
146
 * action=read -- read any metadata/data file from Metacat and from Internet
147
 *     archiveEntryName --
148
 *     docid --
149
 *     qformat --
150
 *     metadatadocid --
151
 * action=readinlinedata -- read inline data only
152
 *     inlinedataid
153
 * action=insert -- insert an XML document into the database store
154
 *     qformat -- 
155
 *     docid --
156
 *     doctext --
157
 *     dtdtext --
158
 * action=insertmultipart -- insert an xml document into the database using multipart encoding
159
 *     qformat -- 
160
 *     docid --
161
 * action=update -- update an XML document that is in the database store
162
 *     qformat -- 
163
 *     docid --
164
 *     doctext --
165
 *     dtdtext --
166
 * action=delete -- delete an XML document from the database store
167
 *     docid --
168
 * action=validate -- validate the xml contained in valtext
169
 *     valtext --
170
 *     docid --
171
 * action=setaccess -- change access permissions for a user on a document.
172
 *     docid --
173
 *     principal --
174
 *     permission --
175
 *     permType --
176
 *     permOrder --
177
 * action=getaccesscontrol -- retrieve acl info for Metacat document
178
 *     docid -- 
179
 * action=getprincipals -- retrieve a list of principals in XML
180
 * action=getalldocids -- retrieves a list of all docids registered with the system
181
 *     scope --
182
 * action=getlastdocid --
183
 *     scope --
184
 *     username --
185
 * action=isregistered -- checks to see if the provided docid is registered
186
 *     docid --
141 187
 * action=getrevisionanddoctype -- get a document's revision and doctype from database 
188
 *     docid --
142 189
 * action=getversion -- 
143
 * docid --the docid to check
144
 * action=getdoctypes -- retrieve all doctypes (publicID) <br>
145
 * action=getdtdschema -- retrieve a DTD or Schema file <br>
146
 * action=getdataguide -- retrieve a Data Guide <br>
147
 * action=getprincipals -- retrieve a list of principals in XML <br> 
148
 * datadoc -- data document name (id) <br>
149
 * action=getlog -- get a report of events that have occurred in the system<br>
150
 * action=getloggedinuserinfo -- get user info for the currently logged in user<br>
151
 * ipAddress --  filter on one or more IP addresses<br>
152
 * principal -- filter on one or more principals (LDAP DN syntax)<br>
153
 * docid -- filter on one or more document identifiers (with revision)<br>
154
 * event -- filter on event type (e.g., read, insert, update, delete)<br>
155
 * start -- filter out events before the start date-time<br>
156
 * end -- filter out events before the end date-time<br>
157
 * <p>
158
 * The particular combination of parameters that are valid for each particular
159
 * action value is quite specific. This documentation will be reorganized to
160
 * reflect this information.
190
 * action=getdoctypes -- retrieve all doctypes (publicID) 
191
 * action=getdtdschema -- retrieve a DTD or Schema file
192
 *     doctype --
193
 * action=getlog -- get a report of events that have occurred in the system
194
 *     ipAddress --  filter on one or more IP addresses>
195
 *     principal -- filter on one or more principals (LDAP DN syntax)
196
 *     docid -- filter on one or more document identifiers (with revision)
197
 *     event -- filter on event type (e.g., read, insert, update, delete)
198
 *     start -- filter out events before the start date-time
199
 *     end -- filter out events before the end date-time
200
 * action=getloggedinuserinfo -- get user info for the currently logged in user
201
 *     ipAddress --  filter on one or more IP addresses>
202
 *     principal -- filter on one or more principals (LDAP DN syntax)
203
 *     docid -- filter on one or more document identifiers (with revision)
204
 *     event -- filter on event type (e.g., read, insert, update, delete)
205
 *     start -- filter out events before the start date-time
206
 *     end -- filter out events before the end date-time
207
 * action=shrink --
208
 * action=buildindex --
209
 *     docid --
210
 * action=gohome --
211
 * action=refreshServices --
212
 * action=scheduleWorkflow --
213
 *     delay --
214
 *     starttime --
215
 *     endtime --
216
 *     intervalvalue -- 
217
 *     intervalunit --
218
 *     workflowid --
219
 *     karid --
220
 *     workflowname --
221
 *     forwardto --
222
 *     qformat --
223
 * action=unscheduleWorkflow --
224
 *     workflowjobid --
225
 *     forwardto --
226
 *     qformat --
227
 * action=rescheduleWorkflow --
228
 *     workflowjobid --
229
 *     forwardto --
230
 *     qformat --
231
 * action=deleteScheduledWorkflow --
232
 *     workflowjobid --
233
 *     forwardto --
234
 *     qformat --
235
 *     
236
 *     
237
 * Here are some of the common parameters for actions
238
 *     doctype -- document type list returned by the query (publicID) 
239
 *     qformat=xml -- display resultset from query in XML 
240
 *     qformat=html -- display resultset from query in HTML 
241
 *     qformat=zip -- zip resultset from query
242
 *     docid=34 -- display the document with the document ID number 34 
243
 *     doctext -- XML text of the document to load into the database 
244
 *     acltext -- XML access text for a document to load into the database 
245
 *     dtdtext -- XML DTD text for a new DTD to load into Metacat XML Catalog 
246
 *     query -- actual query text (to go with 'action=query' or 'action=squery')
247
 *     valtext -- XML text to be validated 
248
 *     scope --can limit the query by the scope of the id
249
 *     docid --the docid to check
250
 *     datadoc -- data document name (id)
161 251
 */
162 252
public class MetaCatServlet extends HttpServlet {
163 253

  
......
688 778
				} else if (action.equals("shrink")) {
689 779
					PrintWriter out = response.getWriter();
690 780
					boolean success = false;
691
					// If all DBConnection in the pool are free and DBConnection
692
					// pool
693
					// size is greater than initial value, shrink the connection
694
					// pool
781
					// If all DBConnection in the pool are free and DBConnection pool
782
					// size is greater than initial value, shrink the connection pool
695 783
					// size to initial value
696 784
					success = DBConnectionPool.shrinkConnectionPoolSize();
697 785
					if (success) {

Also available in: Unified diff