Ignore:
Timestamp:
2014-04-14T14:25:09+12:00 (10 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.

File:
1 edited

Legend:

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

    r28966 r28969  
    3636/**
    3737 *
    38  * @author <a href="mailto:[email protected]">Chi-Yu Huang</a>
    3938 *
    4039 */
     
    5756    public GoogleSearch()
    5857    {
     58      QUERY_SERVICE = "TextQuery";
    5959    }
    6060       
     
    120120   
    121121    // Create a new (empty) result message
    122     Element result = this.doc.createElement(GSXML.RESPONSE_ELEM);
    123     result.setAttribute(GSXML.FROM_ATT, TEXT_QUERY_SERVICE);
     122    Document result_doc = XMLConverter.newDOM();
     123    Element result = result_doc.createElement(GSXML.RESPONSE_ELEM);
     124    result.setAttribute(GSXML.FROM_ATT, QUERY_SERVICE);
    124125    result.setAttribute(GSXML.TYPE_ATT, GSXML.REQUEST_TYPE_PROCESS);
    125     Element doc_node_list = this.doc.createElement(GSXML.DOC_NODE_ELEM+GSXML.LIST_MODIFIER);
     126    Element doc_node_list = result_doc.createElement(GSXML.DOC_NODE_ELEM+GSXML.LIST_MODIFIER);
    126127    result.appendChild(doc_node_list);
    127     Element query_metadata_list = this.doc.createElement(GSXML.METADATA_ELEM+GSXML.LIST_MODIFIER);
     128    Element query_metadata_list = result_doc.createElement(GSXML.METADATA_ELEM+GSXML.LIST_MODIFIER);
    128129    result.appendChild(query_metadata_list);
    129130
     
    200201        GoogleSearchResultElement[] details = google_result.getResultElements();
    201202        for (int i=0; i<details.length; i++){
    202         Element doc_node = this.doc.createElement(GSXML.DOC_NODE_ELEM);
     203        Element doc_node = result_doc.createElement(GSXML.DOC_NODE_ELEM);
    203204        doc_node_list.appendChild(doc_node);
    204205       
    205         Element metadata_list = this.doc.createElement(GSXML.METADATA_ELEM+GSXML.LIST_MODIFIER);
     206        Element metadata_list = result_doc.createElement(GSXML.METADATA_ELEM+GSXML.LIST_MODIFIER);
    206207        doc_node.appendChild(metadata_list);
    207208       
Note: See TracChangeset for help on using the changeset viewer.