1 7 8 package org.dom4j.tree; 9 10 import org.dom4j.Element; 11 12 22 public class DefaultEntity extends FlyweightEntity { 23 24 private Element parent; 25 26 32 public DefaultEntity(String name) { 33 super(name); 34 } 35 36 44 public DefaultEntity(String name, String text) { 45 super(name, text); 46 } 47 48 58 public DefaultEntity(Element parent, String name, String text) { 59 super(name, text); 60 this.parent = parent; 61 } 62 63 public void setName(String name) { 64 this.name = name; 65 } 66 67 public void setText(String text) { 68 this.text = text; 69 } 70 71 public Element getParent() { 72 return parent; 73 } 74 75 public void setParent(Element parent) { 76 this.parent = parent; 77 } 78 79 public boolean supportsParent() { 80 return true; 81 } 82 83 public boolean isReadOnly() { 84 return false; 85 } 86 } 87 88 124 | Popular Tags |