Changeset 3377


Ignore:
Timestamp:
2002-08-21T11:47:55+12:00 (22 years ago)
Author:
kjdon
Message:

small change

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/service/PhindService.java

    r3363 r3377  
    3636    protected Element processService(String name, Element request) {
    3737
    38     if (!name.equals("PhindBrowse")) {
     38    if (!name.equals("PhindApplet")) {
    3939        System.err.println("PhindService:you have asked for a non-existant service - "+name+"!");
    4040        return null;
     
    4242    // create dummy response
    4343    Element res = doc_.createElement("response");
    44     res.setAttribute("from", "PhindBrowse");
     44    res.setAttribute("from", "PhindApplet");
    4545    Element data = doc_.createElement("content");
    4646    Text t = doc_.createTextNode("this is the results for a phind request");
     
    6464    Element e = doc_.createElement("service");
    6565    e.setAttribute("type", "query");
    66     e.setAttribute("name", "PhindBrowse");
     66    e.setAttribute("name", "PhindApplet");
    6767    short_service_info_.appendChild(e);
    6868
     
    7171    Element f = doc_.createElement("service");
    7272    f.setAttribute("type", "query");
    73     f.setAttribute("name", "PhindBrowse");
     73    f.setAttribute("name", "PhindApplet");
    7474
    7575    // add in teh applet info for the phind applet
    76     String app_info = "<APPLET CODEBASE='/gsdl/bin/java' CODE='org.greenstone.gsdl3.applet.Phind.class' ARCHIVE='Phind.jar' WIDTH=500 HEIGHT=400>
    77   <PARAM NAME=library      VALUE='/cgi-bin/library?e=d-000-00---0fi1998--00-0-0-0prompt-10---4---Document-dtx--0-1l--0-en-50---20-preferences-the--001-011-1-0isoZz-8859Zz-1-0'>
    78   <PARAM NAME=phindcgi     VALUE='library?a=browse/phind'>
    79   <PARAM NAME=collection   VALUE='fi1998'>
    80   <PARAM NAME=classifier   VALUE='1'>
     76    String app_info = "<applet CODEBASE='/gsdl3/lib/java' CODE='org.greenstone.applet.phind.Phind.class' ARCHIVE='phind.jar' WIDTH='500' HEIGHT='400'><PARAM NAME='library'     VALUE='/gsdl3/library'/> <PARAM NAME='phindcgi' VALUE='/gsdl3/library?a=b&amp;sa=phind'/> <PARAM NAME='collection'   VALUE='mgppdemo'/> <PARAM NAME='classifier'   VALUE='1'/>  <PARAM NAME='orientation'  VALUE='vertical'/> <PARAM NAME='depth'        VALUE='2'/> <PARAM NAME='resultorder' VALUE='L,l,E,e,D,d'/> <PARAM NAME='backdrop'     VALUE='/gsdl3/interfaces/default/images/phindbg1.jpg'/><PARAM NAME='fontsize'     VALUE='10'/> <PARAM NAME='blocksize'    VALUE='10'/>The Phind java applet.</applet>";
    8177
    82   <PARAM NAME=orientation  VALUE='vertical'>
    83   <PARAM NAME=depth        VALUE='2'>
    84   <PARAM NAME=resultorder VALUE='L,l,E,e,D,d'>
    85 
    86   <PARAM NAME=backdrop     VALUE='interfaces/default/images/phindbg1.jpg'>
    87   <PARAM NAME=fontsize     VALUE='10'>
    88   <PARAM NAME=blocksize    VALUE='10'>
    89 
    90   The Phind java applet.
    91   </APPLET>";
    92 
    93     service_info_map_.put("PhindBrowse", f);
     78    Document dom = converter_.getDOM(app_info);
     79    Element app_elem = dom.getDocumentElement();
     80    f.appendChild(doc_.importNode(app_elem, true));
     81   
     82    service_info_map_.put("PhindApplet", f);
    9483   
    9584    return true;
Note: See TracChangeset for help on using the changeset viewer.