Changeset 28966 for main/trunk/greenstone3/src/java/org/greenstone/gsdl3/core/DefaultReceptionist.java
- Timestamp:
- 2014-04-10T14:39:33+12:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/core/DefaultReceptionist.java
r24993 r28966 29 29 { 30 30 super.addExtraInfo(page); 31 31 // the document for the page 32 Document doc = page.getOwnerDocument(); 33 // a new document to create messages to send to MR 34 Document msg_doc = XMLConverter.newDOM(); 32 35 Element page_request = (Element) GSXML.getChildByTagName(page, GSXML.PAGE_REQUEST_ELEM); 33 36 // if it is a system request, then we don't bother with this. … … 70 73 if (this.language_list != null) 71 74 { 72 page_response.appendChild(this.language_list);75 page_response.appendChild(doc.importNode(this.language_list, true)); 73 76 } 74 77 Element coll_description = (Element) GSXML.getChildByTagName(page_response, GSXML.COLLECTION_ELEM); … … 80 83 if (coll_description == null) 81 84 { 82 85 logger.debug("getting the coll description"); 83 86 // we dont have one yet - get it 84 Element coll_about_message = this.doc.createElement(GSXML.MESSAGE_ELEM); 85 Element coll_about_request = GSXML.createBasicRequest(this.doc, GSXML.REQUEST_TYPE_DESCRIBE, coll_name, userContext); 87 88 Element coll_about_message = msg_doc.createElement(GSXML.MESSAGE_ELEM); 89 Element coll_about_request = GSXML.createBasicRequest(msg_doc, GSXML.REQUEST_TYPE_DESCRIBE, coll_name, userContext); 86 90 coll_about_message.appendChild(coll_about_request); 87 91 … … 104 108 } 105 109 // have found one, append it to the page response 106 coll_description = (Element) this.doc.importNode(coll_description, true);110 coll_description = (Element) doc.importNode(coll_description, true); 107 111 page_response.appendChild(coll_description); 108 112 get_service_description = true; 109 113 } 114 110 115 111 116 // have got a coll description … … 151 156 152 157 // we will send all the requests in a single message 153 Element info_message = this.doc.createElement(GSXML.MESSAGE_ELEM);158 Element info_message = msg_doc.createElement(GSXML.MESSAGE_ELEM); 154 159 for (int i = 0; i < services.getLength(); i++) 155 160 { … … 157 162 String name = c.getAttribute(GSXML.NAME_ATT); 158 163 String address = GSPath.appendLink(coll_name, name); 159 Element info_request = GSXML.createBasicRequest( this.doc, GSXML.REQUEST_TYPE_DESCRIBE, address, userContext);164 Element info_request = GSXML.createBasicRequest(msg_doc, GSXML.REQUEST_TYPE_DESCRIBE, address, userContext); 160 165 //Element req_param_list = this.doc.createElement(GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER); 161 166 //req_param_list.appendChild(GSXML.createParameter(this.doc, GSXML.SUBSET_PARAM, GSXML.DISPLAY_TEXT_ELEM+GSXML.LIST_MODIFIER));
Note:
See TracChangeset
for help on using the changeset viewer.