1 57 58 package com.sun.org.apache.xerces.internal.dom; 59 60 import org.w3c.dom.Entity ; 61 import org.w3c.dom.Node ; 62 63 97 public class EntityImpl 98 extends ParentNode 99 implements Entity { 100 101 105 106 static final long serialVersionUID = -3575760943444303423L; 107 108 112 113 protected String name; 114 115 116 protected String publicId; 117 118 119 protected String systemId; 120 121 122 protected String encoding; 123 124 125 126 protected String inputEncoding; 127 128 129 protected String version; 130 131 132 133 protected String notationName; 134 135 136 protected String baseURI; 137 138 142 143 public EntityImpl(CoreDocumentImpl ownerDoc, String name) { 144 super(ownerDoc); 145 this.name = name; 146 isReadOnly(true); 147 } 148 149 153 157 public short getNodeType() { 158 return Node.ENTITY_NODE; 159 } 160 161 164 public String getNodeName() { 165 if (needsSyncData()) { 166 synchronizeData(); 167 } 168 return name; 169 } 170 171 172 public Node cloneNode(boolean deep) { 173 EntityImpl newentity = (EntityImpl)super.cloneNode(deep); 174 newentity.setReadOnly(true, deep); 175 return newentity; 176 } 177 178 182 186 public String getPublicId() { 187 188 if (needsSyncData()) { 189 synchronizeData(); 190 } 191 return publicId; 192 193 } 195 199 public String getSystemId() { 200 201 if (needsSyncData()) { 202 synchronizeData(); 203 } 204 return systemId; 205 206 } 208 212 public String getXmlVersion() { 213 214 if (needsSyncData()) { 215 synchronizeData(); 216 } 217 return version; 218 219 } 221 222 226 public String getXmlEncoding() { 227 228 if (needsSyncData()) { 229 synchronizeData(); 230 } 231 232 return encoding; 233 234 } 236 237 238 239 240 246 public String getNotationName() { 247 248 if (needsSyncData()) { 249 synchronizeData(); 250 } 251 return notationName; 252 253 } 255 259 262 public void setPublicId(String id) { 263 264 if (needsSyncData()) { 265 synchronizeData(); 266 } 267 publicId = id; 268 269 } 271 278 public void setXmlEncoding(String value) { 279 if (needsSyncData()) { 280 synchronizeData(); 281 } 282 encoding = value; 283 } 285 286 293 public String getInputEncoding(){ 294 if (needsSyncData()) { 295 synchronizeData(); 296 } 297 return inputEncoding; 298 } 299 300 303 public void setInputEncoding(String inputEncoding){ 304 if (needsSyncData()) { 305 synchronizeData(); 306 } 307 this.inputEncoding = inputEncoding; 308 } 309 310 316 public void setXmlVersion(String value) { 317 if (needsSyncData()) { 318 synchronizeData(); 319 } 320 version = value; 321 } 323 324 328 public void setSystemId(String id) { 329 if (needsSyncData()) { 330 synchronizeData(); 331 } 332 systemId = id; 333 334 } 336 342 public void setNotationName(String name) { 343 if (needsSyncData()) { 344 synchronizeData(); 345 } 346 notationName = name; 347 348 } 350 351 352 356 public String getBaseURI() { 357 358 if (needsSyncData()) { 359 synchronizeData(); 360 } 361 return (baseURI!=null)?baseURI:((CoreDocumentImpl)getOwnerDocument()).getBaseURI(); 362 } 363 364 365 public void setBaseURI(String uri){ 366 if (needsSyncData()) { 367 synchronizeData(); 368 } 369 baseURI = uri; 370 } 371 372 373 374 } | Popular Tags |