Revision 371
Added by berkley over 24 years ago
src/edu/ucsb/nceas/metacat/MetaCatServlet.java | ||
---|---|---|
248 | 248 |
{ |
249 | 249 |
handleQuery(out, params, response); |
250 | 250 |
} |
251 |
else if(action.equals("squery"))
|
|
251 |
else if(action.equals("squery")) |
|
252 | 252 |
{ |
253 | 253 |
handleSQuery(out, params, response); |
254 | 254 |
} |
... | ... | |
412 | 412 |
{ |
413 | 413 |
//create the squery and return it to be processed |
414 | 414 |
String doctype = null; |
415 |
String xmlquery = null; |
|
415 | 416 |
String[] doctypeArr = null; |
416 | 417 |
Connection conn = null; |
417 | 418 |
doctypeArr = (String[])params.get("doctype"); |
... | ... | |
424 | 425 |
{ |
425 | 426 |
doctype="ANY"; |
426 | 427 |
} |
427 |
String xmlquery = DBQuery .createSQuery(params, doctype); |
|
428 |
if(params.containsKey("query")) |
|
429 |
{ //handles the case where the client creates the pathquery |
|
430 |
//document itself (i.e. for DMan) |
|
431 |
String query = ((String[])params.get("query"))[0]; |
|
432 |
if(!query.equals("")) |
|
433 |
{ |
|
434 |
xmlquery = DBQuery.createQuery(query, doctype); |
|
435 |
} |
|
436 |
} |
|
437 |
else |
|
438 |
{ |
|
439 |
//Creates a squery from the CGI parameters |
|
440 |
xmlquery = DBQuery .createSQuery(params, doctype); |
|
441 |
} |
|
428 | 442 |
Hashtable doclist = runQuery(xmlquery); |
429 | 443 |
String qformat = ((String[])params.get("qformat"))[0]; |
430 | 444 |
String resultdoc = createResultDocument(doclist, qformat, xmlquery, |
... | ... | |
992 | 1006 |
|
993 | 1007 |
/** |
994 | 1008 |
* '$Log$ |
1009 |
* 'Revision 1.72 2000/08/16 18:48:57 berkley |
|
1010 |
* '- created transformResultset() which transforms an xml resultset document and displays it to the client useing DBTransform |
|
1011 |
* '- renamed transformDocument() to createResultDocument() and modified its functionality to only return a restultset xml document |
|
1012 |
* '- changed handleSQuery() and handleQuery() to use the new methods |
|
1013 |
* ' |
|
995 | 1014 |
* 'Revision 1.71 2000/08/15 20:48:05 berkley |
996 | 1015 |
* 'remove handleQueryAction() in favor of directly calling handleQuery() and handleSQuery() from doGetOrPost() |
997 | 1016 |
* ' |
Also available in: Unified diff
fixed bug with handleSQuery() that kept DMan from access the squery functionality