1 /******************************************************************************* 2 * Copyright (c) 2007, 2015 IBM Corporation and others. 3 * 4 * This program and the accompanying materials 5 * are made available under the terms of the Eclipse Public License 2.0 6 * which accompanies this distribution, and is available at 7 * https://www.eclipse.org/legal/epl-2.0/ 8 * 9 * SPDX-License-Identifier: EPL-2.0 10 * 11 * Contributors: 12 * IBM Corporation - initial API and implementation 13 *******************************************************************************/ 14 package org.eclipse.help; 15 16 /** 17 * Represents either a complete or partial table of contents, as well as 18 * its metadata. 19 * 20 * @since 3.3 21 */ 22 public interface ITocContribution { 23 24 /** 25 * Returns the contribution's category id. Contributions with the same 26 * category id will be grouped together. 27 * 28 * @return the contribution's category id. 29 */ getCategoryId()30 public String getCategoryId(); 31 32 /** 33 * Returns the symbolic name of the bundle that made this contribution, 34 * e.g. "org.eclipse.help" 35 * 36 * @return the contributor id, e.g. "org.eclipse.help" 37 */ getContributorId()38 public String getContributorId(); 39 40 /** 41 * Returns the hrefs for any additional documents that are not in this TOC 42 * but are associated with it, and should be indexed for searching. 43 * 44 * @return any extra documents associated with the TOC 45 */ getExtraDocuments()46 public String[] getExtraDocuments(); 47 48 /** 49 * Returns a unique identifier for this contribution. 50 * 51 * @return the contribution's unique identifier 52 */ getId()53 public String getId(); 54 55 /** 56 * Returns the locale for this contribution. 57 * 58 * @return the contribution's locale 59 */ getLocale()60 public String getLocale(); 61 62 /** 63 * Returns the path to the anchor in another toc into which this 64 * one should be linked into. 65 * 66 * @return the link-to path 67 */ getLinkTo()68 public String getLinkTo(); 69 70 /** 71 * Returns the table of contents data for this contribution. 72 * 73 * @return the toc data for this contribution 74 */ getToc()75 public IToc getToc(); 76 77 /** 78 * Returns whether or not this is a top-level contribution (a book). 79 * 80 * @return whether the contribution is top-level book 81 */ isPrimary()82 public boolean isPrimary(); 83 } 84