| QueryResultList.java |
1 /*
2 * QueryResultList.java
3 *
4 * Copyright (c) 1998-2004, 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.Iterator;
18 import java.util.List;
19
20 public class QueryResultList{
21
22 /** Executed query. */
23 private String queryString;
24
25 /** Corpus in which query was execute. */
26 private IndexedCorpus corpus;
27
28 /** List of QueryResult objects. */
29 private List results;
30
31 /** Constructor of the class. */
32 public QueryResultList(String query, IndexedCorpus corpus, List results){
33 this.queryString = query;
34 this.corpus = corpus;
35 this.results = results;
36 }
37
38 /** @return String executed query */
39 public String getQueryString(){
40 return queryString;
41 }
42
43 /** @return IndexedCorpus corpus where this query was execute. */
44 public IndexedCorpus getQueryCorpus(){
45 return corpus;
46 }
47
48 /** @return Iterator of QueryResult objects.
49 * @see gate.creole.ir.QueryResult */
50 public Iterator getQueryResults(){
51 return results.iterator();
52 }
53 }