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.DOMException;
  14. /**
  15. * @deprecated
  16. * This interface extends the <code>Document</code> interface with additional
  17. * methods for both document and AS editing.
  18. * <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
  19. and Save Specification</a>.
  20. */
  21. public interface DocumentAS {
  22. /**
  23. * The active external ASModel. Note that the active external
  24. * <code>ASModel</code> is responsible for consulting the internal
  25. * ASModel, so if an attribute is declared in the internal
  26. * <code>ASModel</code> and the corresponding <code>ownerElements</code>
  27. * points to a <code>ASElementDeclaration</code>s defined in the active
  28. * external ASModel, changing the active external ASModel will cause the
  29. * <code>ownerElements</code> to be recomputed. If the
  30. * <code>ownerElements</code> is not defined in the newly active
  31. * external ASModel, the <code>ownerElements</code> will be an empty
  32. * node list.
  33. */
  34. public ASModel getActiveASModel();
  35. /**
  36. * The active external ASModel. Note that the active external
  37. * <code>ASModel</code> is responsible for consulting the internal
  38. * ASModel, so if an attribute is declared in the internal
  39. * <code>ASModel</code> and the corresponding <code>ownerElements</code>
  40. * points to a <code>ASElementDeclaration</code>s defined in the active
  41. * external ASModel, changing the active external ASModel will cause the
  42. * <code>ownerElements</code> to be recomputed. If the
  43. * <code>ownerElements</code> is not defined in the newly active
  44. * external ASModel, the <code>ownerElements</code> will be an empty
  45. * node list.
  46. */
  47. public void setActiveASModel(ASModel activeASModel);
  48. /**
  49. * A list of <code>ASObject</code>s of type <code>AS_MODEL</code>s
  50. * associated with a document. The <code>addAS</code> method associates
  51. * a <code>ASModel</code> with a document.
  52. */
  53. public ASObjectList getBoundASModels();
  54. /**
  55. * A list of <code>ASObject</code>s of type <code>AS_MODEL</code>s
  56. * associated with a document. The <code>addAS</code> method associates
  57. * a <code>ASModel</code> with a document.
  58. */
  59. public void setBoundASModels(ASObjectList boundASModels);
  60. /**
  61. * Retrieve the internal <code>ASModel</code> of a document.
  62. * @return <code>ASModel</code>.
  63. */
  64. public ASModel getInternalAS();
  65. /**
  66. * Sets the internal subset <code>ASModel</code> of a document. This could
  67. * be null as a mechanism for "removal".
  68. * @param as <code>ASModel</code> to be the internal subset of the
  69. * document.
  70. */
  71. public void setInternalAS(ASModel as);
  72. /**
  73. * Associate a <code>ASModel</code> with a document. Can be invoked
  74. * multiple times to result in a list of <code>ASModel</code>s. Note
  75. * that only one internal <code>ASModel</code> is associated with the
  76. * document, however, and that only one of the possible list of
  77. * <code>ASModel</code>s is active at any one time.
  78. * @param as <code>ASModel</code> to be associated with the document.
  79. */
  80. public void addAS(ASModel as);
  81. /**
  82. * Removes a <code>ASModel</code> associated with a document. Can be
  83. * invoked multiple times to remove a number of these in the list of
  84. * <code>ASModel</code>s.
  85. * @param as The <code>ASModel</code> to be removed.
  86. */
  87. public void removeAS(ASModel as);
  88. /**
  89. * Gets the AS editing object describing this elementThis method needs to
  90. * be changed and others added.
  91. * @return ASElementDeclaration object if the implementation supports "
  92. * <code>AS-EDIT</code>" feature. Otherwise <code>null</code>.
  93. * @exception DOMException
  94. * NOT_FOUND_ERR: Raised if no <code>ASModel</code> is present.
  95. */
  96. public ASElementDeclaration getElementDeclaration()
  97. throws DOMException;
  98. /**
  99. * Validates the document against the <code>ASModel</code>.
  100. * @exception DOMASException
  101. *
  102. */
  103. public void validate()
  104. throws DOMASException;
  105. }