1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.jetspeed.services.search;
17
18 import java.util.Map;
19 import java.net.URL;
20
21 import org.apache.commons.collections.MultiMap;
22
23 /***
24 * Contract for implementing a specific parsed object.
25 *
26 * @author <a href="mailto:morciuch@apache.org">Mark Orciuch</a>
27 * @version $Id: ParsedObject.java,v 1.4 2004/02/23 03:48:47 jford Exp $
28 */
29 public interface ParsedObject
30 {
31
32 public static final String FIELDNAME_KEY = "fieldname.key";
33 public static final String FIELDNAME_KEY_DEFAULT = "Key";
34 public static final String FIELDNAME_TYPE = "fieldname.type";
35 public static final String FIELDNAME_TYPE_DEFAULT = "Type";
36 public static final String FIELDNAME_CONTENT = "fieldname.content";
37 public static final String FIELDNAME_CONTENT_DEFAULT = "Content";
38 public static final String FIELDNAME_DESCRIPTION = "fieldname.description";
39 public static final String FIELDNAME_DESCRIPTION_DEFAULT = "Description";
40 public static final String FIELDNAME_TITLE = "fieldname.title";
41 public static final String FIELDNAME_TITLE_DEFAULT = "Title";
42 public static final String FIELDNAME_LANGUAGE = "fieldname.language";
43 public static final String FIELDNAME_LANGUAGE_DEFAULT = "Language";
44 public static final String FIELDNAME_FIELDS = "fieldname.fields";
45 public static final String FIELDNAME_FIELDS_DEFAULT = "Fields";
46 public static final String FIELDNAME_KEYWORDS = "fieldname.keywords";
47 public static final String FIELDNAME_KEYWORDS_DEFAULT = "Keywords";
48 public static final String FIELDNAME_URL = "fieldname.url";
49 public static final String FIELDNAME_URL_DEFAULT = "URL";
50 public static final String FIELDNAME_SCORE = "fieldname.score";
51 public static final String FIELDNAME_SCORE_DEFAULT = "Score";
52 public static final String FIELDNAME_CLASSNAME = "fieldname.className";
53 public static final String FIELDNAME_CLASSNAME_DEFAULT = "ClassName";
54
55
56 public static final String OBJECT_TYPE_URL = "url";
57 public static final String OBJECT_TYPE_PORTLET = "portlet";
58 public static final String OBJECT_TYPE_PDF = "pdf";
59
60 /***
61 * Returns parsed object key (cannot be null)
62 *
63 * @return
64 */
65 public String getKey();
66
67 /***
68 * Sets parsed object key (cannot be null)
69 *
70 * @param type
71 */
72 public void setKey(String key);
73
74 /***
75 * Returns parsed object type (cannot be null)
76 *
77 * @return
78 */
79 public String getType();
80
81 /***
82 * Sets parsed object type (cannot be null)
83 *
84 * @param type
85 */
86 public void setType(String type);
87
88 /***
89 * Returns parsed object content (cannot be null)
90 *
91 * @return
92 */
93 public String getContent();
94
95 /***
96 * Sets parsed object content (cannot be null)
97 *
98 * @param content
99 */
100 public void setContent(String content);
101
102 /***
103 * Returns parsed object description (cannot be null)
104 *
105 * @return
106 */
107 public String getDescription();
108
109 /***
110 * Sets parsed object description (cannot be null)
111 *
112 * @param description
113 */
114 public void setDescription(String description);
115
116 /***
117 * @deprecated
118 *
119 * Returns parsed object keywords
120 *
121 * @return
122 */
123 public String[] getKeywords();
124
125 /***
126 * @deprecated
127 *
128 * Sets parsed object keywords
129 *
130 * @param keywords
131 */
132 public void setKeywords(String[] keywords);
133
134 /***
135 * Returns parsed object title (cannot be null)
136 *
137 * @return
138 */
139 public String getTitle();
140
141 /***
142 * Sets parsed object title (cannot be null)
143 *
144 * @param title
145 */
146 public void setTitle(String title);
147
148 /***
149 * Returns parsed object language (cannot be null)
150 *
151 * @return
152 */
153 public String getLanguage();
154
155 /***
156 * Sets parsed object language (cannot be null)
157 *
158 * @param language
159 */
160 public void setLanguage(String language);
161
162 /***
163 * @deprecated
164 *
165 * Returns parsed object searchable fields
166 *
167 * @return
168 */
169 public Map getFields();
170
171 /***
172 * @deprecated
173 *
174 * Sets parsed object searchable fields
175 *
176 * @param fields
177 */
178 public void setFields(Map fields);
179
180 /***
181 * @return
182 */
183 public MultiMap getMultiFields();
184
185 /***
186 * @param multiFields
187 */
188 public void setMultiFields(MultiMap multiFields);
189
190 /***
191 * @return
192 */
193 public MultiMap getMultiKeywords();
194
195 /***
196 * @param multiKeywords
197 */
198 public void setMultiKeywords(MultiMap multiKeywords);
199
200 /***
201 * Returns parsed object URL
202 *
203 * @return
204 */
205 public URL getURL();
206
207 /***
208 * Sets parsed object URL
209 *
210 * @param url
211 */
212 public void setURL(URL url);
213
214 /***
215 * Getter for property score.
216 *
217 * @return Value of property score.
218 */
219 public float getScore();
220
221 /***
222 * Setter for property score.
223 *
224 * @param score New value of property score.
225 */
226 public void setScore(float score);
227
228 /***
229 * Getter for property className.
230 *
231 * @return Value of property className.
232 */
233 public String getClassName();
234
235 /***
236 * Setter for property className.
237 *
238 * @param className New value of property className.
239 */
240 public void setClassName(String className);
241
242 }
243