1 16 17 package org.apache.xerces.dom; 18 19 import java.util.Vector ; 20 21 import org.w3c.dom.DOMException ; 22 import org.apache.xerces.dom3.as.*; 23 import org.apache.xerces.impl.xs.SchemaGrammar; 24 25 50 public class ASModelImpl implements ASModel { 51 52 boolean fNamespaceAware = true; 56 57 protected Vector fASModels; 60 protected SchemaGrammar fGrammar = null; 61 62 66 public ASModelImpl() { 67 fASModels = new Vector (); 68 } 69 70 public ASModelImpl(boolean isNamespaceAware) { 71 fASModels = new Vector (); 72 fNamespaceAware = isNamespaceAware; 73 } 74 75 79 82 public short getAsNodeType() { 83 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 84 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 85 } 86 87 92 public ASModel getOwnerASModel() { 93 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 94 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 95 } 96 97 102 public void setOwnerASModel(ASModel ownerASModel) { 103 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 104 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 105 } 106 107 111 public String getNodeName() { 112 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 113 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 114 } 115 116 120 public void setNodeName(String nodeName) { 121 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 122 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 123 } 124 125 129 public String getPrefix() { 130 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 131 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 132 } 133 134 138 public void setPrefix(String prefix) { 139 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 140 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 141 } 142 143 147 public String getLocalName() { 148 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 149 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 150 } 151 152 156 public void setLocalName(String localName) { 157 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 158 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 159 } 160 161 166 public String getNamespaceURI() { 167 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 168 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 169 } 170 171 176 public void setNamespaceURI(String namespaceURI) { 177 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 178 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 179 } 180 181 190 public ASObject cloneASObject(boolean deep) { 191 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 192 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 193 } 194 195 199 205 public boolean getIsNamespaceAware() { 206 return fNamespaceAware; 207 } 208 209 214 public short getUsageLocation() { 215 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 216 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 217 } 218 219 222 public String getAsLocation() { 223 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 224 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 225 } 226 227 230 public void setAsLocation(String asLocation) { 231 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 232 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 233 } 234 235 238 public String getAsHint() { 239 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 240 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 241 } 242 243 246 public void setAsHint(String asHint) { 247 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 248 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 249 } 250 251 255 public boolean getContainer() { 256 return (fGrammar != null); 257 } 258 259 266 public ASNamedObjectMap getElementDeclarations() { 267 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 268 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 269 } 270 271 278 public ASNamedObjectMap getAttributeDeclarations() { 279 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 280 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 281 } 282 283 290 public ASNamedObjectMap getNotationDeclarations() { 291 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 292 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 293 } 294 295 302 public ASNamedObjectMap getEntityDeclarations() { 303 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 304 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 305 } 306 307 314 public ASNamedObjectMap getContentModelDeclarations() { 315 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 316 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 317 } 318 319 324 public void addASModel(ASModel abstractSchema) { 325 fASModels.addElement(abstractSchema); 326 } 327 328 332 public ASObjectList getASModels() { 333 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 334 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 335 } 336 337 342 public void removeAS(ASModel as) { 343 fASModels.removeElement(as); 344 } 345 346 352 public boolean validate() { 353 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 354 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 355 } 356 357 361 public void importASObject(ASObject asobject) { 362 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 363 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 364 } 365 366 370 public void insertASObject(ASObject asobject) { 371 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 372 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 373 } 374 375 391 public ASElementDeclaration createASElementDeclaration(String namespaceURI, 392 String name) 393 throws DOMException { 394 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 395 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 396 } 397 398 410 public ASAttributeDeclaration createASAttributeDeclaration(String namespaceURI, 411 String name) 412 throws DOMException { 413 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 414 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 415 } 416 417 433 public ASNotationDeclaration createASNotationDeclaration(String namespaceURI, String name, 434 String systemId, String publicId) 435 throws DOMException { 436 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 437 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 438 } 439 440 449 public ASEntityDeclaration createASEntityDeclaration(String name) 450 throws DOMException { 451 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 452 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 453 } 454 455 469 public ASContentModel createASContentModel(int minOccurs, int maxOccurs, 470 short operator) throws DOMASException { 471 String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null); 472 throw new DOMException (DOMException.NOT_SUPPORTED_ERR, msg); 473 } 474 475 476 public SchemaGrammar getGrammar() { 478 return fGrammar; 479 } 480 public void setGrammar(SchemaGrammar grammar) { 481 fGrammar = grammar; 482 } 483 484 public Vector getInternalASModels() { 485 return fASModels; 486 } 487 488 } 489 | Popular Tags |