KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis > wsdl > symbolTable > ElementDecl


1 /*
2  * Copyright 2001-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 package org.apache.axis.wsdl.symbolTable;
17
18 import javax.xml.namespace.QName JavaDoc;
19
20 /**
21  * Simple utility struct for holding element declarations.
22  * <p/>
23  * This simply correlates a QName to a TypeEntry.
24  *
25  * @author Glen Daniels (gdaniels@apache.org)
26  * @author Tom Jordahl (tomj@apache.org)
27  */

28 public class ElementDecl extends ContainedEntry {
29
30     
31     /** Field documentation */
32     private String JavaDoc documentation;
33
34     // The following property is set if minOccurs=0.
35
// An item that is not set and has minOccurs=0
36
// should not be passed over the wire. This
37
// is slightly different than nillable=true which
38
// causes nil=true to be passed over the wire.
39

40     /** Field minOccursIs0 */
41     private boolean minOccursIs0 = false;
42
43     /** Field nillable */
44     private boolean nillable = false;
45
46     /** Field optional */
47     private boolean optional = false;
48
49     // Indicate if the ElementDecl represents
50
// an xsd:any element
51

52     /** Field anyElement */
53     private boolean anyElement = false;
54
55     /** Field maxOccursIsUnbounded */
56     private boolean maxOccursIsUnbounded = false;
57
58     private boolean maxOccursExactOne;
59
60     /**
61      * Constructor ElementDecl
62      *
63      * @param type
64      * @param name
65      */

66     public ElementDecl(TypeEntry type, QName JavaDoc name) {
67         super(type, name);
68     }
69
70     /**
71      * Method getMinOccursIs0
72      *
73      * @return
74      */

75     public boolean getMinOccursIs0() {
76         return minOccursIs0;
77     }
78
79     /**
80      * Method setMinOccursIs0
81      *
82      * @param minOccursIs0
83      */

84     public void setMinOccursIs0(boolean minOccursIs0) {
85         this.minOccursIs0 = minOccursIs0;
86     }
87
88     /**
89      * Method getMaxOccursIsUnbounded
90      *
91      * @return
92      */

93     public boolean getMaxOccursIsUnbounded() {
94         return maxOccursIsUnbounded;
95     }
96
97     /**
98      * Method setMaxOccursIsUnbounded
99      *
100      * @param maxOccursIsUnbounded
101      */

102     public void setMaxOccursIsUnbounded(boolean maxOccursIsUnbounded) {
103         this.maxOccursIsUnbounded = maxOccursIsUnbounded;
104     }
105
106     /**
107      * Method getMaxOccursIsExactlyOne
108      *
109      * @return
110      */

111     public boolean getMaxOccursIsExactlyOne() {
112         return maxOccursExactOne;
113     }
114
115     /**
116      * Method setMaxOccursIsExactlyOne
117      *
118      * @param exactOne
119      */

120     public void setMaxOccursIsExactlyOne(boolean exactOne) {
121         maxOccursExactOne = exactOne;
122     }
123
124     /**
125      * Method setNillable
126      *
127      * @param nillable
128      */

129     public void setNillable(boolean nillable) {
130         this.nillable = nillable;
131     }
132
133     /**
134      * Method getNillable
135      *
136      * @return
137      */

138     public boolean getNillable() {
139         return nillable;
140     }
141
142     /**
143      * Method setOptional
144      *
145      * @param optional
146      */

147     public void setOptional(boolean optional) {
148         this.optional = optional;
149     }
150
151     /**
152      * Method getOptional
153      *
154      * @return
155      */

156     public boolean getOptional() {
157         return optional;
158     }
159
160     /**
161      * Method getAnyElement
162      *
163      * @return
164      */

165     public boolean getAnyElement() {
166         return anyElement;
167     }
168
169     /**
170      * Method setAnyElement
171      *
172      * @param anyElement
173      */

174     public void setAnyElement(boolean anyElement) {
175         this.anyElement = anyElement;
176     }
177
178     /**
179      * Method getDocumentation
180      *
181      * @return string
182      */

183     public String JavaDoc getDocumentation() {
184         return documentation;
185     }
186
187     /**
188      * Method setDocumentation
189      * @param documentation
190      */

191     public void setDocumentation(String JavaDoc documentation) {
192         this.documentation = documentation;
193     }
194 }
195
Popular Tags