1. /*
  2. * Copyright (c) 2001 World Wide Web Consortium,
  3. * (Massachusetts Institute of Technology, Institut National de
  4. * Recherche en Informatique et en Automatique, Keio University). All
  5. * Rights Reserved. This program is distributed under the W3C's Software
  6. * Intellectual Property License. This program is distributed in the
  7. * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
  8. * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  9. * PURPOSE.
  10. * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
  11. */
  12. package com.sun.org.apache.xerces.internal.dom3.as;
  13. /**
  14. * @deprecated
  15. * Abstract Schemas operations may throw a <code>DOMSystemException</code> as
  16. * described in their descriptions.
  17. * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
  18. and Save Specification</a>.
  19. */
  20. public class DOMASException extends RuntimeException {
  21. public DOMASException(short code, String message) {
  22. super(message);
  23. this.code = code;
  24. }
  25. public short code;
  26. // ASExceptionCode
  27. /**
  28. * If an element declaration already exists with the same name within an
  29. * <code>AS_CHOICE</code> operator.
  30. */
  31. public static final short DUPLICATE_NAME_ERR = 1;
  32. /**
  33. * If the type of the <code>ASObject</code> is neither an
  34. * <code>ASContentModel</code> nor an <code>ASElementDeclaration</code>.
  35. */
  36. public static final short TYPE_ERR = 2;
  37. /**
  38. * If the <code>DocumentEditAS</code> related to the node does not have
  39. * any active <code>ASModel</code> and <code>wfValidityCheckLevel</code>
  40. * is set to <code>PARTIAL</code> or <code>STRICT_VALIDITY_CHECK</code>.
  41. */
  42. public static final short NO_AS_AVAILABLE = 3;
  43. /**
  44. * When <code>mimeTypeCheck</code> is <code>true</code> and the input
  45. * source has an incorrect MIME Type. See the attribute
  46. * <code>mimeTypeCheck</code>.
  47. */
  48. public static final short WRONG_MIME_TYPE_ERR = 4;
  49. }