Changeset 3817
- Timestamp:
- 2003-03-10T10:46:04+13:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/action/DocumentAction.java
r3801 r3817 50 50 String to; 51 51 String document_name = (String) params.get(GSCGI.DOCUMENT_ARG); 52 System.out.println("Document name: " + document_name);53 52 if (document_name == null || document_name.equals("")) { 54 53 System.err.println("DocumentAction Error: no document specified!"); … … 88 87 89 88 // Process the document structure retrieve message 90 System.out.println("(DocumentAction) Structure request:\n" + converter_.getString(ds_message));89 // System.out.println("(DocumentAction) Structure request:\n" + converter_.getString(ds_message)); 91 90 Element ds_response = (Element) mr_.process(ds_message); 92 System.out.println("(DocumentAction) Structure response:\n" + converter_.getString(ds_response));91 // System.out.println("(DocumentAction) Structure response:\n" + converter_.getString(ds_response)); 93 92 94 93 Element ds_response_content = (Element) GSXML.getNodeByPath(ds_response, "response/content"); … … 127 126 NodeList doc_nodes = ds_response_document.getElementsByTagName(GSXML.DOC_NODE_ELEM); 128 127 for (int i = 0; i < doc_nodes.getLength(); i++) { 129 Node doc_node = doc_nodes.item(i); 130 Node doc_node_id = doc_node.getAttributes().getNamedItem(GSXML.DOC_NODE_ID_ATT); 131 String dm_doc_id = doc_node_id.getNodeValue(); 132 dm_doc_list.appendChild(GSXML.createDocumentElement(doc_, dm_doc_id)); 133 } 134 135 System.out.println("(DocumentAction) Metadata request:\n" + converter_.getString(dm_request)); 128 Element doc_node = (Element) doc_nodes.item(i); 129 String doc_node_id = doc_node.getAttribute(GSXML.DOC_NODE_ID_ATT); 130 131 // Add the documentNode to the list 132 Element dm_doc_node = doc_.createElement(GSXML.DOC_NODE_ELEM); 133 dm_doc_list.appendChild(dm_doc_node); 134 dm_doc_node.setAttribute(GSXML.DOC_NODE_ID_ATT, doc_node_id); 135 dm_doc_node.setAttribute(GSXML.DOC_NODE_TYPE_ATT, 136 doc_node.getAttribute(GSXML.DOC_NODE_TYPE_ATT)); 137 } 138 139 // System.out.println("(DocumentAction) Metadata request:\n" + converter_.getString(dm_request)); 136 140 Element dm_response = (Element) mr_.process(dm_message); 137 System.out.println("(DocumentAction) Metadata response:\n" + converter_.getString(dm_response));141 // System.out.println("(DocumentAction) Metadata response:\n" + converter_.getString(dm_response)); 138 142 139 143 Element dm_response_content = (Element) GSXML.getNodeByPath(dm_response, "response/content"); … … 169 173 dc_doc.setAttribute(GSXML.NAME_ATT, document_name); 170 174 171 System.out.println("(DocumentAction) Content request:\n" + converter_.getString(dc_request));175 // System.out.println("(DocumentAction) Content request:\n" + converter_.getString(dc_request)); 172 176 Element dc_response = (Element) mr_.process(dc_message); 173 System.out.println("(DocumentAction) Content response:\n" + converter_.getString(dc_response));177 // System.out.println("(DocumentAction) Content response:\n" + converter_.getString(dc_response)); 174 178 175 179 Element dc_response_doc_content = (Element) GSXML.getNodeByPath(dc_response, "response/content/documentList/document/content"); … … 201 205 response.appendChild(doc_.importNode(ds_response_content, true)); 202 206 203 System.out.println("Finished page: " + converter_.getString(page));207 // System.out.println("Finished page: " + converter_.getString(page)); 204 208 205 209
Note:
See TracChangeset
for help on using the changeset viewer.