1   /*
2    *  QueryResultList.java
3    *
4    *  Copyright (c) 1998-2001, The University of Sheffield.
5    *
6    *  This file is part of GATE (see http://gate.ac.uk/), and is free
7    *  software, licenced under the GNU Library General Public License,
8    *  Version 2, June 1991 (in the distribution as file licence.html,
9    *  and also available at http://gate.ac.uk/gate/licence.html).
10   *
11   *  Rosen Marinov, 19/Apr/2002
12   *
13   */
14  
15  package gate.creole.ir;
16  
17  import java.util.*;
18  
19  public class QueryResultList{
20  
21    /** Executed query. */
22    private String queryString;
23  
24    /** Corpus in which query was execute. */
25    private IndexedCorpus corpus;
26  
27    /** List of QueryResult objects. */
28    private List results;
29  
30    /** Constructor of the class. */
31    public QueryResultList(String query, IndexedCorpus corpus, List results){
32      this.queryString = query;
33      this.corpus = corpus;
34      this.results = results;
35    }
36  
37    /** @return String executed query */
38    public String getQueryString(){
39      return queryString;
40    }
41  
42    /** @return IndexedCorpus corpus where this query was execute. */
43    public IndexedCorpus getQueryCorpus(){
44      return corpus;
45    }
46  
47    /** @return Iterator of QueryResult objects.
48     *  @see gate.creole.ir.QueryResult */
49    public Iterator getQueryResults(){
50      return results.iterator();
51    }
52  }