View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    * 
9    *      http://www.apache.org/licenses/LICENSE-2.0
10   * 
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  package org.apache.jetspeed.search;
18  
19  import java.util.Map;
20  import java.net.URL;
21  
22  /***
23   * Base parsed object.
24   *
25   * @author <a href="mailto:morciuch@apache.org">Mark Orciuch</a>
26   * @version $Id: BaseParsedObject.java 516448 2007-03-09 16:25:47Z ate $
27   */
28  public class BaseParsedObject implements ParsedObject
29  {
30  
31      private String key;
32      private String type;
33      private String title;
34      private String description;
35      private String content;
36      private String language;
37      private URL url;
38      private String[] keywords;
39      private Map keywordsMap;
40      private Map fields;
41      private float score;
42      private String className;
43  
44      /***
45       * Returns parsed object key
46       * 
47       * @return 
48       */
49      public String getKey()
50      {
51          return this.key;
52      }
53  
54      /***
55       * Sets parsed object key
56       * 
57       * @param content
58       */
59      public void setKey(String key)
60      {
61          this.key = key;
62      }
63  
64      /***
65       * Returns parsed object type
66       * 
67       * @return 
68       */
69      public String getType()
70      {
71          return this.type;
72      }
73  
74      /***
75       * Sets parsed object type
76       * 
77       * @param type
78       */
79      public void setType(String type)
80      {
81          this.type = type;
82      }
83  
84      /***
85       * Returns parsed object content
86       * 
87       * @return 
88       */
89      public String getContent()
90      {
91          return this.content;
92      }
93  
94      /***
95       * Sets parsed object content
96       * 
97       * @param content
98       */
99      public void setContent(String content)
100     {
101         this.content = content;
102     }
103 
104     /***
105      * Returns parsed object description
106      * 
107      * @return 
108      */
109     public String getDescription()
110     {
111         return this.description;
112     }
113 
114     /***
115      * Sets parsed object description
116      * 
117      * @param description
118      */
119     public void setDescription(String description)
120     {
121         this.description = description;
122     }
123 
124     /***
125      * Returns parsed object keywords
126      * 
127      * @return 
128      */
129     public String[] getKeywords()
130     {
131         return this.keywords;
132     }
133 
134     /***
135      * Sets parsed object keywords
136      * 
137      * @param keywords
138      */
139     public void setKeywords(String[] keywords)
140     {
141         this.keywords = keywords;
142     }
143 
144     /***
145      * Returns parsed object title
146      * 
147      * @return 
148      */
149     public String getTitle() 
150     {
151         return this.title;
152     }
153 
154     /***
155      * Sets parsed object title
156      * 
157      * @param title
158      */
159     public void setTitle(String title)
160     {
161         this.title = title;
162     }
163 
164     /***
165      * Returns parsed object language
166      * 
167      * @return 
168      */
169     public String getLanguage()
170     {
171         return this.language;
172     }
173 
174     /***
175      * Sets parsed object language
176      * 
177      * @param language
178      */
179     public void setLanguage(String language)
180     {
181         this.language = language;
182     }
183 
184     /***
185      * Returns parsed object searchable fields
186      * 
187      * @return 
188      */
189     public Map getFields()
190     {
191         return this.fields;
192     }
193 
194     /***
195      * Sets parsed object searchable fields
196      * 
197      * @param fields
198      */
199     public void setFields(Map fields)
200     {
201         this.fields = fields;
202     }
203 
204     /***
205      * Returns parsed object URL
206      * 
207      * @return 
208      */
209     public URL getURL()
210     {
211         return this.url;
212     }
213 
214     /***
215      * Sets parsed object URL
216      * 
217      * @param fields
218      */
219     public void setURL(URL url)
220     {
221         this.url = url;
222     }
223 
224     /***
225      * Getter for property score.
226      * 
227      * @return Value of property score.
228      */
229     public float getScore()
230     {
231         return this.score;
232     }
233     
234     /***
235      * Setter for property score.
236      * 
237      * @param score  New value of property score.
238      */
239     public void setScore(float score)
240     {
241         this.score = score;
242     }
243 
244     /***
245      * Getter for property className.
246      * 
247      * @return Value of property className.
248      */
249     public String getClassName()
250     {
251         return className;
252     }
253 
254     /***
255      * Setter for property className.
256      * 
257      * @param score  New value of property className.
258      */
259     public void setClassName(String className)
260     {
261        this.className = className;        
262     }
263 
264     /* (non-Javadoc)
265      * @see org.apache.jetspeed.search.ParsedObject#getKeywordsMap()
266      */
267     public Map getKeywordsMap()
268     {
269         return keywordsMap;
270     }
271 
272     /* (non-Javadoc)
273      * @see org.apache.jetspeed.search.ParsedObject#setKeywordsMap(java.util.Map)
274      */
275     public void setKeywordsMap(Map keywordsMap)
276     {
277         this.keywordsMap = keywordsMap;        
278     }
279 
280 }
281