01: /*******************************************************************************
02: * Copyright (c) 2004, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.internal.intro.impl.model;
11:
12: import org.osgi.framework.Bundle;
13: import org.w3c.dom.Element;
14:
15: /**
16: * An intro image element.
17: */
18: public class IntroInclude extends AbstractIntroElement {
19:
20: protected static final String TAG_INCLUDE = "include"; //$NON-NLS-1$
21:
22: private static final String ATT_CONFIG_ID = "configId"; //$NON-NLS-1$
23: protected static final String ATT_PATH = "path"; //$NON-NLS-1$
24: /**
25: * boolean attribute, default is false.
26: */
27: private static final String ATT_MERGE_STYLE = "merge-style"; //$NON-NLS-1$
28:
29: private String configId;
30: private String path;
31: private boolean mergeStyle = false;
32:
33: IntroInclude(Element element, Bundle bundle) {
34: super (element, bundle);
35: configId = getAttribute(element, ATT_CONFIG_ID);
36: path = getAttribute(element, ATT_PATH);
37: String mergeStyleString = getAttribute(element, ATT_MERGE_STYLE);
38: mergeStyle = (mergeStyleString != null && mergeStyleString
39: .equalsIgnoreCase("true")) ? true : false; //$NON-NLS-1$
40: }
41:
42: /**
43: * @return Returns the configId.
44: */
45: public String getConfigId() {
46: return configId;
47: }
48:
49: /**
50: * @return Returns the mergeStyle.
51: */
52: public boolean getMergeStyle() {
53: return mergeStyle;
54: }
55:
56: /**
57: * @return Returns the path.
58: */
59: public String getPath() {
60: return path;
61: }
62:
63: /*
64: * (non-Javadoc)
65: *
66: * @see org.eclipse.ui.internal.intro.impl.model.IntroElement#getType()
67: */
68: public int getType() {
69: return AbstractIntroElement.INCLUDE;
70: }
71:
72: }
|