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   * Contract for implementing a specific parsed object.
24   *
25   * @author <a href="mailto:morciuch@apache.org">Mark Orciuch</a>
26   * @version $Id: ParsedObject.java 516448 2007-03-09 16:25:47Z ate $
27   */
28  public interface ParsedObject
29  {
30  
31      public static final String FIELDNAME_KEY = "fieldname.key";
32      public static final String FIELDNAME_KEY_DEFAULT = "Key";
33      public static final String FIELDNAME_TYPE = "fieldname.type";
34      public static final String FIELDNAME_TYPE_DEFAULT = "Type";
35      public static final String FIELDNAME_CONTENT = "fieldname.content";
36      public static final String FIELDNAME_CONTENT_DEFAULT = "Content";
37      public static final String FIELDNAME_DESCRIPTION = "fieldname.description";
38      public static final String FIELDNAME_DESCRIPTION_DEFAULT = "Description";
39      public static final String FIELDNAME_TITLE = "fieldname.title";
40      public static final String FIELDNAME_TITLE_DEFAULT = "Title";
41      public static final String FIELDNAME_LANGUAGE = "fieldname.language";
42      public static final String FIELDNAME_LANGUAGE_DEFAULT = "Language";
43      public static final String FIELDNAME_FIELDS = "fieldname.fields";
44      public static final String FIELDNAME_FIELDS_DEFAULT = "Fields";
45      public static final String FIELDNAME_KEYWORDS = "fieldname.keywords";
46      public static final String FIELDNAME_KEYWORDS_DEFAULT = "Keywords";
47      public static final String FIELDNAME_URL = "fieldname.url";
48      public static final String FIELDNAME_URL_DEFAULT = "URL";
49      public static final String FIELDNAME_SCORE = "fieldname.score";
50      public static final String FIELDNAME_SCORE_DEFAULT = "Score";
51      public static final String FIELDNAME_CLASSNAME = "fieldname.className";
52      public static final String FIELDNAME_CLASSNAME_DEFAULT = "ClassName";
53  
54      // Known object types
55      public static final String OBJECT_TYPE_URL = "url";
56      public static final String OBJECT_TYPE_PORTLET = "portlet";
57      public static final String OBJECT_TYPE_PORTLET_APPLICATION = "portlet_application";
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      * 
118      * Returns parsed object keywords
119      * 
120      * @return 
121      */
122     public String[] getKeywords();
123 
124     /***
125      * 
126      * Sets parsed object keywords
127      * 
128      * @param keywords
129      */
130     public void setKeywords(String[] keywords);
131 
132     /***
133      * Returns parsed object title (cannot be null)
134      * 
135      * @return 
136      */
137     public String getTitle();
138 
139     /***
140      * Sets parsed object title (cannot be null)
141      * 
142      * @param title
143      */
144     public void setTitle(String title);
145 
146     /***
147      * Returns parsed object language  (cannot be null)
148      * 
149      * @return 
150      */
151     public String getLanguage();
152 
153     /***
154      * Sets parsed object language (cannot be null)
155      * 
156      * @param language
157      */
158     public void setLanguage(String language);
159 
160     /***
161      * 
162      * Returns parsed object searchable fields
163      * 
164      * @return 
165      */
166     public Map getFields();
167 
168     /***
169      * 
170      * Sets parsed object searchable fields
171      * 
172      * @param fields
173      */
174     public void setFields(Map fields);
175         
176     /***
177      * @return
178      */
179     public Map getKeywordsMap();
180     
181     /***
182      * @param multiKeywords
183      */
184     public void setKeywordsMap(Map keywordsMap);
185 
186     /***
187      * Returns parsed object URL
188      * 
189      * @return 
190      */
191     public URL getURL();
192 
193     /***
194      * Sets parsed object URL
195      * 
196      * @param url
197      */
198     public void setURL(URL url);
199 
200     /***
201      * Getter for property score.
202      * 
203      * @return Value of property score.
204      */
205     public float getScore();
206     
207     /***
208      * Setter for property score.
209      * 
210      * @param score  New value of property score.
211      */
212     public void setScore(float score);
213     
214     /***
215      * Getter for property className.
216      * 
217      * @return Value of property className.
218      */
219     public String getClassName();
220     
221     /***
222      * Setter for property className.
223      * 
224      * @param className  New value of property className.
225      */
226     public void setClassName(String className);
227 
228 }
229