Skip to main content
summaryrefslogtreecommitdiffstats
blob: eab184295139f39e20f5f4601e47708a46da2ff8 (plain) (blame)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
/*******************************************************************************
 * Copyright (c) 2007, 2009 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.internal.toc;

import org.eclipse.help.IToc;
import org.eclipse.help.ITocContribution;
import org.eclipse.help.internal.util.ProductPreferences;

public class TocContribution implements ITocContribution {

	private String categoryId;
	private String contributorId;
	private String[] extraDocuments;
	private String id;
	private String locale;
	private Toc toc;
	private boolean isPrimary;
	private boolean isSubToc;

	public TocContribution() {
		isSubToc = false;
	}

	@Override
	public String getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(String categoryId) {
		this.categoryId = categoryId;
	}

	@Override
	public String getContributorId() {
		return contributorId;
	}

	public void setContributorId(String contributorId) {
		this.contributorId = contributorId;
	}

	@Override
	public String[] getExtraDocuments() {
		return extraDocuments;
	}

	public void setExtraDocuments(String[] extraDocuments) {
		this.extraDocuments = extraDocuments;
	}

	@Override
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Override
	public String getLocale() {
		return locale;
	}

	public void setLocale(String locale) {
		this.locale = locale;
	}

	@Override
	public String getLinkTo() {
		String link = toc.getLinkTo();
		return ProductPreferences.resolveSpecialIdentifiers(link);
	}

	public void setLinkTo(String linkTo) {
		toc.setLinkTo(linkTo);
	}

	@Override
	public IToc getToc() {
		return toc;
	}

	public void setToc(Toc toc) {
		this.toc = toc;
		toc.setTocContribution(this);
	}

	@Override
	public boolean isPrimary() {
		return isPrimary;
	}

	public void setPrimary(boolean isPrimary) {
		this.isPrimary = isPrimary;
	}

	public boolean isSubToc() {
		return isSubToc;
	}

	public void setSubToc(boolean isSubToc) {
		this.isSubToc = isSubToc;
	}
}

Back to the top