View Javadoc

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.Set;
19  
20  /***
21   * Contract for implementing a specific object handler. Implementation
22   * should convert the object into a document suitable for placement into
23   * search index.
24   * 
25   * @author <a href="mailto:morciuch@apache.org">Mark Orciuch</a>
26   * @version $Id: ObjectHandler.java,v 1.4 2004/02/23 03:48:47 jford Exp $
27   */
28  public interface ObjectHandler
29  {
30      /***
31       * Parses a specific object into a document suitable for index placement
32       * 
33       * @param o
34       * @return 
35       */
36      public ParsedObject parseObject(Object o);
37      
38      /***
39       * Returns the set of fields used to create the parsed object.
40       * @return
41       */
42      public Set getFields();
43      
44      /***
45       * Returns the set of keywords used to create the parsed object.
46       * @return
47       */
48      public Set getKeywords();
49  }
50