KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jetspeed > services > search > BaseParsedObject


1 /*
2  * Copyright 2000-2004 The Apache Software Foundation.
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 org.apache.jetspeed.services.search;
17
18 import java.util.Map JavaDoc;
19 import java.net.URL JavaDoc;
20
21 import org.apache.commons.collections.MultiMap;
22
23 /**
24  * Base parsed object.
25  *
26  * @author <a HREF="mailto:morciuch@apache.org">Mark Orciuch</a>
27  * @version $Id: BaseParsedObject.java,v 1.4 2004/02/23 03:48:47 jford Exp $
28  */

29 public class BaseParsedObject implements ParsedObject
30 {
31
32     private String JavaDoc key;
33     private String JavaDoc type;
34     private String JavaDoc title;
35     private String JavaDoc description;
36     private String JavaDoc content;
37     private String JavaDoc language;
38     private URL JavaDoc url;
39     private String JavaDoc[] keywords;
40     private MultiMap multiKeywords;
41     private Map JavaDoc fields;
42     private MultiMap multiFields;
43     private float score;
44     private String JavaDoc className;
45
46     /**
47      * Returns parsed object key
48      *
49      * @return
50      */

51     public String JavaDoc getKey()
52     {
53         return this.key;
54     }
55
56     /**
57      * Sets parsed object key
58      *
59      * @param content
60      */

61     public void setKey(String JavaDoc key)
62     {
63         this.key = key;
64     }
65
66     /**
67      * Returns parsed object type
68      *
69      * @return
70      */

71     public String JavaDoc getType()
72     {
73         return this.type;
74     }
75
76     /**
77      * Sets parsed object type
78      *
79      * @param type
80      */

81     public void setType(String JavaDoc type)
82     {
83         this.type = type;
84     }
85
86     /**
87      * Returns parsed object content
88      *
89      * @return
90      */

91     public String JavaDoc getContent()
92     {
93         return this.content;
94     }
95
96     /**
97      * Sets parsed object content
98      *
99      * @param content
100      */

101     public void setContent(String JavaDoc content)
102     {
103         this.content = content;
104     }
105
106     /**
107      * Returns parsed object description
108      *
109      * @return
110      */

111     public String JavaDoc getDescription()
112     {
113         return this.description;
114     }
115
116     /**
117      * Sets parsed object description
118      *
119      * @param description
120      */

121     public void setDescription(String JavaDoc description)
122     {
123         this.description = description;
124     }
125
126     /**
127      * Returns parsed object keywords
128      *
129      * @return
130      */

131     public String JavaDoc[] getKeywords()
132     {
133         return this.keywords;
134     }
135
136     /**
137      * Sets parsed object keywords
138      *
139      * @param keywords
140      */

141     public void setKeywords(String JavaDoc[] keywords)
142     {
143         this.keywords = keywords;
144     }
145
146     /**
147      * Returns parsed object title
148      *
149      * @return
150      */

151     public String JavaDoc getTitle()
152     {
153         return this.title;
154     }
155
156     /**
157      * Sets parsed object title
158      *
159      * @param title
160      */

161     public void setTitle(String JavaDoc title)
162     {
163         this.title = title;
164     }
165
166     /**
167      * Returns parsed object language
168      *
169      * @return
170      */

171     public String JavaDoc getLanguage()
172     {
173         return this.language;
174     }
175
176     /**
177      * Sets parsed object language
178      *
179      * @param language
180      */

181     public void setLanguage(String JavaDoc language)
182     {
183         this.language = language;
184     }
185
186     /**
187      * Returns parsed object searchable fields
188      *
189      * @return
190      */

191     public Map JavaDoc getFields()
192     {
193         return this.fields;
194     }
195
196     /**
197      * Sets parsed object searchable fields
198      *
199      * @param fields
200      */

201     public void setFields(Map JavaDoc fields)
202     {
203         this.fields = fields;
204     }
205
206     /**
207      * Returns parsed object URL
208      *
209      * @return
210      */

211     public URL JavaDoc getURL()
212     {
213         return this.url;
214     }
215
216     /**
217      * Sets parsed object URL
218      *
219      * @param fields
220      */

221     public void setURL(URL JavaDoc url)
222     {
223         this.url = url;
224     }
225
226     /**
227      * Getter for property score.
228      *
229      * @return Value of property score.
230      */

231     public float getScore()
232     {
233         return this.score;
234     }
235     
236     /**
237      * Setter for property score.
238      *
239      * @param score New value of property score.
240      */

241     public void setScore(float score)
242     {
243         this.score = score;
244     }
245
246     /**
247      * Getter for property className.
248      *
249      * @return Value of property className.
250      */

251     public String JavaDoc getClassName()
252     {
253         return className;
254     }
255
256     /**
257      * Setter for property className.
258      *
259      * @param score New value of property className.
260      */

261     public void setClassName(String JavaDoc className)
262     {
263        this.className = className;
264     }
265
266     /**
267      * @see org.apache.jetspeed.services.search.ParsedObject#getMultiFields()
268      */

269     public MultiMap getMultiFields()
270     {
271         return multiFields;
272     }
273
274     /**
275      * @see org.apache.jetspeed.services.search.ParsedObject#setMultiFields(org.apache.commons.collections.MultiMap)
276      */

277     public void setMultiFields(MultiMap multiFields)
278     {
279        this.multiFields = multiFields;
280         
281     }
282
283     /**
284      * @see org.apache.jetspeed.services.search.ParsedObject#getMultiKeywords()
285      */

286     public MultiMap getMultiKeywords()
287     {
288         return multiKeywords;
289     }
290
291     /**
292      * @see org.apache.jetspeed.services.search.ParsedObject#setMultiKeywords(org.apache.commons.collections.MultiMap)
293      */

294     public void setMultiKeywords(MultiMap multiKeywords)
295     {
296         this.multiKeywords = multiKeywords;
297     }
298
299 }
300
301
Popular Tags