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. * The element name along with the content specification in the context of an
  16. * <code>ASObject</code>.
  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 interface ASElementDeclaration extends ASObject {
  21. // CONTENT_MODEL_TYPES
  22. /**
  23. * Represents an EMPTY content type for an Element declaration.
  24. */
  25. public static final short EMPTY_CONTENTTYPE = 1;
  26. /**
  27. * Represents an ANY content type for an Element declaration.
  28. */
  29. public static final short ANY_CONTENTTYPE = 2;
  30. /**
  31. * Represents a MIXED content type for an Element declaration. Note that
  32. * <code>isPCDataOnly</code> would also need to checked, in addition to
  33. * this, if an element's content model was simply text, as an example.
  34. */
  35. public static final short MIXED_CONTENTTYPE = 3;
  36. /**
  37. * Represents an ELEMENTS only content type for an Element declaration.
  38. */
  39. public static final short ELEMENTS_CONTENTTYPE = 4;
  40. /**
  41. * A boolean defining whether the element order and number of the child
  42. * elements for mixed content type has to be respected or not. For
  43. * example XML Schema defined mixed content types the order is important
  44. * and needs to be respected whether for DTD based AS the order and
  45. * number of child elements are not important.
  46. */
  47. public boolean getStrictMixedContent();
  48. /**
  49. * A boolean defining whether the element order and number of the child
  50. * elements for mixed content type has to be respected or not. For
  51. * example XML Schema defined mixed content types the order is important
  52. * and needs to be respected whether for DTD based AS the order and
  53. * number of child elements are not important.
  54. */
  55. public void setStrictMixedContent(boolean strictMixedContent);
  56. /**
  57. * Datatype of the element.
  58. */
  59. public ASDataType getElementType();
  60. /**
  61. * Datatype of the element.
  62. */
  63. public void setElementType(ASDataType elementType);
  64. /**
  65. * Boolean defining whether the element type contains child elements and
  66. * PCDATA or PCDATA only for mixed element types. <code>true</code> if
  67. * the element is of type PCDATA only. Relevant only for mixed content
  68. * type elements.
  69. */
  70. public boolean getIsPCDataOnly();
  71. /**
  72. * Boolean defining whether the element type contains child elements and
  73. * PCDATA or PCDATA only for mixed element types. <code>true</code> if
  74. * the element is of type PCDATA only. Relevant only for mixed content
  75. * type elements.
  76. */
  77. public void setIsPCDataOnly(boolean isPCDataOnly);
  78. /**
  79. * The content type of the element. One of <code>EMPTY_CONTENTTYPE</code>,
  80. * <code>ANY_CONTENTTYPE</code>, <code>MIXED_CONTENTTYPE</code>,
  81. * <code>ELEMENTS_CONTENTTYPE</code>.
  82. */
  83. public short getContentType();
  84. /**
  85. * The content type of the element. One of <code>EMPTY_CONTENTTYPE</code>,
  86. * <code>ANY_CONTENTTYPE</code>, <code>MIXED_CONTENTTYPE</code>,
  87. * <code>ELEMENTS_CONTENTTYPE</code>.
  88. */
  89. public void setContentType(short contentType);
  90. /**
  91. * the URI reference representing the system identifier for the notation
  92. * declaration, if present, <code>null</code> otherwise.
  93. */
  94. public String getSystemId();
  95. /**
  96. * the URI reference representing the system identifier for the notation
  97. * declaration, if present, <code>null</code> otherwise.
  98. */
  99. public void setSystemId(String systemId);
  100. /**
  101. * The content model of element.
  102. */
  103. public ASContentModel getAsCM();
  104. /**
  105. * The content model of element.
  106. */
  107. public void setAsCM(ASContentModel asCM);
  108. /**
  109. * The<code>ASNamedObjectMap</code> containing
  110. * <code>ASAttributeDeclarations</code> for all the attributes that can
  111. * appear on this type of element.
  112. */
  113. public ASNamedObjectMap getASAttributeDecls();
  114. /**
  115. * The<code>ASNamedObjectMap</code> containing
  116. * <code>ASAttributeDeclarations</code> for all the attributes that can
  117. * appear on this type of element.
  118. */
  119. public void setASAttributeDecls(ASNamedObjectMap ASAttributeDecls);
  120. /**
  121. * Adds an <code>ASAttributeDeclaration</code> for the element being
  122. * declared.
  123. * @param attributeDecl The new attribute to add. If the attribute
  124. * declaration already exists for the element, the call does not have
  125. * any effect.
  126. */
  127. public void addASAttributeDecl(ASAttributeDeclaration attributeDecl);
  128. /**
  129. * Removes an <code>ASAttributeDeclaration</code> from the element being
  130. * declared.
  131. * @param attributeDecl The attribute declaraition to be removed. If the
  132. * attribute declaration does not exist for the element, the call does
  133. * not have any effect.
  134. * @return <code>null</code> if the attribute does not exist. Otherwise
  135. * returns the attribute being removed.
  136. */
  137. public ASAttributeDeclaration removeASAttributeDecl(ASAttributeDeclaration attributeDecl);
  138. }