KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > help > internal > xhtml > UAInclude


1 /***************************************************************************************************
2  * Copyright (c) 2004, 2006 IBM Corporation and others. All rights reserved. This program and the
3  * accompanying materials are made available under the terms of the Eclipse Public License v1.0
4  * which accompanies this distribution, and is available at
5  * http://www.eclipse.org/legal/epl-v10.html
6  *
7  * Contributors: IBM Corporation - initial API and implementation
8  **************************************************************************************************/

9
10 package org.eclipse.help.internal.xhtml;
11
12 import org.w3c.dom.Element JavaDoc;
13
14
15 public class UAInclude extends AbstractUAElement {
16
17     protected static final String JavaDoc TAG_INCLUDE = "include"; //$NON-NLS-1$
18
protected static final String JavaDoc ATT_PATH = "path"; //$NON-NLS-1$
19
/**
20      * boolean attribute, default is false.
21      */

22     private static final String JavaDoc ATT_MERGE_STYLE = "merge-style"; //$NON-NLS-1$
23

24     private String JavaDoc path;
25     private boolean mergeStyle = false;
26
27     public UAInclude(Element JavaDoc element) {
28         path = getAttribute(element, ATT_PATH);
29         String JavaDoc mergeStyleString = getAttribute(element, ATT_MERGE_STYLE);
30         mergeStyle = (mergeStyleString != null && mergeStyleString.equalsIgnoreCase("true")) ? true : false; //$NON-NLS-1$
31
}
32
33
34     /**
35      * @return Returns the mergeStyle.
36      */

37     public boolean getMergeStyle() {
38         return mergeStyle;
39     }
40
41     /**
42      * @return Returns the path.
43      */

44     public String JavaDoc getPath() {
45         return path;
46     }
47
48
49
50 }
51
Popular Tags