Changeset 3913 for trunk/gsdl3/src/java/org/greenstone/gsdl3/action
- Timestamp:
- 2003-03-19T14:27:25+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/action/BrowseAction.java
r3894 r3913 75 75 // this will probably need to be cached somehow later on. 76 76 77 Element info_message = createDescribeRequest(to, lang, null); 77 Element info_message = doc_.createElement(GSXML.MESSAGE_ELEM); 78 Element info_request = GSXML.createBasicRequest(doc_, GSXML.REQUEST_TYPE_DESCRIBE, to, lang); 79 info_message.appendChild(info_request); 80 81 // also get the format stuff now if there is some 82 Element format_request = GSXML.createBasicRequest(doc_, GSXML.REQUEST_TYPE_FORMAT, to, lang); 83 info_message.appendChild(format_request); 84 // process the requests 78 85 Element info_response = (Element) mr_.process(info_message); 86 87 System.out.println("getting format and description, response=\n"+converter_.getString(info_response)); 88 // get out the description 79 89 String path = GSPath.appendLink(GSXML.RESPONSE_ELEM, GSXML.SERVICE_ELEM); 80 90 Element description = (Element)doc_.importNode(GSXML.getNodeByPath(info_response, path), true); 81 91 page.appendChild(description); 82 83 84 // Element info_message = doc_.createElement(GSXML.MESSAGE_ELEM); 85 // Element info_request = doc_.createElement(GSXML.REQUEST_ELEM); 86 // info_message.appendChild(info_request); 87 // info_request.setAttribute(GSXML.TYPE_ATT, GSXML.REQUEST_TYPE_DESCRIBE); 88 // info_request.setAttribute(GSXML.LANG_ATT, request.getAttribute(GSXML.LANG_ATT)); 89 90 // String to = collection; 91 // to = GSPath.appendLink(to, service_name); 92 // info_request.setAttribute(GSXML.TO_ATT, to); 93 92 93 Element format_response = (Element)info_response.getElementsByTagName(GSXML.RESPONSE_ELEM).item(1); // the second response 94 94 95 95 // the main response for the page is in a response element … … 187 187 meta_param_list.appendChild(meta_param); 188 188 meta_param.setAttribute(GSXML.NAME_ATT, "metadata"); 189 meta_param.setAttribute(GSXML.VALUE_ATT, "Source"); 190 meta_param = doc_.createElement(GSXML.PARAM_ELEM); 191 meta_param_list.appendChild(meta_param); 192 meta_param.setAttribute(GSXML.NAME_ATT, "metadata"); 193 meta_param.setAttribute(GSXML.VALUE_ATT, "Keyword"); 194 meta_param = doc_.createElement(GSXML.PARAM_ELEM); 195 meta_param_list.appendChild(meta_param); 196 meta_param.setAttribute(GSXML.NAME_ATT, "metadata"); 189 197 meta_param.setAttribute(GSXML.VALUE_ATT, "Title"); 190 198 … … 271 279 } 272 280 273 274 //Node new_style = GSXML.getChildByTagName(response, GSXML.STYLESHEET_ELEM); 275 //if (new_style !=null) { 276 // GSXSLT.mergeStylesheets(style_doc, (Element)new_style); 277 // response.removeChild(new_style); 278 //} 279 // add the response to the page data 280 //page.appendChild(doc_.importNode(response, true)); 281 281 // add in the format info 282 Element format_elem = (Element)GSXML.getChildByTagName(format_response, GSXML.FORMAT_ELEM); 283 if (format_elem != null) { 284 Element this_format = GSXML.getNamedElement(format_elem, GSXML.CLASSIFIER_ELEM, GSXML.NAME_ATT, top_id); 285 if (this_format != null) { 286 GSXSLT.mergeStylesheets(style_doc, this_format); 287 } 288 } 282 289 283 290 // transform the page 284 291 GSXSLT.absoluteIncludePaths(style_doc, config_); 285 //System.out.println("browse page=");286 //System.out.println(converter_.getString(page));287 292 return (Element)transformer_.transform(style_doc, page); 288 293 }
Note:
See TracChangeset
for help on using the changeset viewer.