KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > help > internal > context > ContextsNode


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM 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  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.help.internal.context;
12 import java.util.ArrayList JavaDoc;
13 import java.util.List JavaDoc;
14
15 import org.eclipse.help.internal.FilterableUAElement;
16 import org.xml.sax.*;
17 /**
18  * Object in hierarchy of context contributions
19  */

20 public abstract class ContextsNode extends FilterableUAElement {
21     public static final String JavaDoc CONTEXTS_ELEM = "contexts"; //$NON-NLS-1$
22
public static final String JavaDoc CONTEXT_ELEM = "context"; //$NON-NLS-1$
23
public static final String JavaDoc DESC_ELEM = "description"; //$NON-NLS-1$
24
public static final String JavaDoc RELATED_ELEM = "topic"; //$NON-NLS-1$
25
public static final String JavaDoc RELATED_HREF = "href"; //$NON-NLS-1$
26
public static final String JavaDoc RELATED_LABEL = "label"; //$NON-NLS-1$
27
/**
28      * Internal representation of <b> - unlikely to occur in a text
29      */

30     public static final String JavaDoc BOLD_CLOSE_TAG = "</@#$b>"; //$NON-NLS-1$
31
/**
32      * Internal representation of &lt;b&gt; - unlikely to occur in a text
33      */

34     public static final String JavaDoc BOLD_TAG = "<@#$b>"; //$NON-NLS-1$
35
public static final String JavaDoc DESC_TXT_BOLD = "b"; //$NON-NLS-1$
36
protected List JavaDoc children = new ArrayList JavaDoc();
37     /**
38      * When a builder builds the contexts, each node must "accomodate" the
39      * builder by responding to the build() command.
40      */

41     public abstract void build(ContextsBuilder builder);
42     /**
43      * ContextsNode constructor.
44      */

45     public ContextsNode(Attributes attrs) {
46         addFilters(attrs);
47     }
48     /**
49      * Adds a child
50      *
51      * @param child
52      * IContextsNode
53      */

54     public void addChild(ContextsNode child) {
55         children.add(children.size(), child);
56     }
57     /**
58      * Obtains children
59      */

60     public List JavaDoc getChildren() {
61         return children;
62     }
63 }
64
Popular Tags