- Timestamp:
- 2003-07-11T16:29:16+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/service/PhindPhraseBrowse.java
r4246 r4903 44 44 private MGPPWrapper mgpp_src_=null; 45 45 private String basepath_ = null; 46 47 private Element applet_description = null; 48 46 49 public PhindPhraseBrowse() { 47 50 mgpp_src_ = new MGPPWrapper(); … … 68 71 short_service_info_.appendChild(e); 69 72 70 // set up service_info_map_ - we only have one element, and it has71 // no extra info yet - we are not processing the config info 72 Element f= doc_.createElement(GSXML.SERVICE_ELEM);73 f.setAttribute(GSXML.TYPE_ATT, GSXML.SERVICE_TYPE_APPLET);74 f.setAttribute(GSXML.NAME_ATT, PHIND_SERVICE);73 // set up the static applet description 74 75 applet_description = doc_.createElement(GSXML.SERVICE_ELEM); 76 applet_description.setAttribute(GSXML.TYPE_ATT, GSXML.SERVICE_TYPE_APPLET); 77 applet_description.setAttribute(GSXML.NAME_ATT, PHIND_SERVICE); 75 78 76 79 // add in the applet info for the phind applet … … 87 90 Document dom = converter_.getDOM(app_info); 88 91 Element app_elem = dom.getDocumentElement(); 89 f.appendChild(doc_.importNode(app_elem, true)); 90 91 service_info_map_.put(PHIND_SERVICE, f); 92 applet_description.appendChild(doc_.importNode(app_elem, true)); 92 93 93 94 return true; 94 95 } 95 96 96 /** creates a display element containing all the text strings needed to display the service page, in the language specified */ 97 protected Element createServiceDisplay(String service, String lang) { 98 Element display = doc_.createElement(GSXML.DISPLAY_ELEM); 99 display.appendChild(GSXML.createTextElement(doc_, GSXML.DISPLAY_NAME_ELEM, getTextString(service+".name", lang))); 100 //display.appendChild(GSXML.createTextElement(doc_, GSXML.DISPLAY_SUBMIT_ELEM, getTextString(service+".submit", lang))); 101 102 return display; 103 97 protected Element getServiceDescription(String service, String lang) { 98 if (!service.equals(PHIND_SERVICE)) { 99 return null; 100 } 101 Element describe = (Element) applet_description.cloneNode(true); 102 describe.appendChild(GSXML.createDisplayTextElement(doc_, GSXML.DISPLAY_TEXT_NAME, getTextString(PHIND_SERVICE+".name", lang))); 103 return describe; 104 104 } 105 105
Note:
See TracChangeset
for help on using the changeset viewer.