KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > blandware > atleap > search > Hit


1 /*
2  * Copyright 2004 Blandware (http://www.blandware.com)
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package com.blandware.atleap.search;
17
18 import java.io.Serializable JavaDoc;
19
20 /**
21  * <p>Hit - result item of the search</p>
22  *
23  * <p><a HREF="Hit.java.htm"><i>View Source</i></a></p>
24  * <p/>
25  *
26  * @author Andrey Grebnev <a HREF="mailto:andrey.grebnev@blandware.com">&lt;andrey.grebnev@blandware.com&gt;</a>
27  * @version $Revision: 1.10 $ $Date: 2006/03/16 11:09:39 $
28  */

29 public class Hit implements Serializable JavaDoc {
30
31     private String JavaDoc uri;
32     private String JavaDoc originalUri;
33     private String JavaDoc title;
34     private String JavaDoc modified;
35     private String JavaDoc summary;
36     private String JavaDoc highlightedText;
37     private String JavaDoc type;
38     private String JavaDoc locale;
39     private int score;
40
41     /**
42      * Returns URI of hit
43      *
44      * @return URI
45      */

46     public String JavaDoc getUri() {
47         return uri;
48     }
49
50     /**
51      * Sets URI of hit
52      *
53      * @param uri URI to set
54      */

55     public void setUri(String JavaDoc uri) {
56         this.uri = uri;
57     }
58
59     /**
60      * Returns original URI of hit
61      *
62      * @return original URI
63      */

64     public String JavaDoc getOriginalUri() {
65         return originalUri;
66     }
67
68     /**
69      * Sets original URI of hit
70      *
71      * @param originalUri original URI to set
72      */

73     public void setOriginalUri(String JavaDoc originalUri) {
74         this.originalUri = originalUri;
75     }
76
77     /**
78      * Returns hit title
79      *
80      * @return hit title
81      */

82     public String JavaDoc getTitle() {
83         return title;
84     }
85
86     /**
87      * Sets hit title
88      *
89      * @param title hit title to set
90      */

91     public void setTitle(String JavaDoc title) {
92         this.title = title;
93     }
94
95     /**
96      * Returns last modified time/date
97      *
98      * @return last modified time/date
99      */

100     public String JavaDoc getModified() {
101         return modified;
102     }
103
104     /**
105      * Sets last modified time/date
106      *
107      * @param modified last modified time/date to set
108      */

109     public void setModified(String JavaDoc modified) {
110         this.modified = modified;
111     }
112
113     /**
114      * Returns summary
115      *
116      * @return summary
117      */

118     public String JavaDoc getSummary() {
119         return summary;
120     }
121
122     /**
123      * Sets summary
124      *
125      * @param summary summary to set
126      */

127     public void setSummary(String JavaDoc summary) {
128         this.summary = summary;
129     }
130
131     /**
132      * Returns highlighted text
133      *
134      * @return highlighted text
135      */

136     public String JavaDoc getHighlightedText() {
137         return highlightedText;
138     }
139
140     /**
141      * Sets highlighted text
142      *
143      * @param highlightedText highlighted text to set
144      */

145     public void setHighlightedText(String JavaDoc highlightedText) {
146         this.highlightedText = highlightedText;
147     }
148
149     /**
150      * Returns type
151      *
152      * @return type
153      */

154     public String JavaDoc getType() {
155         return type;
156     }
157
158     /**
159      * Sets type
160      *
161      * @param type type to set
162      */

163     public void setType(String JavaDoc type) {
164         this.type = type;
165     }
166
167     /**
168      * Get the locale (language) of current hit (document)
169      * @return language code
170      */

171     public String JavaDoc getLocale() {
172         return locale;
173     }
174
175     /**
176      * Set the locale (language) of current hit (document)
177      * @param locale current hit locale
178      */

179     public void setLocale(String JavaDoc locale) {
180         this.locale = locale;
181     }
182
183     /**
184      * Returns hit score (characteristic that allows to sort hits by their
185      * relevance)
186      *
187      * @return hit score
188      */

189     public int getScore() {
190         return score;
191     }
192
193     /**
194      * Sets hit score (characteristic that allows to sort hits by their
195      * relevance)
196      *
197      * @param score hit score to set
198      */

199     public void setScore(int score) {
200         this.score = score;
201     }
202
203 }
204
Popular Tags