KickJava   Java API By Example, From Geeks To Geeks.

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


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.apache.ws.jaxme.xs.xml.XsTExplicitGroup;
21 import org.xml.sax.SAXException JavaDoc;
22
23
24 /** <p>Implementation of the <code>xs:explicitGroup</code>
25  * type, as specified by the following:
26  * <pre>
27  * <xs:complexType name="explicitGroup">
28  * <xs:annotation>
29  * <xs:documentation>
30  * group type for the three kinds of group
31  * </xs:documentation>
32  * </xs:annotation>
33  * <xs:complexContent>
34  * <xs:restriction base="xs:group">
35  * <xs:sequence>
36  * <xs:element ref="xs:annotation" minOccurs="0"/>
37  * <xs:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/>
38  * </xs:sequence>
39  * <xs:attribute name="name" type="xs:NCName" use="prohibited"/>
40  * <xs:attribute name="ref" type="xs:QName" use="prohibited"/>
41  * </xs:restriction>
42  * </xs:complexContent>
43  * </xs:complexType>
44  * </pre></p>
45  * <p><em>Implementation note:</em> This interface doesn't specify
46  * any additional methods. However, the implementations <code>validate()</code>
47  * method must ensure that
48  * <ol>
49  * <li>neither of the 'name' or 'ref' attributes are set</li>
50  * <li>Either of the 'element', 'choice', 'sequence', 'any', or 'group'
51  * child elements is set, but not the 'all' element.</li>
52  * </ol>
53  * </p>
54  *
55  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
56  */

57 public class XsTExplicitGroupImpl extends XsTGroupImpl implements XsTExplicitGroup {
58   protected XsTExplicitGroupImpl(XsObject pParent) {
59     super(pParent);
60   }
61
62   public void setName(XsNCName pName) {
63     throw new IllegalStateException JavaDoc("This group must not have its 'name' attribute set.");
64   }
65
66   public void setRef(XsQName pRef) {
67     throw new IllegalStateException JavaDoc("This group must not have its 'ref' attribute set.");
68   }
69
70   public void setRef(String JavaDoc pRef) throws SAXException JavaDoc {
71     setRef(asXsQName(pRef));
72   }
73 }
74
Popular Tags