01: /******************************************************************************
02: * JBoss, a division of Red Hat *
03: * Copyright 2006, Red Hat Middleware, LLC, and individual *
04: * contributors as indicated by the @authors tag. See the *
05: * copyright.txt in the distribution for a full listing of *
06: * individual contributors. *
07: * *
08: * This is free software; you can redistribute it and/or modify it *
09: * under the terms of the GNU Lesser General Public License as *
10: * published by the Free Software Foundation; either version 2.1 of *
11: * the License, or (at your option) any later version. *
12: * *
13: * This software is distributed in the hope that it will be useful, *
14: * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16: * Lesser General Public License for more details. *
17: * *
18: * You should have received a copy of the GNU Lesser General Public *
19: * License along with this software; if not, write to the Free *
20: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
21: * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
22: ******************************************************************************/package org.jboss.portal.search;
23:
24: import org.jboss.portal.common.i18n.LocalizedString;
25: import org.jboss.portal.identity.metadata.profile.LocalizedStringMetaData;
26: import org.jboss.portal.search.result.ResultSet;
27:
28: /**
29: * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
30: * @version $Revision: 8784 $
31: */
32: public interface FederatedSearcher {
33:
34: /**
35: * Get the ID for this federated search
36: *
37: * @return String representing this particular federated search
38: */
39: public String getId();
40:
41: /**
42: * Get a localized name for this federated search
43: *
44: * @return String
45: */
46: public LocalizedString getDisplayName();
47:
48: /**
49: * Returns the query converter to apply on the Query
50: *
51: * @return
52: */
53: public QueryConverter getQueryConverter();
54:
55: /**
56: * From the query object this method is responsible to return the results of the query
57: *
58: * @param query
59: * @return
60: * @throws SearchingException
61: */
62: public ResultSet search(Query query) throws SearchingException;
63:
64: /**
65: * TODO: Subject to change...
66: * get the markup fragment for this federated search. A markup level is used
67: * to define different amount of information to provide.
68: * @param results
69: * @param markupLevel
70: * @return
71: */
72: /*
73: public String getMarkup(ResultSet results, int markupLevel);
74:
75: public interface MarkupLevel
76: {
77: public static final int FULL = 0;
78: public static final int REDUCED = 1;
79: }
80: */
81: }
|