Changeset 29090 for main/trunk/greenstone3/src/java
- Timestamp:
- 2014-06-05T13:39:42+12:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/AbstractBrowse.java
r28966 r29090 359 359 if (query_node_list == null) 360 360 { 361 logger.error(" ClassifierBrowse request specified no docnodes.\n");361 logger.error(" ClassifierBrowse request specified no classifier nodes.\n"); 362 362 return result; 363 363 } … … 677 677 { 678 678 ArrayList<String> child_ids = getChildrenIds(node_id); 679 String[] offsets = getMDOffsets(node_id); 679 680 if (child_ids == null) 680 681 return; 681 682 Document doc = node.getOwnerDocument(); 683 if (offsets != null && child_ids.size() != offsets.length) { 684 offsets = null; // something is wrong, they should be the same length 685 } 682 686 for (int i = 0; i < child_ids.size(); i++) 683 687 { … … 687 691 { 688 692 child_elem = createDocNode(doc, child_id); 693 if (offsets != null) { 694 child_elem.setAttribute("mdoffset", offsets[i]); 695 } 689 696 } 690 697 else … … 772 779 } 773 780 781 protected String[] getMDOffsets(String node_id) { 782 783 String offset_str = this.gs_doc.getMetadata(node_id, "mdoffset"); 784 if (offset_str.equals("")) { 785 return null; 786 } 787 return offset_str.split(";"); //, -1); // use -1 limit to get trailing empty strings 788 } 774 789 /** returns the node id of the parent node, null if no parent */ 775 790 protected String getParentId(String node_id) {
Note:
See TracChangeset
for help on using the changeset viewer.