View Javadoc

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  
17  package org.apache.geronimo.ews.ws4j2ee.context.wsdl;
18  
19  import javax.xml.namespace.QName;
20  
21  /***
22   * <p>This is basically the org.apache.axis.ElementDecl (code cut and pasted).
23   * this represent a &lt;element&gt; entry in the schema.</p>
24   */
25  public class ElementInfo {
26      /* name of the element */
27      private QName name;
28      /* type of the element can be from anonymous|type|ref */
29      private QName type;
30  
31      private int minOccurs = 0;
32      private int maxOccurs = 1;
33  
34      private boolean nillable = false;
35  
36      // Indicate if the ElementDecl represents
37      // an xsd:any element
38      private boolean anyElement = false;
39  
40      public ElementInfo() {
41      }
42  
43      public ElementInfo(QName name, QName type) {
44          this.type = type;
45          this.name = name;
46      }
47  
48      public QName getType() {
49          return type;
50      }
51  
52      public void setType(QName type) {
53          this.type = type;
54      }
55  
56      public QName getName() {
57          return name;
58      }
59  
60      public void setName(QName name) {
61          this.name = name;
62      }
63  
64      public boolean getMinOccursIs0() {
65          return (minOccurs == 0);
66      }
67  
68      public void setNillable(boolean nillable) {
69          this.nillable = nillable;
70      }
71  
72      public boolean getNillable() {
73          return nillable;
74      }
75  
76      /***
77       * @return
78       */
79      public int getMaxOccurs() {
80          return maxOccurs;
81      }
82  
83      /***
84       * @return
85       */
86      public int getMinOccurs() {
87          return minOccurs;
88      }
89  
90      /***
91       * @param i
92       */
93      public void setMaxOccurs(int i) {
94          maxOccurs = i;
95      }
96  
97      /***
98       * @param i
99       */
100     public void setMinOccurs(int i) {
101         minOccurs = i;
102     }
103 
104 }