1 7 8 package org.dom4j.tree; 9 10 import java.util.Map ; 11 12 import org.dom4j.Element; 13 14 24 public class DefaultProcessingInstruction extends 25 org.dom4j.tree.FlyweightProcessingInstruction { 26 27 private Element parent; 28 29 39 public DefaultProcessingInstruction(String target, Map values) { 40 super(target, values); 41 } 42 43 53 public DefaultProcessingInstruction(String target, String values) { 54 super(target, values); 55 } 56 57 69 public DefaultProcessingInstruction(Element parent, String target, 70 String values) { 71 super(target, values); 72 this.parent = parent; 73 } 74 75 public void setTarget(String target) { 76 this.target = target; 77 } 78 79 public void setText(String text) { 80 this.text = text; 81 this.values = parseValues(text); 82 } 83 84 public void setValues(Map values) { 85 this.values = values; 86 this.text = toString(values); 87 } 88 89 public void setValue(String name, String value) { 90 values.put(name, value); 91 } 92 93 public Element getParent() { 94 return parent; 95 } 96 97 public void setParent(Element parent) { 98 this.parent = parent; 99 } 100 101 public boolean supportsParent() { 102 return true; 103 } 104 105 public boolean isReadOnly() { 106 return false; 107 } 108 } 109 110 146 | Popular Tags |