KickJava   Java API By Example, From Geeks To Geeks.

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


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  * 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 JavaDoc FIELDNAME_KEY = "fieldname.key";
33     public static final String JavaDoc FIELDNAME_KEY_DEFAULT = "Key";
34     public static final String JavaDoc FIELDNAME_TYPE = "fieldname.type";
35     public static final String JavaDoc FIELDNAME_TYPE_DEFAULT = "Type";
36     public static final String JavaDoc FIELDNAME_CONTENT = "fieldname.content";
37     public static final String JavaDoc FIELDNAME_CONTENT_DEFAULT = "Content";
38     public static final String JavaDoc FIELDNAME_DESCRIPTION = "fieldname.description";
39     public static final String JavaDoc FIELDNAME_DESCRIPTION_DEFAULT = "Description";
40     public static final String JavaDoc FIELDNAME_TITLE = "fieldname.title";
41     public static final String JavaDoc FIELDNAME_TITLE_DEFAULT = "Title";
42     public static final String JavaDoc FIELDNAME_LANGUAGE = "fieldname.language";
43     public static final String JavaDoc FIELDNAME_LANGUAGE_DEFAULT = "Language";
44     public static final String JavaDoc FIELDNAME_FIELDS = "fieldname.fields";
45     public static final String JavaDoc FIELDNAME_FIELDS_DEFAULT = "Fields";
46     public static final String JavaDoc FIELDNAME_KEYWORDS = "fieldname.keywords";
47     public static final String JavaDoc FIELDNAME_KEYWORDS_DEFAULT = "Keywords";
48     public static final String JavaDoc FIELDNAME_URL = "fieldname.url";
49     public static final String JavaDoc FIELDNAME_URL_DEFAULT = "URL";
50     public static final String JavaDoc FIELDNAME_SCORE = "fieldname.score";
51     public static final String JavaDoc FIELDNAME_SCORE_DEFAULT = "Score";
52     public static final String JavaDoc FIELDNAME_CLASSNAME = "fieldname.className";
53     public static final String JavaDoc FIELDNAME_CLASSNAME_DEFAULT = "ClassName";
54
55     // Known object types
56
public static final String JavaDoc OBJECT_TYPE_URL = "url";
57     public static final String JavaDoc OBJECT_TYPE_PORTLET = "portlet";
58     public static final String JavaDoc OBJECT_TYPE_PDF = "pdf";
59
60     /**
61      * Returns parsed object key (cannot be null)
62      *
63      * @return
64      */

65     public String JavaDoc getKey();
66
67     /**
68      * Sets parsed object key (cannot be null)
69      *
70      * @param type
71      */

72     public void setKey(String JavaDoc key);
73
74     /**
75      * Returns parsed object type (cannot be null)
76      *
77      * @return
78      */

79     public String JavaDoc getType();
80
81     /**
82      * Sets parsed object type (cannot be null)
83      *
84      * @param type
85      */

86     public void setType(String JavaDoc type);
87
88     /**
89      * Returns parsed object content (cannot be null)
90      *
91      * @return
92      */

93     public String JavaDoc getContent();
94
95     /**
96      * Sets parsed object content (cannot be null)
97      *
98      * @param content
99      */

100     public void setContent(String JavaDoc content);
101
102     /**
103      * Returns parsed object description (cannot be null)
104      *
105      * @return
106      */

107     public String JavaDoc getDescription();
108
109     /**
110      * Sets parsed object description (cannot be null)
111      *
112      * @param description
113      */

114     public void setDescription(String JavaDoc description);
115
116     /**
117      * @deprecated
118      *
119      * Returns parsed object keywords
120      *
121      * @return
122      */

123     public String JavaDoc[] getKeywords();
124
125     /**
126      * @deprecated
127      *
128      * Sets parsed object keywords
129      *
130      * @param keywords
131      */

132     public void setKeywords(String JavaDoc[] keywords);
133
134     /**
135      * Returns parsed object title (cannot be null)
136      *
137      * @return
138      */

139     public String JavaDoc getTitle();
140
141     /**
142      * Sets parsed object title (cannot be null)
143      *
144      * @param title
145      */

146     public void setTitle(String JavaDoc title);
147
148     /**
149      * Returns parsed object language (cannot be null)
150      *
151      * @return
152      */

153     public String JavaDoc getLanguage();
154
155     /**
156      * Sets parsed object language (cannot be null)
157      *
158      * @param language
159      */

160     public void setLanguage(String JavaDoc language);
161
162     /**
163      * @deprecated
164      *
165      * Returns parsed object searchable fields
166      *
167      * @return
168      */

169     public Map JavaDoc getFields();
170
171     /**
172      * @deprecated
173      *
174      * Sets parsed object searchable fields
175      *
176      * @param fields
177      */

178     public void setFields(Map JavaDoc 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 JavaDoc getURL();
206
207     /**
208      * Sets parsed object URL
209      *
210      * @param url
211      */

212     public void setURL(URL JavaDoc 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 JavaDoc getClassName();
234     
235     /**
236      * Setter for property className.
237      *
238      * @param className New value of property className.
239      */

240     public void setClassName(String JavaDoc className);
241
242 }
243
244
Popular Tags