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. import org.w3c.dom.ls.LSInput;
  14. import org.w3c.dom.ls.LSParser;
  15. /**
  16. * @deprecated
  17. * An Abstract Schema parser interface.
  18. * <p><code>DOMASBuilder</code> provides an API for parsing Abstract Schemas
  19. * and building the corresponding <code>ASModel</code> tree.
  20. * <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
  21. and Save Specification</a>.
  22. */
  23. public interface DOMASBuilder extends LSParser {
  24. /**
  25. * Associate an <code>ASModel</code> with a <code>LSParser</code>. This
  26. * <code>ASModel</code> will be used by the "
  27. * <code>validate-if-schema</code>" and "
  28. * <code>datatype-normalization</code>" options during the load of a new
  29. * <code>Document</code>.
  30. */
  31. public ASModel getAbstractSchema();
  32. /**
  33. * Associate an <code>ASModel</code> with a <code>LSParser</code>. This
  34. * <code>ASModel</code> will be used by the "
  35. * <code>validate-if-schema</code>" and "
  36. * <code>datatype-normalization</code>" options during the load of a new
  37. * <code>Document</code>.
  38. */
  39. public void setAbstractSchema(ASModel abstractSchema);
  40. /**
  41. * Parse a Abstract Schema from a location identified by an URI reference.
  42. * @param uri The location of the Abstract Schema to be read.
  43. * @return The newly created Abstract Schema.
  44. * @exception DOMASException
  45. * Exceptions raised by <code>parseASURI()</code> originate with the
  46. * installed ErrorHandler, and thus depend on the implementation of
  47. * the <code>DOMErrorHandler</code> interfaces. The default error
  48. * handlers will raise a <code>DOMASException</code> if any form of
  49. * Abstract Schema inconsistencies or warning occurs during the parse,
  50. * but application defined errorHandlers are not required to do so.
  51. * <br> WRONG_MIME_TYPE_ERR: Raised when <code>mimeTypeCheck</code> is
  52. * <code>true</code> and the input source has an incorrect MIME Type.
  53. * See the attribute <code>mimeTypeCheck</code>.
  54. * @exception DOMSystemException
  55. * Exceptions raised by <code>parseURI()</code> originate with the
  56. * installed ErrorHandler, and thus depend on the implementation of
  57. * the <code>DOMErrorHandler</code> interfaces. The default error
  58. * handlers will raise a DOMSystemException if any form I/O or other
  59. * system error occurs during the parse, but application defined error
  60. * handlers are not required to do so.
  61. */
  62. public ASModel parseASURI(String uri)
  63. throws DOMASException, Exception;
  64. /**
  65. * Parse a Abstract Schema from a location identified by an
  66. * <code>LSInput</code>.
  67. * @param is The <code>LSInput</code> from which the source
  68. * Abstract Schema is to be read.
  69. * @return The newly created <code>ASModel</code>.
  70. * @exception DOMASException
  71. * Exceptions raised by <code>parseASURI()</code> originate with the
  72. * installed ErrorHandler, and thus depend on the implementation of
  73. * the <code>DOMErrorHandler</code> interfaces. The default error
  74. * handlers will raise a <code>DOMASException</code> if any form of
  75. * Abstract Schema inconsistencies or warning occurs during the parse,
  76. * but application defined errorHandlers are not required to do so.
  77. * <br> Raise a WRONG_MIME_TYPE_ERR when <code>mimeTypeCheck</code> is
  78. * <code>true</code> and the inputsource has an incorrect MIME Type.
  79. * See attribute <code>mimeTypeCheck</code>.
  80. * @exception DOMSystemException
  81. * Exceptions raised by <code>parseURI()</code> originate with the
  82. * installed ErrorHandler, and thus depend on the implementation of
  83. * the <code>DOMErrorHandler</code> interfaces. The default error
  84. * handlers will raise a DOMSystemException if any form I/O or other
  85. * system error occurs during the parse, but application defined error
  86. * handlers are not required to do so.
  87. */
  88. public ASModel parseASInputSource(LSInput is)
  89. throws DOMASException, Exception;
  90. }