KickJava   Java API By Example, From Geeks To Geeks.

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


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>Interface of the <code>xs:notation</code> element, with
25  * the following specification:
26  * <pre>
27  * <xs:element name="notation" id="notation">
28  * <xs:annotation>
29  * <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-notation"/>
30  * </xs:annotation>
31  * <xs:complexType>
32  * <xs:complexContent>
33  * <xs:extension base="xs:annotated">
34  * <xs:attribute name="name" type="xs:NCName" use="required"/>
35  * <xs:attribute name="public" type="xs:public" use="required"/>
36  * <xs:attribute name="system" type="xs:anyURI"/>
37  * </xs:extension>
38  * </xs:complexContent>
39  * </xs:complexType>
40  * </xs:element>
41  * </pre></p>
42  *
43  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
44  */

45 public class XsENotationImpl extends XsTAnnotatedImpl implements XsENotation {
46   protected XsENotationImpl(XsObject pParent) {
47     super(pParent);
48   }
49
50   private XsNCName name;
51   private XsToken publicId;
52   private XsAnyURI systemId;
53
54   public void setName(XsNCName pName) {
55     name = pName;
56   }
57
58   public XsNCName getName() {
59     return name;
60   }
61
62   public void setPublic(XsToken pPublic) {
63     publicId = pPublic;
64   }
65
66   public XsToken getPublic() {
67     return publicId;
68   }
69
70   public void setSystem(XsAnyURI pSystem) {
71     systemId = pSystem;
72   }
73
74   public XsAnyURI getSystem() {
75     return systemId;
76   }
77
78   public void validate() throws SAXException {
79     super.validate();
80     if (getName() == null) {
81       throw new LocSAXException("Missing attribute: 'name'", getLocator());
82     }
83     if (getPublic() == null) {
84       throw new LocSAXException("Missing attribute: 'public'", getLocator());
85     }
86   }
87 }
88
Popular Tags