View Javadoc

1   /***
2    Copyright (C) 2005 The Java Community
3   
4    This program is free software; you can redistribute it and/or modify  it under
5    the terms of the GNU General Public License as published by  the Free Software
6    Foundation; either version 2 of the License, or  (at your option) any later
7    version.
8   
9    This program is distributed in the hope that it will be useful,  but WITHOUT
10   ANY WARRANTY; without even the implied warranty of  MERCHANTABILITY or FITNESS
11   FOR A PARTICULAR PURPOSE. See the  GNU General Public License for more details.
12  
13   You should have received a copy of the GNU General Public License  along with
14   this program; if not, write to the Free Software  Foundation, Inc., 59 Temple
15   Place, Suite 330, Boston, MA 02111-1307 USA.
16   */
17  package org.bejug.javacareers.jobs.search.lucene;
18  
19  import java.util.List;
20  
21  /***
22   * Value class to encapsulate a search match.
23   *
24   * @author Bavo Bruylandt (Last modified by $Author: ge0ffrey $)
25   * @version $Revision: 1.1 $ - $Date: 2005/08/26 07:58:30 $
26   */
27  public interface SearchResult {
28  
29      /***
30       * Gets the query as it was interpreted.
31       *
32       * @return Query in pqrsed form
33       */
34      String getQuery();
35  
36      /***
37       * Sets the query as it was interpreted.
38       *
39       * @param query in parsed form
40       */
41      void setQuery(String query);
42  
43      /***
44       * Gets the path to file that contains a match.
45       *
46       * @return path to file that contains a match
47       */
48      String getFile();
49  
50      /***
51       * Sets the path to file that contains a match.
52       *
53       * @param file Path to file that contains a match
54       */
55      void setFile(String file);
56  
57      /***
58       * Gets the context around the search's match.
59       *
60       * @return The context around the search match
61       */
62      List getContext();
63  
64      /***
65       * Sets the context around the search's match.
66       *
67       * @param context Context around the search match
68       */
69      void setContext(List context);
70  
71      /***
72       * Sets the context around the search's match.
73       *
74       * @param context Context around the search match
75       */
76      void addContext(String context);    
77  
78      /***
79       * Gets the weight of this hit
80       *
81       * @return weight for this hit
82       */
83      public double getWeight();
84  
85      /***
86       * Sets the weight for this hit
87       *
88       * @param weight The weight for this hit
89       */
90      public void setWeight(double weight);
91  
92      /***
93       * @return the wanted user.
94       */
95      String getUser();
96  
97      /***
98       * @param user the user to set.
99       */
100     void setUser(String user);
101 }
102 
103 /***
104  * $Log: SearchResult.java,v $
105  * Revision 1.1  2005/08/26 07:58:30  ge0ffrey
106  * split up the sources in service, serviceimpl and webclient
107  *
108  * Revision 1.5  2005/08/08 09:38:23  bme_jcs
109  * resolved checkstyle errors
110  *
111  * Revision 1.4  2005/07/12 10:42:39  bavo_jcs
112  * PDF Ajax integration, added user info
113  *
114  * Revision 1.3  2005/07/11 15:01:41  bavo_jcs
115  * PDF Ajax integration
116  *
117  * Revision 1.2  2005/06/09 08:18:52  bejug_cc
118  * Fix initial import
119  *
120  * Revision 1.1  2005/05/23 17:09:48  sja
121  * Removed Lucene prefix.
122  *
123  * Revision 1.1  2005/05/23 15:42:00  bbr
124  * added weight to lucene
125  *
126  * Revision 1.1  2005/05/23 08:46:33  PSONG09
127  * added feeder source files to project
128  *
129  * Revision 1.3  2005/05/23 07:10:18  stephan_janssen
130  * Code cleanup.
131  *
132  * Revision 1.2  2005/05/20 07:45:38  bavo_jcs
133  * -lucene changes
134  *
135  * Revision 1.1  2005/05/18 15:46:39  bavo_jcs
136  * -adeed lucene service
137  *
138  */