KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 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 /**
14  * An <code>IToc</code> represents the root node of a toc, for either a complete
15  * toc (book) or a part of one to be assembled into a larger one.
16  *
17  * @since 2.0
18  */

19 public interface IToc extends IUAElement, IHelpResource {
20     /**
21      * This is element name used for TOC in XML files.
22      */

23     public final static String JavaDoc TOC = "toc"; //$NON-NLS-1$
24
/**
25      * This is the attribute used for description topic in XML files.
26      */

27     public final static String JavaDoc TOPIC = "topic"; //$NON-NLS-1$
28

29     /**
30      * Obtains the topics directly contained by a toc.
31      *
32      * @return Array of ITopic
33      */

34     public ITopic[] getTopics();
35
36     /**
37      * Returns a topic with the specified href defined by this TOC. <br>
38      * If the TOC contains multiple topics with the same href only of them
39      * (arbitrarily chosen) will be returned.
40      * <p>
41      * If no topic is specified, then the TOC description topic is returned, or
42      * null if there is no description topic for the TOC.
43      * </p>
44      *
45      * @param href the topic's URL or null
46      * @return ITopic or null
47      */

48     public ITopic getTopic(String JavaDoc href);
49 }
50
51
Popular Tags