KickJava   Java API By Example, From Geeks To Geeks.

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


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.parser.impl.LocSAXException;
20 import org.apache.ws.jaxme.xs.xml.*;
21 import org.xml.sax.SAXException JavaDoc;
22
23
24 /** <p>Implementation of <code>xs:simpleType>, as specified by the following:
25  * <pre>
26  * &lt;xs:element name="simpleType" type="xs:topLevelSimpleType" id="simpleType"&gt;
27  * &lt;xs:annotation&gt;
28  * &lt;xs:documentation
29  * source="http://www.w3.org/TR/xmlschema-2/#element-simpleType"/&gt;
30  * &lt;/xs:annotation&gt;
31  * &lt;/xs:element&gt;
32  *
33  * &lt;xs:complexType name="topLevelSimpleType"&gt;
34  * &lt;xs:complexContent&gt;
35  * &lt;xs:restriction base="xs:simpleType"&gt;
36  * &lt;xs:sequence&gt;
37  * &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
38  * &lt;xs:group ref="xs:simpleDerivation"/&gt;
39  * &lt;/xs:sequence&gt;
40  * &lt;xs:attribute name="name" use="required" type="xs:NCName"&gt;
41  * &lt;xs:annotation&gt;
42  * &lt;xs:documentation&gt;
43  * Required at the top level
44  * &lt;/xs:documentation&gt;
45  * &lt;/xs:annotation&gt;
46  * &lt;/xs:attribute&gt;
47  * &lt;/xs:restriction&gt;
48  * &lt;/xs:complexContent&gt;
49  * &lt;/xs:complexType&gt;
50  * </pre></p>
51  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
52  */

53 public class XsETopLevelSimpleTypeImpl extends XsTSimpleTypeImpl implements XsETopLevelSimpleType {
54   protected XsETopLevelSimpleTypeImpl(XsObject pParent) {
55     super(pParent);
56   }
57
58   public void validate() throws SAXException {
59      super.validate();
60      if (getName() == null) {
61        throw new LocSAXException("Missing 'name' attribute", getLocator());
62      }
63    }
64 }
65
Popular Tags