KickJava   Java API By Example, From Geeks To Geeks.

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


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
21
22 /** <p>Implementation of the <code>xs:localElement</code> type, as
23  * specified by:
24  * <pre>
25  * &lt;xs:complexType name="localElement"&gt;
26  * &lt;xs:complexContent&gt;
27  * &lt;xs:restriction base="xs:element"&gt;
28  * &lt;xs:sequence&gt;
29  * &lt;xs:element ref="xs:annotation" minOccurs="0"/&gt;
30  * &lt;xs:choice minOccurs="0"&gt;
31  * &lt;xs:element name="simpleType" type="xs:localSimpleType"/&gt;
32  * &lt;xs:element name="complexType" type="xs:localComplexType"/&gt;
33  * &lt;/xs:choice&gt;
34  * &lt;xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/&gt;
35  * &lt;/xs:sequence&gt;
36  * &lt;xs:attribute name="substitutionGroup" use="prohibited"/&gt;
37  * &lt;xs:attribute name="final" use="prohibited"/&gt;
38  * &lt;xs:attribute name="abstract" use="prohibited"/&gt;
39  * &lt;/xs:restriction&gt;
40  * &lt;/xs:complexContent&gt;
41  * &lt;/xs:complexType&gt;
42  * </pre></p>
43  * <p><em>Implementation note:</em> This class doesn't specify any
44  * additional methods. It only disables the 'substitutionGroup',
45  * 'final', and 'abstract' attributes.</p>
46  *
47  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
48  */

49 public class XsTLocalElementImpl extends XsTElementImpl implements XsTLocalElement {
50   protected XsTLocalElementImpl(XsObject pParent) {
51     super(pParent);
52   }
53
54   public void setSubstitutionGroup(XsQName pSubstitutionGroup) {
55     throw new IllegalArgumentException JavaDoc("A local element must not have its 'substitutionGroup' attribute set.");
56   }
57
58   public void setSubstitutionGroup(String JavaDoc pSubstitutionGroup) {
59     throw new IllegalArgumentException JavaDoc("A local element must not have its 'substitutionGroup' attribute set.");
60   }
61
62   public void setFinal(XsDerivationSet pFinal) {
63     throw new IllegalArgumentException JavaDoc("A local element must not have its 'final' attribute set.");
64   }
65
66   public void setAbstract(boolean pAbstract) {
67     throw new IllegalArgumentException JavaDoc("A local element must not have its 'abstract' attribute set.");
68   }
69
70   public boolean isGlobal() { return false; }
71 }
72
Popular Tags