KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ws > jaxme > xs > xml > XsESchema


1 /*
2  * Copyright 2003,2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15
16  */

17 package org.apache.ws.jaxme.xs.xml;
18
19 import org.apache.ws.jaxme.xs.parser.XSContext;
20
21
22 /** <p>Implementation of xs:schema. Follows this specification:
23  * <pre>
24  * &lt;xs:element name="schema" id="schema"&gt;
25  * &lt;xs:annotation&gt;
26  * &lt;xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-schema"/&gt;
27  * &lt;/xs:annotation&gt;
28  * &lt;xs:complexType&gt;
29  * &lt;xs:complexContent&gt;
30  * &lt;xs:extension base="xs:openAttrs"&gt;
31  * &lt;xs:sequence&gt;
32  * &lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;
33  * &lt;xs:element ref="xs:include"/&gt;
34  * &lt;xs:element ref="xs:import"/&gt;
35  * &lt;xs:element ref="xs:redefine"/&gt;
36  * &lt;xs:element ref="xs:annotation"/&gt;
37  * &lt;/xs:choice&gt;
38  * &lt;xs:sequence minOccurs="0" maxOccurs="unbounded"&gt;
39  * &lt;xs:group ref="xs:schemaTop"/&gt;
40  * &lt;xs:element ref="xs:annotation" minOccurs="0" maxOccurs="unbounded"/&gt;
41  * &lt;/xs:sequence&gt;
42  * &lt;/xs:sequence&gt;
43  * &lt;xs:attribute name="targetNamespace" type="xs:anyURI"/&gt;
44  * &lt;xs:attribute name="version" type="xs:token"/&gt;
45  * &lt;xs:attribute name="finalDefault" type="xs:derivationSet" use="optional" default=""/&gt;
46  * &lt;xs:attribute name="blockDefault" type="xs:blockSet" use="optional" default=""/&gt;
47  * &lt;xs:attribute name="attributeFormDefault" type="xs:formChoice" use="optional" default="unqualified"/&gt;
48  * &lt;xs:attribute name="elementFormDefault" type="xs:formChoice" use="optional" default="unqualified"/&gt;
49  * &lt;xs:attribute name="id" type="xs:ID"/&gt;
50  * &lt;xs:attribute ref="xml:lang"/&gt;
51  * &lt;/xs:extension&gt;
52  * &lt;/xs:complexContent&gt;
53  * &lt;/xs:complexType&gt;
54  *
55  * &lt;xs:key name="element"&gt;
56  * &lt;xs:selector xpath="xs:element"/&gt;
57  * &lt;xs:field xpath="@name"/&gt;
58  * &lt;/xs:key&gt;
59  * &lt;xs:key name="attribute"&gt;
60  * &lt;xs:selector xpath="xs:attribute"/&gt;
61  * &lt;xs:field xpath="@name"/&gt;
62  * &lt;/xs:key&gt;
63  * &lt;xs:key name="type"&gt;
64  * &lt;xs:selector xpath="xs:complexType|xs:simpleType"/&gt;
65  * &lt;xs:field xpath="@name"/&gt;
66  * &lt;/xs:key&gt;
67  * &lt;xs:key name="group"&gt;
68  * &lt;xs:selector xpath="xs:group"/&gt;
69  * &lt;xs:field xpath="@name"/&gt;
70  * &lt;/xs:key&gt;
71  * &lt;xs:key name="attributeGroup"&gt;
72  * &lt;xs:selector xpath="xs:attributeGroup"/&gt;
73  * &lt;xs:field xpath="@name"/&gt;
74  * &lt;/xs:key&gt;
75  * &lt;xs:key name="notation"&gt;
76  * &lt;xs:selector xpath="xs:notation"/&gt;
77  * &lt;xs:field xpath="@name"/&gt;
78  * &lt;/xs:key&gt;
79  * &lt;xs:key name="identityConstraint"&gt;
80  * &lt;xs:selector xpath=".//xs:key|.//xs:unique|.//xs:keyref"/&gt;
81  * &lt;xs:field xpath="@name"/&gt;
82  * &lt;/xs:key&gt;
83  * &lt;/xs:element&gt;
84  *
85  * &lt;xs:group name="schemaTop"&gt;
86  * &lt;xs:annotation&gt;
87  * &lt;xs:documentation&gt;
88  * This group is for the
89  * elements which occur freely at the top level of schemas.
90  * All of their types are based on the "annotated" type by extension.
91  * &lt;/xs:documentation&gt;
92  * &lt;/xs:annotation&gt;
93  * &lt;xs:choice&gt;
94  * &lt;xs:group ref="xs:redefinable"/&gt;
95  * &lt;xs:element ref="xs:element"/&gt;
96  * &lt;xs:element ref="xs:attribute"/&gt;
97  * &lt;xs:element ref="xs:notation"/&gt;
98  * &lt;/xs:choice&gt;
99  * &lt;/xs:group&gt;
100  * </pre>
101  * </p>
102  *
103  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
104  */

105 public interface XsESchema extends XsTOpenAttrs, XsSchemaHeader {
106   public XsEInclude createInclude();
107
108   public XsEImport createImport();
109
110   public XsERedefine createRedefine();
111
112   public XsEAnnotation createAnnotation();
113
114   public XsETopLevelSimpleType createSimpleType();
115
116   public XsTComplexType createComplexType();
117
118   public XsTNamedGroup createGroup();
119
120   public XsTAttributeGroup createAttributeGroup();
121
122   public XsTTopLevelElement createElement();
123
124   public XsTAttribute createAttribute();
125
126   public XsENotation createNotation();
127
128   /** <p>Returns the schema's childs. These are instances of
129    * {@link XsEInclude}, {@link XsEImport}, {@link XsERedefine},
130    * {@link XsEAnnotation}, {@link XsETopLevelSimpleType},
131    * {@link XsTComplexType}, {@link XsTGroup},
132    * {@link XsTAttributeGroup}, {@link XsTTopLevelElement}, or
133    * {@link XsENotation}, in the order of the document. This
134    * order is the same order than by invocation of the
135    * corresponding {@link #createInclude()}, {@link #createImport()},
136    * ... method calls.</p>
137    * <p>Be aware, that a subclass of XsESchema may very well include
138    * other objects.</p>
139    */

140   public Object JavaDoc[] getChilds();
141
142   public void setTargetNamespace(XsAnyURI pAnyURI);
143   public void setVersion(XsToken pToken);
144   public void setId(XsID pId);
145   public void setFinalDefault(XsDerivationSet pSet);
146   public void setElementFormDefault(XsFormChoice pChoice);
147   public void setBlockDefault(XsBlockSet pSet);
148   public void setAttributeFormDefault(XsFormChoice pChoice);
149   
150   /** <p>Returns the schema context.</p>
151    */

152   public XSContext getContext();
153 }
154
Popular Tags