Changeset 25689
- Timestamp:
- 2012-05-29T10:48:02+12:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/AbstractBrowse.java
r25688 r25689 28 28 import org.w3c.dom.Document; 29 29 import org.w3c.dom.Element; 30 import org.w3c.dom.Node; 30 31 import org.w3c.dom.NodeList; 31 32 … … 450 451 if (want_info) 451 452 { 452 453 453 Element node_info_elem = this.doc.createElement("nodeStructureInfo"); 454 454 node.appendChild(node_info_elem); … … 538 538 addDescendants(base_node, node_id, true); 539 539 } 540 541 NodeList classifierElements = result.getElementsByTagName(GSXML.CLASS_NODE_ELEM); 542 for (int j = 0; j < classifierElements.getLength(); j++) 543 { 544 Element current = (Element) classifierElements.item(j); 545 Node parentNode = current.getParentNode(); 546 547 if (parentNode == null) 548 { 549 continue; 550 } 551 552 Element parent = (Element) parentNode; 553 String childType = parent.getAttribute(GSXML.CHILD_TYPE_ATT); 554 if (childType == null || childType.length() == 0) 555 { 556 continue; 557 } 558 559 current.setAttribute(GSXML.CLASSIFIER_STYLE_ATT, childType); 560 } 540 561 } // if want structure 541 562 } // for each doc … … 624 645 Element node = this.doc.createElement(GSXML.CLASS_NODE_ELEM); 625 646 node.setAttribute(GSXML.NODE_ID_ATT, node_id); 647 node.setAttribute(GSXML.CHILD_TYPE_ATT, getChildType(node_id)); 626 648 return node; 627 649 } … … 759 781 abstract protected String translateId(String node_id); 760 782 783 /** Gets the type of list a classifier is (e.g. VList or HList) */ 784 abstract protected String getChildType(String node_id); 785 761 786 /** 762 787 * returns the document type of the doc that the specified node belongs to.
Note:
See TracChangeset
for help on using the changeset viewer.