View Javadoc

1   /*
2    * Copyright 2004,2007 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.commons.schema;
18  
19  /**
20   * Base class for all particle types.
21   */
22  
23  public class XmlSchemaParticle extends XmlSchemaAnnotated {
24  
25      long maxOccurs = 1;
26      String maxOccursString;
27      long minOccurs = 1;
28      String minOccursString;
29  
30      /**
31       * Creates new XmlSchemaParticle
32       * Particle types are usually interchangeable.
33       * A local element declaration or reference to a global element
34       * declaration (element), a compositor ( sequence, choice, or all),
35       * a reference to a named content model group (group), or an element wildcard (any).
36       */
37      public XmlSchemaParticle() {
38      }
39  
40      public void setMaxOccurs(long maxOccurs) {
41          this.maxOccurs = maxOccurs;
42      }
43  
44      public long getMaxOccurs() {
45          return maxOccurs;
46      }
47  
48      public void setMinOccurs(long minOccurs) {
49          this.minOccurs = minOccurs;
50      }
51  
52      public long getMinOccurs() {
53          return minOccurs;
54      }
55  }