KickJava   Java API By Example, From Geeks To Geeks.

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


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 org.apache.ws.jaxme.xs.xml.XsQName;
20
21
22 /** <p>Interface of a schema element</p>
23  *
24  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
25  */

26 public interface XSElement extends XSOpenAttrs {
27   /** <p>Returns the array of annotations.</p>
28    */

29   public XSAnnotation[] getAnnotations();
30
31   /** <p>Returns whether the element is global or not.</p>
32    */

33   public boolean isGlobal();
34   
35   /** <p>Returns whether the element is nillable or not.</p>
36    */

37   public boolean isNillable();
38
39   /** <p>Returns the elements name. Note that, unlike types,
40    * an element always has a name.</p>
41    */

42   public XsQName getName();
43
44   /** <p>Returns the elements type.</p>
45    */

46   public XSType getType();
47
48   /** <p>Returns the elements "default" value or null, if no such
49    * attribute is set.</p>
50    */

51   public String JavaDoc getDefault();
52
53   /** <p>Returns the elements "fixed" value or null, if no such
54    * attribute is set.</p>
55    */

56   public String JavaDoc getFixed();
57
58   /** <p>Returns the name of an element, which may be substituted
59    * by this element.</p>
60    */

61   public XsQName getSubstitutionGroupName();
62
63   /** <p>Returns whether this element is blocked for substitution.</p>
64    */

65   public boolean isBlockedForSubstitution();
66
67   /** <p>Returns whether the element is abstract or not.</p>
68    */

69   public boolean isAbstract();
70
71   /** <p>If the element may be substituted by other elements (in other
72    * words: if it is the head of a substitution group), sets the choice
73    * group of all the elements that may be used to replace the element.
74    * The element itself is part of the substitution group if, and only
75    * if, the element is not abstract.</p>
76    */

77   public void setSubstitutionGroup(XSGroup pGroup);
78
79   /** <p>If the element may be substituted by other elements (in other
80    * words: if it is the head of a substitution group), returns the choice
81    * group of all the elements that may be used to replace the element.
82    * The element itself is part of the substitution group if, and only
83    * if, the element is not abstract.</p>
84    */

85   public XSGroup getSubstitutionGroup();
86
87   /**
88    * Fetch all of the identity constraints that this element places
89    * upon its child tags. Note that a single xs:unique or xs:key tag
90    * may expand to several elements in this array depending on their
91    * xpath fields.
92    */

93   public XSIdentityConstraint[] getIdentityConstraints();
94
95   /**
96    * Fetch all of the keyref's declared by this element.
97    */

98   public XSKeyRef[] getKeyRefs();
99 }
100
Popular Tags