01 /*
02 * QueryResult.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.List;
19
20 public class QueryResult{
21
22 /** Persistance document ID.*/
23 private Object docID;
24
25 /** Score(relevance) of the result between 0 and 1 */
26 private float relevance;
27
28 /** List of Terms*/
29 private List fieldValues;
30
31 /** Constructor of the class. */
32 public QueryResult(Object docID,float relevance, List fieldValues){
33 this.docID = docID;
34 this.relevance = relevance;
35 this.fieldValues = fieldValues;
36 }
37
38 /** @return persistance document ID.*/
39 public Object getDocumentID(){
40 return docID;
41 }
42
43 /** @return relevance of this result. */
44 public float getScore(){
45 return relevance;
46 }
47
48 /** returns certain document fields (if specified) from the search() call */
49 public List getFields(){
50 return fieldValues;
51 }
52
53 }
|