KickJava   Java API By Example, From Geeks To Geeks.

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


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.XsObject;
20 import org.apache.ws.jaxme.xs.xml.XsQName;
21 import org.apache.ws.jaxme.xs.xml.XsTAttributeGroupRef;
22 import org.xml.sax.SAXException JavaDoc;
23
24
25 /** <p>Implementation of the <code>xs:attributeGroupRef</code>
26  * type, specified as follows:
27  * <pre>
28  * &lt;xs:complexType name="attributeGroupRef"&gt;
29  * &lt;xs:complexContent&gt;
30  * &lt;xs:restriction base="xs:attributeGroup"&gt;
31  * &lt;xs:sequence&gt;
32  * &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
33  * &lt;/xs:sequence&gt;
34  * &lt;xs:attribute name="ref" use="required" type="xs:QName"/&gt;
35  * &lt;xs:attribute name="name" use="prohibited"/&gt;
36  * &lt;/xs:restriction&gt;
37  * &lt;/xs:complexContent&gt;
38  * &lt;/xs:complexType&gt;
39  * </pre></p>
40  *
41  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
42  */

43 public class XsTAttributeGroupRefImpl extends XsTAnnotatedImpl implements XsTAttributeGroupRef {
44   private XsQName ref;
45
46   protected XsTAttributeGroupRefImpl(XsObject pParent) {
47     super(pParent);
48   }
49
50   public void setRef(XsQName pRef) { ref = pRef; }
51   public void setRef(String JavaDoc pRef) throws SAXException JavaDoc {
52     setRef(asXsQName(pRef));
53   }
54   public XsQName getRef() { return ref; }
55   public void validate() {
56     if (ref == null) {
57       throw new NullPointerException JavaDoc("Missing attribute: 'ref'");
58     }
59   }
60 }
61
Popular Tags