KickJava   Java API By Example, From Geeks To Geeks.

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


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>Interface of the <code>xs:field</code> element, with the
23  * following specification:
24  * <pre>
25  * <xs:element name="field" id="field">
26  * <xs:annotation>
27  * <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-field"/>
28  * </xs:annotation>
29  * <xs:complexType>
30  * <xs:complexContent>
31  * <xs:extension base="xs:annotated">
32  * <xs:attribute name="xpath" use="required">
33  * <xs:simpleType>
34  * <xs:annotation>
35  * <xs:documentation>
36  * A subset of XPath expressions for use in fields
37  * </xs:documentation>
38  * <xs:documentation>
39  * A utility type, not for public use
40  * </xs:documentation>
41  * </xs:annotation>
42  * <xs:restriction base="xs:token">
43  * <xs:annotation>
44  * <xs:documentation>
45  * The following pattern is intended to allow XPath
46  * expressions per the same EBNF as for selector,
47  * with the following change:
48  * Path ::= ('.//')? ( Step '/' )* ( Step | '@' NameTest )
49  * </xs:documentation>
50  * </xs:annotation>
51  * <xs:pattern value="(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*))))(\|(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*)))))*">
52  * </xs:pattern>
53  * </xs:restriction>
54  * </xs:simpleType>
55  * </xs:attribute>
56  * </xs:extension>
57  * </xs:complexContent>
58  * </xs:complexType>
59  * </xs:element>
60  * </pre></p>
61  *
62  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
63  */

64 public class XsEFieldImpl extends XsTAnnotatedImpl implements XsEField {
65   private XsToken xpath;
66
67   protected XsEFieldImpl(XsObject pParent) {
68     super(pParent);
69   }
70
71   public void setXpath(XsToken pXpath) {
72     xpath = pXpath;
73   }
74
75   public XsToken getXpath() {
76     return xpath;
77   }
78
79   public void validate() {
80     if (getXpath() == null) {
81       throw new NullPointerException JavaDoc("Missing attribute: xpath");
82     }
83   }
84 }
85
Popular Tags