KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > help > search > ISearchEngineResult2


1 /***************************************************************************************************
2  * Copyright (c) 2005 IBM Corporation and others. All rights reserved. This program and the
3  * accompanying materials are made available under the terms of the Eclipse Public License v1.0
4  * which accompanies this distribution, and is available at
5  * http://www.eclipse.org/legal/epl-v10.html
6  *
7  * Contributors: IBM Corporation - initial API and implementation
8  **************************************************************************************************/

9 package org.eclipse.help.search;
10
11 import java.net.URL JavaDoc;
12
13 /**
14  * An extension of the search result interface that allows engines to define engine result icon for
15  * each search result.
16  *
17  * @since 3.2
18  */

19
20
21 public interface ISearchEngineResult2 extends ISearchEngineResult {
22
23     /**
24      * Returns a unique identifier that can be associated with this search result. Search engines
25      * can optionally use this method to pass information on documents that are accessible via
26      * hashtables using a unique identifier. This method is typically used when the search result
27      * can open by itself.
28      *
29      * @see #canOpen()
30      * @see ISearchEngine2#open(String)
31      * @return unique identifier associated with this search result or <code>null</code> if not
32      * available or not needed.
33      */

34     String JavaDoc getId();
35
36     /**
37      * Returns an optional URL of the 16x16 icon to be used to render this search result. If not
38      * provided, the icon for the engine will be used.
39      *
40      * @return the URL of the icon to be used to render this search result or <code>null</code> to
41      * use the engine icon.
42      */

43     URL JavaDoc getIconURL();
44
45     /**
46      * Tests whether this result's open action should be delegated to search engine.
47      *
48      * @return <code>true</code> for engines that must open their results using non-standards
49      * means, or <code>false</code> for opening the result by the help system using the
50      * provided href.
51      */

52     boolean canOpen();
53 }
54
Popular Tags