Changeset 11279
- Timestamp:
- 2006-02-17T11:37:59+13:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/service/AbstractDocumentRetrieve.java
r11268 r11279 27 27 import org.greenstone.gsdl3.util.GSPath; 28 28 import org.greenstone.gsdl3.util.MacroResolver; 29 import org.greenstone.gsdl3.util.OID; 29 30 30 31 // XML classes … … 236 237 Element request_node = (Element) request_nodes.item(i); 237 238 String node_id = request_node.getAttribute(GSXML.NODE_ID_ATT); 239 238 240 if (external_id) { 239 241 // can we have .pr etc extensions with external ids? … … 245 247 continue; 246 248 } 247 248 249 try { 249 250 Element metadata_list = getMetadataList(node_id, all_metadata, metadata_names_list); … … 434 435 //Siblings: get the other descendants of the selected node's parent 435 436 if (want_siblings) { 437 String parent_id = getParentId(doc_id); 438 if (parent_id != null) { 439 // if parent == current id, then we are at the top 440 // and can't get siblings 441 Element parent_node = (Element)base_node.getParentNode(); // this may be the structure element if there has been no request for parents or ancestors 436 442 437 Element parent_node = (Element)base_node.getParentNode(); // this may be the structure element if there has been no request for parents or ancestors438 String parent_id = getParentId(doc_id);439 // add siblings, - returns a pointer to the new current node440 base_node = addSiblings(parent_node, parent_id, doc_id); 443 // add siblings, - returns a pointer to the new current node 444 base_node = addSiblings(parent_node, parent_id, doc_id); 445 } 446 441 447 } 442 448 … … 591 597 */ 592 598 protected boolean idNeedsTranslating(String id) { 593 if (id.length()<5) return false; 594 String tail = id.substring(id.length()-3); 595 return (tail.equals(".fc") || tail.equals(".lc") || 596 tail.equals(".pr") || tail.equals(".ns") || 597 tail.equals(".ps") || tail.equals(".rt") || 598 tail.equals(".ss")); 599 599 return OID.needsTranslating(id); 600 600 } 601 601
Note:
See TracChangeset
for help on using the changeset viewer.