Changeset 24981


Ignore:
Timestamp:
2012-01-26T11:07:54+13:00 (9 years ago)
Author:
sjm84
Message:

In paged collections pages are leaf nodes rather than internal nodes which prevents calls like 'expand document' from working correctly. So for now I have added a (possibly) temporary fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/AbstractDocumentRetrieve.java

    r24980 r24981  
    5252public abstract class AbstractDocumentRetrieve extends ServiceRack
    5353{
    54 
    5554    static Logger logger = Logger.getLogger(org.greenstone.gsdl3.service.AbstractDocumentRetrieve.class.getName());
    5655
     
    442441        {
    443442            Element doc = (Element) node_list.item(i);
     443
    444444            String doc_id = doc.getAttribute(GSXML.NODE_ID_ATT);
    445445            String is_external = doc.getAttribute("externalURL");
     
    493493                if (want_info)
    494494                {
    495 
    496495                    Element node_info_elem = this.doc.createElement("nodeStructureInfo");
    497496                    doc.appendChild(node_info_elem);
     
    766765            Element child_elem = createDocNode(child_id);
    767766            doc.appendChild(child_elem);
    768             if (recursive && !child_elem.getAttribute(GSXML.NODE_TYPE_ATT).equals(GSXML.NODE_TYPE_LEAF))
     767            if (recursive && (!child_elem.getAttribute(GSXML.NODE_TYPE_ATT).equals(GSXML.NODE_TYPE_LEAF) || child_elem.getAttribute(GSXML.DOC_TYPE_ATT).equals(GSXML.DOC_TYPE_PAGED)))
    769768            {
    770769                addDescendants(child_elem, child_id, recursive);
Note: See TracChangeset for help on using the changeset viewer.