1 7 8 package org.dom4j.tree; 9 10 import org.dom4j.Element; 11 import org.dom4j.Namespace; 12 import org.dom4j.QName; 13 14 23 public class DefaultAttribute extends FlyweightAttribute { 24 25 private Element parent; 26 27 public DefaultAttribute(QName qname) { 28 super(qname); 29 } 30 31 public DefaultAttribute(QName qname, String value) { 32 super(qname, value); 33 } 34 35 public DefaultAttribute(Element parent, QName qname, String value) { 36 super(qname, value); 37 this.parent = parent; 38 } 39 40 49 public DefaultAttribute(String name, String value) { 50 super(name, value); 51 } 52 53 64 public DefaultAttribute(String name, String value, Namespace namespace) { 65 super(name, value, namespace); 66 } 67 68 81 public DefaultAttribute(Element parent, String name, String value, 82 Namespace namespace) { 83 super(name, value, namespace); 84 this.parent = parent; 85 } 86 87 public void setValue(String value) { 88 this.value = value; 89 } 90 91 public Element getParent() { 92 return parent; 93 } 94 95 public void setParent(Element parent) { 96 this.parent = parent; 97 } 98 99 public boolean supportsParent() { 100 return true; 101 } 102 103 public boolean isReadOnly() { 104 return false; 105 } 106 } 107 108 144 | Popular Tags |