Project

General

Profile

« Previous | Next » 

Revision 1665

Added by Jing Tao almost 21 years ago

Revise the code for read from metcat.

View differences:

src/edu/ucsb/nceas/metacat/MetaCatServlet.java
478 478
        DBTransform trans = new DBTransform();
479 479
        response.setContentType("text/html");
480 480
        trans.transformXMLDocument(sess.getMessage(), "-//NCEAS//login//EN",
481
                                   "-//W3C//HTML//EN", qformat, out);
481
                                   "-//W3C//HTML//EN", qformat, out, null);
482 482

  
483 483
      } catch(Exception e) {
484 484

  
......
520 520
        DBTransform trans = new DBTransform();
521 521
        response.setContentType("text/html");
522 522
        trans.transformXMLDocument(output.toString(), "-//NCEAS//login//EN",
523
                                   "-//W3C//HTML//EN", qformat, out);
523
                                   "-//W3C//HTML//EN", qformat, out, null);
524 524

  
525 525
      } catch(Exception e) {
526 526

  
......
679 679
      DBTransform trans = new DBTransform();
680 680
      response.setContentType("text/html");
681 681
      trans.transformXMLDocument(resultdoc, "-//NCEAS//resultset//EN",
682
                                 "-//W3C//HTML//EN", qformat, out);
682
                                 "-//W3C//HTML//EN", qformat, out, null);
683 683

  
684 684
    }
685 685
    catch(Exception e)
......
1068 1068
              addDocToZip(docid, zout, user, groups);
1069 1069
            } else {
1070 1070
              readFromMetacat(response, docid, qformat, abstrpath,
1071
                              user, groups, zip, zout, withInlineData);
1071
                              user, groups, zip, zout, withInlineData, params);
1072 1072
            }
1073 1073

  
1074 1074
          // case docid="http://.../filename"
......
1088 1088
            addDocToZip(docid, zout, user, groups);
1089 1089
          } else {
1090 1090
            readFromMetacat(response, docid, qformat, abstrpath,
1091
                            user, groups, zip, zout, withInlineData);
1091
                            user, groups, zip, zout, withInlineData, params);
1092 1092
          }
1093 1093
        }
1094 1094

  
......
1225 1225
  private void readFromMetacat(HttpServletResponse response, String docid,
1226 1226
                               String qformat, String abstrpath, String user,
1227 1227
                               String[] groups, boolean zip, 
1228
                               ZipOutputStream zout, boolean withInlineData)
1228
                               ZipOutputStream zout, boolean withInlineData,
1229
                               Hashtable params)
1229 1230
               throws ClassNotFoundException, IOException, SQLException,
1230 1231
                      McdbException, Exception
1231 1232
  {
......
1297 1298
          // Transform the document to the new doctype
1298 1299
          DBTransform dbt = new DBTransform();
1299 1300
          dbt.transformXMLDocument(doc.toString(user, groups, withInlineData),
1300
                                   doctype,"-//W3C//HTML//EN", qformat, out);
1301
                                   doctype,"-//W3C//HTML//EN", 
1302
                                   qformat, out, params);
1301 1303
        }
1302 1304

  
1303 1305
      }

Also available in: Unified diff