- Timestamp:
- 2013-10-10T17:21:30+13:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/ProcessAction.java
r25635 r28382 21 21 public Node process(Node message_node) 22 22 { 23 24 23 Element message = this.converter.nodeToElement(message_node); 25 24 Document doc = message.getOwnerDocument(); 25 26 26 // the result 27 Element result = this.doc.createElement(GSXML.MESSAGE_ELEM);28 Element page_response = this.doc.createElement(GSXML.RESPONSE_ELEM);27 Element result = doc.createElement(GSXML.MESSAGE_ELEM); 28 Element page_response = doc.createElement(GSXML.RESPONSE_ELEM); 29 29 result.appendChild(page_response); 30 30 … … 70 70 // if rt=s or rt=r, do the request 71 71 72 Element mr_query_message = this.doc.createElement(GSXML.MESSAGE_ELEM);72 Element mr_query_message = doc.createElement(GSXML.MESSAGE_ELEM); 73 73 String request_type_att; 74 74 Element param_list = null; … … 76 76 { // status 77 77 request_type_att = GSXML.REQUEST_TYPE_STATUS; 78 param_list = this.doc.createElement(GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER);79 Element param = this.doc.createElement(GSXML.PARAM_ELEM);78 param_list = doc.createElement(GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER); 79 Element param = doc.createElement(GSXML.PARAM_ELEM); 80 80 param.setAttribute(GSXML.NAME_ATT, GSParams.PROCESS_ID); 81 81 param.setAttribute(GSXML.VALUE_ATT, (String) params.get(GSParams.PROCESS_ID)); … … 89 89 if (service_params != null) 90 90 { 91 param_list = this.doc.createElement(GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER);92 GSXML.addParametersToList( this.doc, param_list, service_params);91 param_list = doc.createElement(GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER); 92 GSXML.addParametersToList(doc, param_list, service_params); 93 93 } 94 94 95 95 } 96 Element mr_query_request = GSXML.createBasicRequest( this.doc, request_type_att, to, userContext);96 Element mr_query_request = GSXML.createBasicRequest(doc, request_type_att, to, userContext); 97 97 if (param_list != null) 98 98 { … … 112 112 // else append the contents of the response to the page - just the status elem for now 113 113 Element status = (Element) GSXML.getChildByTagName(result_response, GSXML.STATUS_ELEM); 114 page_response.appendChild( this.doc.importNode(status, true));114 page_response.appendChild(doc.importNode(status, true)); 115 115 } 116 116 … … 118 118 119 119 // request the service info for the selected service - should be cached 120 Element mr_info_message = this.doc.createElement(GSXML.MESSAGE_ELEM);121 Element mr_info_request = GSXML.createBasicRequest( this.doc, GSXML.REQUEST_TYPE_DESCRIBE, to, userContext);120 Element mr_info_message = doc.createElement(GSXML.MESSAGE_ELEM); 121 Element mr_info_request = GSXML.createBasicRequest(doc, GSXML.REQUEST_TYPE_DESCRIBE, to, userContext); 122 122 mr_info_message.appendChild(mr_info_request); 123 123 Element mr_info_response = (Element) this.mr.process(mr_info_message); … … 125 125 String path = GSXML.RESPONSE_ELEM; 126 126 path = GSPath.appendLink(path, GSXML.SERVICE_ELEM); 127 Element description = (Element) this.doc.importNode(GSXML.getNodeByPath(mr_info_response, path), true);127 Element description = (Element) doc.importNode(GSXML.getNodeByPath(mr_info_response, path), true); 128 128 129 129 page_response.appendChild(description); … … 134 134 protected Element getServiceParamList(Element cgi_param_list) 135 135 { 136 137 Element new_param_list = this.doc.createElement(GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER); 136 Document doc = cgi_param_list.getOwnerDocument(); 137 138 Element new_param_list = doc.createElement(GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER); 138 139 Element param; 139 140 NodeList cgi_params = cgi_param_list.getChildNodes(); … … 147 148 } 148 149 // else add it in to the list 149 new_param_list.appendChild( this.doc.importNode(p, true));150 new_param_list.appendChild(doc.importNode(p, true)); 150 151 } 151 152 return new_param_list;
Note:
See TracChangeset
for help on using the changeset viewer.