1 57 58 package org.enhydra.apache.xerces.dom; 59 60 import org.w3c.dom.DOMException ; 61 import org.w3c.dom.Node ; 62 import org.w3c.dom.Notation ; 63 64 85 public class NotationImpl 86 extends NodeImpl 87 implements Notation { 88 89 93 94 static final long serialVersionUID = -764632195890658402L; 95 96 100 101 protected String name; 102 103 104 protected String publicId; 105 106 107 protected String systemId; 108 109 113 114 public NotationImpl(CoreDocumentImpl ownerDoc, String name) { 115 super(ownerDoc); 116 this.name = name; 117 } 118 119 123 127 public short getNodeType() { 128 return Node.NOTATION_NODE; 129 } 130 131 134 public String getNodeName() { 135 if (needsSyncData()) { 136 synchronizeData(); 137 } 138 return name; 139 } 140 141 145 149 public String getPublicId() { 150 151 if (needsSyncData()) { 152 synchronizeData(); 153 } 154 return publicId; 155 156 } 158 162 public String getSystemId() { 163 164 if (needsSyncData()) { 165 synchronizeData(); 166 } 167 return systemId; 168 169 } 171 175 179 public void setPublicId(String id) { 180 181 if (isReadOnly()) { 182 throw new DOMException ( 183 DOMException.NO_MODIFICATION_ALLOWED_ERR, 184 "DOM001 Modification not allowed"); 185 } 186 if (needsSyncData()) { 187 synchronizeData(); 188 } 189 publicId = id; 190 191 } 193 197 public void setSystemId(String id) { 198 199 if(isReadOnly()) { 200 throw new DOMException ( 201 DOMException.NO_MODIFICATION_ALLOWED_ERR, 202 "DOM001 Modification not allowed"); 203 } 204 if (needsSyncData()) { 205 synchronizeData(); 206 } 207 systemId = id; 208 209 } 211 } | Popular Tags |