- Timestamp:
- 2003-10-21T11:09:58+13:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/service/GS2Retrieve.java
r5408 r5692 66 66 protected static final String STRUCT_CHILDREN = "children"; 67 67 protected static final String STRUCT_DESCENDS = "descendants"; 68 protected static final String STRUCT_ENTIRE = "entire"; 68 69 69 70 protected static final String INFO_NUM_SIBS = "numSiblings"; … … 125 126 // the classifiers 126 127 extractExtraClassifierInfo(info, extra_info); 128 127 129 this.config_info = info; 128 130 … … 173 175 Element display_format = (Element)GSXML.getNodeByPath(extra_info, path); 174 176 if (display_format != null) { 175 this.format_info_map.put(DOCUMENT_ METADATA_RETRIEVE_SERVICE, this.doc.importNode(display_format, true));177 this.format_info_map.put(DOCUMENT_CONTENT_RETRIEVE_SERVICE, this.doc.importNode(display_format, true)); 176 178 // shoudl we make a copy? 177 179 } … … 502 504 boolean want_descendants = false; 503 505 506 boolean want_entire_structure = false; 504 507 // Process the request parameters 505 508 NodeList params = param_list.getElementsByTagName(GSXML.PARAM_ELEM); … … 524 527 else if (p_value.equals(STRUCT_DESCENDS)) 525 528 want_descendants = true; 529 else if (p_value.equals(STRUCT_ENTIRE)) 530 want_entire_structure = true; 526 531 else 527 532 System.err.println("GS2Retrieve Warning: Unknown value \"" + p_value + "\"."); … … 558 563 doc.setAttribute(GSXML.NODE_ID_ATT, doc_id); 559 564 560 565 561 566 if (want_info) { 562 567 … … 576 581 Element structure_elem = this.doc.createElement(GSXML.NODE_STRUCTURE_ELEM); 577 582 doc.appendChild(structure_elem); 583 584 if (want_entire_structure) { 585 String top_id = OID.getTop(doc_id); 586 Element top_node = createDocNode(top_id, true, false); 587 addDescendants(top_node, top_id, true); 588 structure_elem.appendChild(top_node); 589 continue; // with the next document, we dont need to do any more here 590 } 578 591 579 592 // Add the requested structure information
Note:
See TracChangeset
for help on using the changeset viewer.