KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ws > jaxme > xs > XSSchema


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;
18
19 import java.util.Map JavaDoc;
20
21 import org.apache.ws.jaxme.xs.parser.XSContext;
22 import org.apache.ws.jaxme.xs.xml.XsAnyURI;
23 import org.apache.ws.jaxme.xs.xml.XsQName;
24 import org.xml.sax.SAXException JavaDoc;
25
26 /** <p>This interface is what you are probably most interested in: The
27  * logical XML Schema representation.</p>
28  *
29  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
30  */

31 public interface XSSchema extends XSOpenAttrs {
32   /** <p>Returns the schemas object factory.</p>
33    */

34   public XSObjectFactory getXSObjectFactory();
35
36   /** <p>Returns the schemas context.</p>
37    */

38   public XSContext getContext();
39
40   /** <p>Returns the schemas target namespace. Note, that a
41    * {@link XSSchema logical schema} can combine elements,
42    * attributes, groups, and types of various namespaces by
43    * importing other {@link org.apache.ws.jaxme.xs.xml.XsESchema
44    * syntactical schemas} with different namespaces. Thus
45    * the logical schemas target namespace is in fact the
46    * target namespace of the outermost syntactical schema.</p>
47    * @return Target namespace or null for null (default namespace)
48    */

49   public XsAnyURI getTargetNamespace();
50
51   /** <p>Returns the array of annotations.</p>
52    */

53   public XSAnnotation[] getAnnotations();
54
55   /** <p>Returns the array of global types. This includes simple
56    * and complex types. The builtin types are not included.</p>
57    * @see #getType(XsQName)
58    */

59   public XSType[] getTypes();
60
61   /** <p>Returns the array of builtin types. This includes simple
62    * and complex types.</p>
63    * @see #getTypes()
64    */

65   public XSType[] getBuiltinTypes();
66
67   /** <p>Returns the type with the given name. This may be a builtin
68    * type or a type defined by the schema.</p>
69    */

70   public XSType getType(XsQName pName);
71
72   /** <p>Returns the array of global groups.</p>
73    */

74   public XSGroup[] getGroups();
75
76   /** <p>Returns the group with the given name.</p>
77    */

78   public XSGroup getGroup(XsQName pName);
79
80   /** <p>Returns the array of global attribute groups.</p>
81    */

82   public XSAttributeGroup[] getAttributeGroups();
83
84   /** <p>Returns the attribute group with the given name.</p>
85    */

86   public XSAttributeGroup getAttributeGroup(XsQName pName);
87
88   /** <p>Returns the array of global elements.</p>
89    */

90   public XSElement[] getElements();
91
92   /** <p>Returns the element with the given name.</p>
93    */

94   public XSElement getElement(XsQName pName);
95
96   /** <p>Returns the array of global attributes.</p>
97    */

98   public XSAttribute[] getAttributes();
99
100   /** <p>Returns the attribute with the given name.</p>
101    */

102   public XSAttribute getAttribute(XsQName pName);
103
104   /** <p>Returns a map of XSIdentityConstraint objects.
105    * The key is the constraints name. The map is immutable.</p>
106    */

107   public Map JavaDoc getIdentityConstraints();
108
109   /** <p>Returns a map of XSKeyRef objects. The key is the
110    * key refs name. The map is immutable.</p>
111    * */

112   public Map JavaDoc getKeyRefs();
113
114   /** <p>Returns all the schema annotations, types, groups,
115    * attribute groups, elements, and attributes, in the
116    * order of declaration.</p>
117    */

118   public Object JavaDoc[] getChilds();
119
120   /** <p>Adds a new annotation to the schema.</p>
121    */

122   public void add(XSAnnotation pAnnotation);
123
124   /** <p>Adds a new type to the schema.</p>
125    */

126   public void add(XSType pType) throws SAXException JavaDoc;
127
128   /** <p>Redefines an existing type in the schema.</p>
129    */

130   public void redefine(XSType pType) throws SAXException JavaDoc;
131
132   /** <p>Adds a new group to the schema.</p>
133    */

134   public void add(XSGroup pGroup) throws SAXException JavaDoc;
135
136   /** <p>Redefines an existing group in the schema.</p>
137    */

138   public void redefine(XSGroup pGroup) throws SAXException JavaDoc;
139
140   /** <p>Adds a new attribute group to the schema.</p>
141    */

142   public void add(XSAttributeGroup pGroup) throws SAXException JavaDoc;
143
144   /** <p>Redefines an existing attribute group in the schema.</p>
145    */

146   public void redefine(XSAttributeGroup pGroup) throws SAXException JavaDoc;
147
148   /** <p>Adds a new attribute to the schema.</p>
149    */

150   public void add(XSAttribute pAttribute) throws SAXException JavaDoc;
151
152   /** <p>Adds a new element to the schema.</p>
153    */

154   public void add(XSElement pElement) throws SAXException JavaDoc;
155
156   /** <p>Adds a new notation to the schema.</p>
157    */

158   public void add(XSNotation pNotation) throws SAXException JavaDoc;
159
160   /** <p>Adds a new identity constraint to the schema.</p>
161    */

162   public void add( XSIdentityConstraint ic ) throws SAXException JavaDoc;
163
164   /** <p>Adds a new key ref to the schema.</p>
165    */

166   public void add( XSKeyRef rf ) throws SAXException JavaDoc;
167 }
168
Popular Tags