001: /*
002: * Copyright (c) 2001 World Wide Web Consortium,
003: * (Massachusetts Institute of Technology, Institut National de
004: * Recherche en Informatique et en Automatique, Keio University). All
005: * Rights Reserved. This program is distributed under the W3C's Software
006: * Intellectual Property License. This program is distributed in the
007: * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
008: * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
009: * PURPOSE.
010: * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
011: */
012:
013: package org.apache.xerces.dom3.as;
014:
015: /**
016: * @deprecated
017: * The element name along with the content specification in the context of an
018: * <code>ASObject</code>.
019: * <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
020: and Save Specification</a>.
021: */
022: public interface ASElementDeclaration extends ASObject {
023: // CONTENT_MODEL_TYPES
024: /**
025: * Represents an EMPTY content type for an Element declaration.
026: */
027: public static final short EMPTY_CONTENTTYPE = 1;
028: /**
029: * Represents an ANY content type for an Element declaration.
030: */
031: public static final short ANY_CONTENTTYPE = 2;
032: /**
033: * Represents a MIXED content type for an Element declaration. Note that
034: * <code>isPCDataOnly</code> would also need to checked, in addition to
035: * this, if an element's content model was simply text, as an example.
036: */
037: public static final short MIXED_CONTENTTYPE = 3;
038: /**
039: * Represents an ELEMENTS only content type for an Element declaration.
040: */
041: public static final short ELEMENTS_CONTENTTYPE = 4;
042:
043: /**
044: * A boolean defining whether the element order and number of the child
045: * elements for mixed content type has to be respected or not. For
046: * example XML Schema defined mixed content types the order is important
047: * and needs to be respected whether for DTD based AS the order and
048: * number of child elements are not important.
049: */
050: public boolean getStrictMixedContent();
051:
052: /**
053: * A boolean defining whether the element order and number of the child
054: * elements for mixed content type has to be respected or not. For
055: * example XML Schema defined mixed content types the order is important
056: * and needs to be respected whether for DTD based AS the order and
057: * number of child elements are not important.
058: */
059: public void setStrictMixedContent(boolean strictMixedContent);
060:
061: /**
062: * Datatype of the element.
063: */
064: public ASDataType getElementType();
065:
066: /**
067: * Datatype of the element.
068: */
069: public void setElementType(ASDataType elementType);
070:
071: /**
072: * Boolean defining whether the element type contains child elements and
073: * PCDATA or PCDATA only for mixed element types. <code>true</code> if
074: * the element is of type PCDATA only. Relevant only for mixed content
075: * type elements.
076: */
077: public boolean getIsPCDataOnly();
078:
079: /**
080: * Boolean defining whether the element type contains child elements and
081: * PCDATA or PCDATA only for mixed element types. <code>true</code> if
082: * the element is of type PCDATA only. Relevant only for mixed content
083: * type elements.
084: */
085: public void setIsPCDataOnly(boolean isPCDataOnly);
086:
087: /**
088: * The content type of the element. One of <code>EMPTY_CONTENTTYPE</code>,
089: * <code>ANY_CONTENTTYPE</code>, <code>MIXED_CONTENTTYPE</code>,
090: * <code>ELEMENTS_CONTENTTYPE</code>.
091: */
092: public short getContentType();
093:
094: /**
095: * The content type of the element. One of <code>EMPTY_CONTENTTYPE</code>,
096: * <code>ANY_CONTENTTYPE</code>, <code>MIXED_CONTENTTYPE</code>,
097: * <code>ELEMENTS_CONTENTTYPE</code>.
098: */
099: public void setContentType(short contentType);
100:
101: /**
102: * the URI reference representing the system identifier for the notation
103: * declaration, if present, <code>null</code> otherwise.
104: */
105: public String getSystemId();
106:
107: /**
108: * the URI reference representing the system identifier for the notation
109: * declaration, if present, <code>null</code> otherwise.
110: */
111: public void setSystemId(String systemId);
112:
113: /**
114: * The content model of element.
115: */
116: public ASContentModel getAsCM();
117:
118: /**
119: * The content model of element.
120: */
121: public void setAsCM(ASContentModel asCM);
122:
123: /**
124: * The<code>ASNamedObjectMap</code> containing
125: * <code>ASAttributeDeclarations</code> for all the attributes that can
126: * appear on this type of element.
127: */
128: public ASNamedObjectMap getASAttributeDecls();
129:
130: /**
131: * The<code>ASNamedObjectMap</code> containing
132: * <code>ASAttributeDeclarations</code> for all the attributes that can
133: * appear on this type of element.
134: */
135: public void setASAttributeDecls(ASNamedObjectMap ASAttributeDecls);
136:
137: /**
138: * Adds an <code>ASAttributeDeclaration</code> for the element being
139: * declared.
140: * @param attributeDecl The new attribute to add. If the attribute
141: * declaration already exists for the element, the call does not have
142: * any effect.
143: */
144: public void addASAttributeDecl(ASAttributeDeclaration attributeDecl);
145:
146: /**
147: * Removes an <code>ASAttributeDeclaration</code> from the element being
148: * declared.
149: * @param attributeDecl The attribute declaraition to be removed. If the
150: * attribute declaration does not exist for the element, the call does
151: * not have any effect.
152: * @return <code>null</code> if the attribute does not exist. Otherwise
153: * returns the attribute being removed.
154: */
155: public ASAttributeDeclaration removeASAttributeDecl(
156: ASAttributeDeclaration attributeDecl);
157:
158: }
|