Revision 444
Added by berkley about 24 years ago
src/edu/ucsb/nceas/metacat/MetaCatServlet.java | ||
---|---|---|
387 | 387 |
String qformat = ((String[])params.get("qformat"))[0]; |
388 | 388 |
Hashtable doclist = runQuery(xmlquery, user, group); |
389 | 389 |
String resultdoc = createResultDocument(doclist, transformQuery(xmlquery)); |
390 |
|
|
391 |
System.out.println("transformed query"); |
|
392 |
System.out.println(transformQuery(xmlquery)); |
|
390 |
|
|
393 | 391 |
//format and transform the results |
394 | 392 |
if(qformat.equals("html")) { |
395 | 393 |
transformResultset(resultdoc, response, out); |
... | ... | |
417 | 415 |
Hashtable doclist = runQuery(xmlquery, user, group); |
418 | 416 |
String qformat = ((String[])params.get("qformat"))[0]; |
419 | 417 |
String resultdoc = createResultDocument(doclist, transformQuery(params)); |
420 |
System.out.println(transformQuery(params)); |
|
421 | 418 |
|
422 | 419 |
//format and transform the results |
423 | 420 |
if(qformat.equals("html")) { |
... | ... | |
532 | 529 |
String document = null; |
533 | 530 |
resultset.append("<?xml version=\"1.0\"?>\n"); |
534 | 531 |
resultset.append("<resultset>\n"); |
535 |
|
|
536 |
//the following should work but it doesn't because the parser doesn't |
|
537 |
//like the <?xml?> tag inside the <query> tag. This is supposed to be |
|
538 |
//the way that the query itself is sent back to the client. |
|
539 | 532 |
|
540 | 533 |
resultset.append(" <query>" + xmlquery + "</query>"); |
541 | 534 |
|
... | ... | |
547 | 540 |
resultset.append(" <document>" + document + "</document>"); |
548 | 541 |
} |
549 | 542 |
resultset.append("</resultset>"); |
543 |
//System.out.println(resultset.toString()); |
|
550 | 544 |
return resultset.toString(); |
551 | 545 |
} |
552 | 546 |
|
553 | 547 |
/** |
554 | 548 |
* Handle the request to view the abstract of a document. |
549 |
* The abstractpath CGI parameter gives the xml path to the abstract |
|
550 |
* node. |
|
555 | 551 |
*/ |
556 | 552 |
private void handleViewAbstractAction(PrintWriter out, Hashtable params, |
557 | 553 |
HttpServletResponse response) throws IOException, SQLException |
... | ... | |
565 | 561 |
docid = ((String[])params.get("docid"))[0]; |
566 | 562 |
if(params.containsKey("abstractpath")) |
567 | 563 |
{ |
564 |
//the CGI parameter abstractpath holds the path to the abstract |
|
565 |
//that should be displayed. |
|
568 | 566 |
abstractpath = ((String[])params.get("abstractpath"))[0]; |
569 | 567 |
} |
570 | 568 |
else |
... | ... | |
575 | 573 |
|
576 | 574 |
Object[] abstracts = DBQuery.getNodeContent(abstractpath, docid, conn); |
577 | 575 |
|
578 |
out.println("<html><head><title>Abstract</title></head><body>");
|
|
579 |
out.println("<h1>Abstract</h1>"); |
|
576 |
out.println("<html><head><title>Abstract</title></head>"); |
|
577 |
out.println("<body bgcolor=\"white\"><h1>Abstract</h1>");
|
|
580 | 578 |
for(int i=0; i<abstracts.length; i++) |
581 | 579 |
{ |
582 | 580 |
out.println("<p>" + (String)abstracts[i] + "</p>"); |
... | ... | |
585 | 583 |
} |
586 | 584 |
catch (IOException ioe) |
587 | 585 |
{ |
588 |
System.out.println(ioe.getMessage());
|
|
586 |
util.debugMessage("error in handlegetabstract: " + ioe.getMessage());
|
|
589 | 587 |
} |
590 | 588 |
catch(SQLException sqle) |
591 | 589 |
{ |
592 |
System.out.println(sqle.getMessage());
|
|
590 |
util.debugMessage("error in handlegetabstract: " + sqle.getMessage());
|
|
593 | 591 |
} |
594 | 592 |
catch(Exception e) |
595 | 593 |
{ |
596 |
System.out.println(e.getMessage());
|
|
594 |
util.debugMessage("error in handlegetabstract: " + e.getMessage());
|
|
597 | 595 |
} |
598 | 596 |
|
599 | 597 |
util.returnConnection(conn); |
Also available in: Unified diff
removed print statments