KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > org > apache > xerces > internal > dom3 > as > ASElementDeclaration


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
13 package com.sun.org.apache.xerces.internal.dom3.as;
14
15 /**
16  * @deprecated
17  * The element name along with the content specification in the context of an
18  * <code>ASObject</code>.
19  * <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
20 and Save Specification</a>.
21  */

22 public interface ASElementDeclaration extends ASObject {
23     // CONTENT_MODEL_TYPES
24
/**
25      * Represents an EMPTY content type for an Element declaration.
26      */

27     public static final short EMPTY_CONTENTTYPE = 1;
28     /**
29      * Represents an ANY content type for an Element declaration.
30      */

31     public static final short ANY_CONTENTTYPE = 2;
32     /**
33      * Represents a MIXED content type for an Element declaration. Note that
34      * <code>isPCDataOnly</code> would also need to checked, in addition to
35      * this, if an element's content model was simply text, as an example.
36      */

37     public static final short MIXED_CONTENTTYPE = 3;
38     /**
39      * Represents an ELEMENTS only content type for an Element declaration.
40      */

41     public static final short ELEMENTS_CONTENTTYPE = 4;
42
43     /**
44      * A boolean defining whether the element order and number of the child
45      * elements for mixed content type has to be respected or not. For
46      * example XML Schema defined mixed content types the order is important
47      * and needs to be respected whether for DTD based AS the order and
48      * number of child elements are not important.
49      */

50     public boolean getStrictMixedContent();
51     /**
52      * A boolean defining whether the element order and number of the child
53      * elements for mixed content type has to be respected or not. For
54      * example XML Schema defined mixed content types the order is important
55      * and needs to be respected whether for DTD based AS the order and
56      * number of child elements are not important.
57      */

58     public void setStrictMixedContent(boolean strictMixedContent);
59
60     /**
61      * Datatype of the element.
62      */

63     public ASDataType getElementType();
64     /**
65      * Datatype of the element.
66      */

67     public void setElementType(ASDataType elementType);
68
69     /**
70      * Boolean defining whether the element type contains child elements and
71      * PCDATA or PCDATA only for mixed element types. <code>true</code> if
72      * the element is of type PCDATA only. Relevant only for mixed content
73      * type elements.
74      */

75     public boolean getIsPCDataOnly();
76     /**
77      * Boolean defining whether the element type contains child elements and
78      * PCDATA or PCDATA only for mixed element types. <code>true</code> if
79      * the element is of type PCDATA only. Relevant only for mixed content
80      * type elements.
81      */

82     public void setIsPCDataOnly(boolean isPCDataOnly);
83
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 short getContentType();
90     /**
91      * The content type of the element. One of <code>EMPTY_CONTENTTYPE</code>,
92      * <code>ANY_CONTENTTYPE</code>, <code>MIXED_CONTENTTYPE</code>,
93      * <code>ELEMENTS_CONTENTTYPE</code>.
94      */

95     public void setContentType(short contentType);
96
97     /**
98      * the URI reference representing the system identifier for the notation
99      * declaration, if present, <code>null</code> otherwise.
100      */

101     public String JavaDoc getSystemId();
102     /**
103      * the URI reference representing the system identifier for the notation
104      * declaration, if present, <code>null</code> otherwise.
105      */

106     public void setSystemId(String JavaDoc systemId);
107
108     /**
109      * The content model of element.
110      */

111     public ASContentModel getAsCM();
112     /**
113      * The content model of element.
114      */

115     public void setAsCM(ASContentModel asCM);
116
117     /**
118      * The<code>ASNamedObjectMap</code> containing
119      * <code>ASAttributeDeclarations</code> for all the attributes that can
120      * appear on this type of element.
121      */

122     public ASNamedObjectMap getASAttributeDecls();
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 void setASAttributeDecls(ASNamedObjectMap ASAttributeDecls);
129
130     /**
131      * Adds an <code>ASAttributeDeclaration</code> for the element being
132      * declared.
133      * @param attributeDecl The new attribute to add. If the attribute
134      * declaration already exists for the element, the call does not have
135      * any effect.
136      */

137     public void addASAttributeDecl(ASAttributeDeclaration attributeDecl);
138
139     /**
140      * Removes an <code>ASAttributeDeclaration</code> from the element being
141      * declared.
142      * @param attributeDecl The attribute declaraition to be removed. If the
143      * attribute declaration does not exist for the element, the call does
144      * not have any effect.
145      * @return <code>null</code> if the attribute does not exist. Otherwise
146      * returns the attribute being removed.
147      */

148     public ASAttributeDeclaration removeASAttributeDecl(ASAttributeDeclaration attributeDecl);
149
150 }
151
Popular Tags