KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > help > IHelpResource


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

11 package org.eclipse.help;
12 /**
13  * A help resource, usually a help topic.
14  * <p>
15  * This interface models a help resource. In general, help resources are either
16  * html help files, or table of contents XML files.
17  * </p>
18  *
19  * @since 2.0
20  */

21 public interface IHelpResource {
22
23     /**
24      * This is attribute name used for href in XML files.
25      */

26     public final static String JavaDoc HREF = "href"; //$NON-NLS-1$
27
/**
28      * This is attribute name used for label in XML files.
29      */

30     public final static String JavaDoc LABEL = "label"; //$NON-NLS-1$
31

32     /**
33      * Returns the URL (as a string) associated with this help resource.
34      *
35      * @return the URL (as a string) associated with the resource
36      * <p>
37      * Valid URL of a help resource is:
38      * <ul>
39      * <li>a <em>/pluginID/path/to/resource</em>, where
40      * <ul>
41      * <li><em>pluginID</em> is the unique identifier of the plugin
42      * containing the help resource,
43      * <li><em>path/to/document</em> is the help resource path,
44      * relative to the plugin directory.
45      * </ul>
46      * For example. <em>/myplugin/mytoc.xml</em> or
47      * <em>/myplugin/references/myclass.html</em> are vaild.
48      * <li>string representation of URI to an external document. In
49      * this case, all special characters have to be enoded such that the
50      * URI is appropriate to be opened with a web browser.
51      * <em>http://eclipse.org/documents/my%20file.html</em> and
52      * <em>jar:file:/c:/my%20sources/src.zip!/mypackage/MyClass.html</em>
53      * are examples of valid URIs.
54      * </ul>
55      * </p>
56      */

57     public String JavaDoc getHref();
58     /**
59      * Returns the label of this help resource.
60      *
61      * @return the label
62      */

63     public String JavaDoc getLabel();
64 }
65
Popular Tags