Changeset 11013 for trunk/gsdl3/src/java/org/greenstone
- Timestamp:
- 2005-12-20T16:36:06+13:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/action/QueryAction.java
r9965 r11013 50 50 String service_name = (String)params.get(GSParams.SERVICE); 51 51 String collection = (String)params.get(GSParams.COLLECTION); 52 52 53 // collection may be null or empty when we are doing cross coll services 53 54 if (collection == null || collection.equals("")) { 54 System.err.println("QueryAction Error: no collection was specified!"); 55 return page_response; // an empty response 55 collection = null; 56 56 } 57 57 58 58 String lang = request.getAttribute(GSXML.LANG_ATT); 59 59 String uid = request.getAttribute(GSXML.USER_ID_ATT); 60 String to = GSPath.appendLink(collection, service_name); 60 String to = service_name; 61 if (collection != null) { 62 to = GSPath.prependLink(to, collection); 63 } 61 64 62 65 if (request_type.indexOf("d")!=-1) { … … 149 152 Element format_elem = (Element)GSXML.getChildByTagName(format_response, GSXML.FORMAT_ELEM); 150 153 if (format_elem != null) { 151 ///ystem.out.println("QueryAction: found a format element, adding it to the page response"); 152 // set teh format type 154 // set the format type 153 155 format_elem.setAttribute(GSXML.TYPE_ATT, "search"); 154 156 // for now just add to the response … … 162 164 // do the metadata request on the filtered list 163 165 Element mr_metadata_message = this.doc.createElement(GSXML.MESSAGE_ELEM); 164 to = GSPath.appendLink(collection, "DocumentMetadataRetrieve"); // Hard-wired? 166 to = "DocumentMetadataRetrieve"; 167 if (collection != null) { 168 to = GSPath.prependLink(to, collection); 169 } 165 170 Element mr_metadata_request = GSXML.createBasicRequest(this.doc, GSXML.REQUEST_TYPE_PROCESS, to, lang, uid); 166 171 mr_metadata_message.appendChild(mr_metadata_request);
Note:
See TracChangeset
for help on using the changeset viewer.