1 9 10 package org.eclipse.help.internal.xhtml; 11 12 import org.eclipse.help.internal.util.StringUtil; 13 import org.osgi.framework.Bundle; 14 import org.w3c.dom.Element ; 15 16 17 public abstract class AbstractUAElement { 18 19 private Bundle bundle; 20 21 AbstractUAElement() { 22 } 23 24 25 32 AbstractUAElement(Element element, Bundle bundle) { 33 this.bundle = bundle; 34 } 35 36 37 38 46 protected String getAttribute(Element element, String att) { 47 if (element.hasAttribute(att)) 48 return element.getAttribute(att); 49 return null; 50 } 51 52 59 protected String [] getAttributeList(Element element, String att) { 60 if (element.hasAttribute(att)) 61 return StringUtil.split(element.getAttribute(att), ","); return null; 63 } 64 65 66 72 public Bundle getBundle() { 73 return bundle; 74 } 75 76 77 78 79 } 80 | Popular Tags |