1 57 58 package org.xquark.xpath.datamodel.xerces.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 protected String version; 126 127 128 129 protected String notationName; 130 131 135 136 public EntityImpl(DocumentImpl ownerDoc, String name) { 137 super(ownerDoc); 138 this.name = name; 139 isReadOnly(true); 140 } 141 142 146 150 public short getNodeType() { 151 return Node.ENTITY_NODE; 152 } 153 154 157 public String getNodeName() { 158 if (needsSyncData()) { 159 synchronizeData(); 160 } 161 return name; 162 } 163 164 165 public Node cloneNode(boolean deep) { 166 EntityImpl newentity = (EntityImpl)super.cloneNode(deep); 167 return newentity; 168 } 169 170 174 178 public String getPublicId() { 179 180 if (needsSyncData()) { 181 synchronizeData(); 182 } 183 return publicId; 184 185 } 187 191 public String getSystemId() { 192 193 if (needsSyncData()) { 194 synchronizeData(); 195 } 196 return systemId; 197 198 } 200 204 public String getVersion() { 205 206 if (needsSyncData()) { 207 synchronizeData(); 208 } 209 return version; 210 211 } 213 214 218 public String getEncoding() { 219 220 if (needsSyncData()) { 221 synchronizeData(); 222 } 223 return encoding; 224 225 } 227 228 229 230 231 237 public String getNotationName() { 238 239 if (needsSyncData()) { 240 synchronizeData(); 241 } 242 return notationName; 243 244 } 246 250 253 public void setPublicId(String id) { 254 255 if (needsSyncData()) { 256 synchronizeData(); 257 } 258 publicId = id; 259 260 } 262 268 public void setEncoding(String value) { 269 270 if (needsSyncData()) { 271 synchronizeData(); 272 } 273 encoding = value; 274 275 } 277 278 284 public void setVersion(String value) { 285 286 if (needsSyncData()) { 287 synchronizeData(); 288 } 289 version = value; 290 291 } 293 294 298 public void setSystemId(String id) { 299 300 if (needsSyncData()) { 301 synchronizeData(); 302 } 303 systemId = id; 304 305 } 307 313 public void setNotationName(String name) { 314 315 if (needsSyncData()) { 316 synchronizeData(); 317 } 318 notationName = name; 319 320 } 322 } | Popular Tags |