1 58 package org.apache.ecs.xml; 59 60 import org.apache.ecs.ConcreteElement; 61 import org.apache.ecs.Element; 62 import org.apache.ecs.Printable; 63 64 public class PI extends ConcreteElement implements Printable 65 { 66 { 68 setBeginStartModifier('?'); 69 setBeginEndModifier('?'); 70 setNeedClosingTag(false); 71 setElementType("xml"); 72 } 73 74 public PI() 75 { 76 } 77 78 82 public PI setVersion(String version) 83 { 84 addAttribute("version",version); 85 return(this); 86 } 87 88 92 public PI setVersion(float version) 93 { 94 setVersion(Float.toString(version)); 95 return(this); 96 } 97 98 102 public PI setVersion(double version) 103 { 104 setVersion(Double.toString(version)); 105 return(this); 106 } 107 108 114 public PI setTarget(String target) 115 { 116 setElementType(target); 117 return(this); 118 } 119 120 127 public PI addInstruction(String name, String value) { 128 addAttribute(name, value); 129 return(this); 130 } 131 132 137 public PI addElement(String hashcode,Element element) 138 { 139 addElementToRegistry(hashcode,element); 140 return(this); 141 } 142 147 public PI addElement(String hashcode,String element) 148 { 149 addElementToRegistry(hashcode,element); 150 return(this); 151 } 152 156 public PI addElement(Element element) 157 { 158 addElementToRegistry(element); 159 return(this); 160 } 161 165 public PI addElement(String element) 166 { 167 addElementToRegistry(element); 168 return(this); 169 } 170 174 public PI removeElement(String hashcode) 175 { 176 removeElementFromRegistry(hashcode); 177 return(this); 178 } 179 } 180 | Popular Tags |