Changeset 25860

Show
Ignore:
Timestamp:
28.06.2012 11:47:25 (7 years ago)
Author:
sjm84
Message:

Add the facet list to the page if we get one

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/QueryAction.java

    r25650 r25860  
    5151    protected Element basicQuery(Element request) 
    5252    { 
    53  
    5453        // the result 
    5554        Element page_response = this.doc.createElement(GSXML.RESPONSE_ELEM); 
     
    8685            Element mr_info_response = (Element) this.mr.process(mr_info_message); 
    8786            // the response 
    88              
     87 
    8988            Element service_response = (Element) GSXML.getChildByTagName(mr_info_response, GSXML.RESPONSE_ELEM); 
    9089 
     
    161160        { // add it into the page response 
    162161            page_response.appendChild(this.doc.importNode(query_term_info_list, true)); 
     162        } 
     163 
     164        Element facet_list = (Element) GSXML.getChildByTagName(query_response, GSXML.FACET_ELEM + GSXML.LIST_MODIFIER); 
     165        if (facet_list == null) 
     166        { 
     167            logger.error("No query term information.\n"); 
     168        } 
     169        else 
     170        { // add it into the page response 
     171            page_response.appendChild(this.doc.importNode(facet_list, true)); 
    163172        } 
    164173 
     
    227236 
    228237        Element mr_metadata_response = (Element) this.mr.process(mr_metadata_message); 
     238         
    229239        // check for errors 
    230240        processErrorElements(mr_metadata_response, page_response);