1 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 ; 18 19 public class IndexEntry extends UAElement implements IIndexEntry { 20 21 public static final String NAME = "entry"; public static final String ATTRIBUTE_KEYWORD = "keyword"; 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 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 keyword) { 47 setAttribute(ATTRIBUTE_KEYWORD, keyword); 48 } 49 } 50 | Popular Tags |