01 /*
02 * QueryResultList.java
03 *
04 * Copyright (c) 1995-2010, The University of Sheffield. See the file
05 * COPYRIGHT.txt in the software or at http://gate.ac.uk/gate/COPYRIGHT.txt
06 *
07 * This file is part of GATE (see http://gate.ac.uk/), and is free
08 * software, licenced under the GNU Library General Public License,
09 * Version 2, June 1991 (in the distribution as file licence.html,
10 * and also available at http://gate.ac.uk/gate/licence.html).
11 *
12 * Rosen Marinov, 19/Apr/2002
13 *
14 */
15
16 package gate.creole.ir;
17
18 import java.util.Iterator;
19 import java.util.List;
20
21 public class QueryResultList{
22
23 /** Executed query. */
24 private String queryString;
25
26 /** Corpus in which query was execute. */
27 private IndexedCorpus corpus;
28
29 /** List of QueryResult objects. */
30 private List results;
31
32 /* Niraj */
33 /* Default Constructor */
34 // do not delete this as it is must to subclass this class
35 public QueryResultList() {
36 }
37 /* End */
38
39 /** Constructor of the class. */
40 public QueryResultList(String query, IndexedCorpus corpus, List results){
41 this.queryString = query;
42 this.corpus = corpus;
43 this.results = results;
44 }
45
46 /** @return String executed query */
47 public String getQueryString(){
48 return queryString;
49 }
50
51 /** @return IndexedCorpus corpus where this query was execute. */
52 public IndexedCorpus getQueryCorpus(){
53 return corpus;
54 }
55
56 /** @return Iterator of QueryResult objects.
57 * @see gate.creole.ir.QueryResult */
58 public Iterator getQueryResults(){
59 return results.iterator();
60 }
61 }
|