KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > help > internal > index > IndexEntry


1 /*******************************************************************************
2  * Copyright (c) 2005, 2007 Intel 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  * Intel Corporation - initial API and implementation
10  * IBM Corporation - 122967 [Help] Remote help system
11  *******************************************************************************/

12 package org.eclipse.help.internal.index;
13
14 import org.eclipse.help.IIndexEntry;
15 import org.eclipse.help.ITopic;
16 import org.eclipse.help.internal.UAElement;
17 import org.w3c.dom.Element JavaDoc;
18
19 public class IndexEntry extends UAElement implements IIndexEntry {
20     
21     public static final String JavaDoc NAME = "entry"; //$NON-NLS-1$
22
public static final String JavaDoc ATTRIBUTE_KEYWORD = "keyword"; //$NON-NLS-1$
23

24     public IndexEntry(IIndexEntry src) {
25         super(NAME, src);
26         setKeyword(src.getKeyword());
27         appendChildren(src.getChildren());
28     }
29     
30     public IndexEntry(Element src) {
31         super(src);
32     }
33
34     public String JavaDoc getKeyword() {
35         return getAttribute(ATTRIBUTE_KEYWORD);
36     }
37     
38     public IIndexEntry[] getSubentries() {
39         return (IIndexEntry[])getChildren(IIndexEntry.class);
40     }
41     
42     public ITopic[] getTopics() {
43         return (ITopic[])getChildren(ITopic.class);
44     }
45     
46     public void setKeyword(String JavaDoc keyword) {
47         setAttribute(ATTRIBUTE_KEYWORD, keyword);
48     }
49 }
50
Popular Tags