KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ws > jaxme > xs > xml > impl > XsTGroupImpl


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.xml.impl;
18
19 import org.apache.ws.jaxme.xs.xml.*;
20 import org.xml.sax.SAXException JavaDoc;
21
22
23 /** <p>Implementation of the <code>xs:group</code>, type, with the
24  * following specification:
25  * <pre>
26  * &lt;xs:complexType name="group" abstract="true"&gt;
27  * &lt;xs:annotation&gt;
28  * &lt;xs:documentation&gt;
29  * group type for explicit groups, named top-level groups and
30  * group references
31  * &lt;/xs:documentation&gt;
32  * &lt;/xs:annotation&gt;
33  * &lt;xs:complexContent&gt;
34  * &lt;xs:extension base="xs:annotated"&gt;
35  * &lt;xs:group ref="xs:particle" minOccurs="0" maxOccurs="unbounded"/&gt;
36  * &lt;xs:attributeGroup ref="xs:defRef"/&gt;
37  * &lt;xs:attributeGroup ref="xs:occurs"/&gt;
38  * &lt;/xs:extension&gt;
39  * &lt;/xs:complexContent&gt;
40  * &lt;/xs:complexType&gt;
41  * </pre>
42  *
43  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
44  */

45 public class XsTGroupImpl extends XsTAnnotatedImpl implements XsTGroup {
46   private final XsAGDefRef defRef;
47   private final XsAGOccurs occurs;
48   private final XsGParticle particle;
49
50   protected XsTGroupImpl(XsObject pParent) {
51     super(pParent);
52     defRef = getObjectFactory().newXsAGDefRef(this);
53     occurs = getObjectFactory().newXsAGOccurs(this);
54     particle = getObjectFactory().newXsGParticle(this);
55   }
56
57   public void setName(XsNCName pName) {
58     defRef.setName(pName);
59   }
60
61   public XsNCName getName() {
62     return defRef.getName();
63   }
64
65   public void setRef(XsQName pRef) {
66     defRef.setRef(pRef);
67   }
68
69   public void setRef(String JavaDoc pRef) throws SAXException JavaDoc {
70     setRef(asXsQName(pRef));
71   }
72
73   public XsQName getRef() {
74     return defRef.getRef();
75   }
76
77   public void setMaxOccurs(String JavaDoc pMaxOccurs) {
78     occurs.setMaxOccurs(pMaxOccurs);
79   }
80
81   public int getMaxOccurs() {
82     return occurs.getMaxOccurs();
83   }
84
85   public void setMinOccurs(int pMinOccurs) {
86     occurs.setMinOccurs(pMinOccurs);
87   }
88
89   public int getMinOccurs() {
90     return occurs.getMinOccurs();
91   }
92
93   public XsTLocalElement createElement() {
94     return particle.createElement();
95   }
96
97   public XsTGroupRef createGroup() {
98     return particle.createGroup();
99   }
100
101   public XsTAll createAll() {
102     return particle.createAll();
103   }
104
105   public XsESequence createSequence() {
106     return particle.createSequence();
107   }
108
109   public XsEChoice createChoice() {
110     return particle.createChoice();
111   }
112
113   public XsEAny createAny() {
114     return particle.createAny();
115   }
116
117   public XsTParticle[] getParticles() {
118     return particle.getParticles();
119   }
120 }
121
Popular Tags