1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*******************************************************************************
 * Copyright (c) 2000, 2007 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.help;

/**
 * An <code>IToc</code> represents the root node of a toc, for either a complete
 * toc (book) or a part of one to be assembled into a larger one.
 * 
 * @since 2.0
 */
public interface IToc extends IUAElement, IHelpResource {
    /**
     * This is element name used for TOC in XML files.
     */
    public final static String TOC = "toc"; //$NON-NLS-1$
    /**
     * This is the attribute used for description topic in XML files.
     */
    public final static String TOPIC = "topic"; //$NON-NLS-1$
    
    /**
     * Obtains the topics directly contained by a toc.
     * 
     * @return Array of ITopic
     */
    public ITopic[] getTopics();

    /**
     * Returns a topic with the specified href defined by this TOC. <br>
     * If the TOC contains multiple topics with the same href only of them
     * (arbitrarily chosen) will be returned.
     * <p>
     * If no topic is specified, then the TOC description topic is returned, or
     * null if there is no description topic for the TOC.
     * </p>
     * 
     * @param href the topic's URL or null
     * @return ITopic or null
     */
    public ITopic getTopic(String href);
}

			
			

Browsed Source: [clear]