Show
Ignore:
Timestamp:
14.04.2014 14:25:09 (6 years ago)
Author:
kjdon
Message:

removing this.doc. Haven't tested as can't compile properly without Fedora/Google classes. But there are no errors regarding this.doc. Also, not sure if these have been updated properly after restructuring around AbstractSearch?. Will need testing properly if they are to be used again.

Files:
1 modified

Legend:

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

    r28966 r28969  
    6969    public FedoraSearch() 
    7070    { 
     71      QUERY_SERVICE = "TextQuery"; 
    7172    } 
    7273     
     
    8687        return false; 
    8788    } 
    88     Element tq_service = this.doc.createElement(GSXML.SERVICE_ELEM); 
     89    Element tq_service = this.desc_doc.createElement(GSXML.SERVICE_ELEM); 
    8990    tq_service.setAttribute(GSXML.TYPE_ATT, GSXML.SERVICE_TYPE_QUERY); 
    90     tq_service.setAttribute(GSXML.NAME_ATT, TEXT_QUERY_SERVICE); 
     91    tq_service.setAttribute(GSXML.NAME_ATT, QUERY_SERVICE); 
    9192    this.short_service_info.appendChild(tq_service); 
    9293    //does_paging = true; 
     
    9697    Element format = (Element) GSXML.getNodeByPath(extra_info, path); 
    9798    if (format != null) { 
    98         this.format_info_map.put(TEXT_QUERY_SERVICE, this.doc.importNode(format, true)); 
     99        this.format_info_map.put(QUERY_SERVICE, this.desc_doc.importNode(format, true)); 
    99100    } 
    100101    return true; 
     
    104105    protected Element processTextQuery(Element request) { 
    105106    // Create a new (empty) result message 
    106     Element result = this.doc.createElement(GSXML.RESPONSE_ELEM); 
    107     result.setAttribute(GSXML.FROM_ATT, TEXT_QUERY_SERVICE); 
     107    Document result_doc = XMLConverter.newDOM(); 
     108    Element result = result_doc.createElement(GSXML.RESPONSE_ELEM); 
     109    result.setAttribute(GSXML.FROM_ATT, QUERY_SERVICE); 
    108110    result.setAttribute(GSXML.TYPE_ATT, GSXML.REQUEST_TYPE_PROCESS); 
    109111     
    110     Element doc_node_list = this.doc.createElement(GSXML.DOC_NODE_ELEM+GSXML.LIST_MODIFIER); 
     112    Element doc_node_list = result_doc.createElement(GSXML.DOC_NODE_ELEM+GSXML.LIST_MODIFIER); 
    111113    result.appendChild(doc_node_list); 
    112114     
     
    178180            String[] language = o.getLanguage(); 
    179181 
    180             Element doc_node = this.doc.createElement(GSXML.DOC_NODE_ELEM); 
     182            Element doc_node = result_doc.createElement(GSXML.DOC_NODE_ELEM); 
    181183            doc_node_list.appendChild(doc_node); 
    182184             
    183             Element metadata_list = this.doc.createElement(GSXML.METADATA_ELEM+GSXML.LIST_MODIFIER); 
     185            Element metadata_list = result_doc.createElement(GSXML.METADATA_ELEM+GSXML.LIST_MODIFIER); 
    184186            doc_node.appendChild(metadata_list); 
    185187             
     
    206208    } 
    207209         
    208     Element metadata_list = this.doc.createElement(GSXML.METADATA_ELEM+GSXML.LIST_MODIFIER); 
     210    Element metadata_list = result_doc.createElement(GSXML.METADATA_ELEM+GSXML.LIST_MODIFIER); 
    209211    result.appendChild(metadata_list); 
    210212