KickJava   Java API By Example, From Geeks To Geeks.

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


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 the <code>xs:localSimpleType</code> type,
25  * as specified by the following:
26  * <pre>
27  * &lt;xs:complexType name="localSimpleType"&gt;
28  * &lt;xs:complexContent&gt;
29  * &lt;xs:restriction base="xs:simpleType"&gt;
30  * &lt;xs:sequence&gt;
31  * &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
32  * &lt;xs:group ref="xs:simpleDerivation"/&gt;
33  * &lt;/xs:sequence&gt;
34  * &lt;xs:attribute name="name" use="prohibited"&gt;
35  * &lt;xs:annotation&gt;
36  * &lt;xs:documentation&gt;
37  * Forbidden when nested
38  * &lt;/xs:documentation&gt;
39  * &lt;/xs:annotation&gt;
40  * &lt;/xs:attribute&gt;
41  * &lt;xs:attribute name="final" use="prohibited"/&gt;
42  * &lt;/xs:restriction&gt;
43  * &lt;/xs:complexContent&gt;
44  * &lt;/xs:complexType&gt;
45  * </pre></p>
46  * <p><em>Implementation note:</em> The implementation must ensure,
47  * that the 'final' and 'name' attributes aren't set.</p>
48  *
49  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
50  */

51 public class XsTLocalSimpleTypeImpl extends XsTSimpleTypeImpl implements XsTLocalSimpleType {
52   protected XsTLocalSimpleTypeImpl(XsObject pParent) {
53     super(pParent);
54   }
55
56   public void setName(XsNCName pName) throws SAXException {
57     throw new LocSAXException("A local simpleType must not have its 'name' attribute set.", getLocator());
58   }
59
60   public void setFinal(XsSimpleDerivationSet pFinal) throws SAXException {
61     throw new LocSAXException("A local simpleType must not have its 'final' attribute set.", getLocator());
62   }
63 }
64
Popular Tags