KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ws > jaxme > xs > xml > XsTWildcard


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;
18
19
20 /** <p>Interface of <code>xs:wildcard</code>, with the
21  * following specification:
22  * <pre>
23  * &lt;xs:complexType name="wildcard"&gt;
24  * &lt;xs:complexContent&gt;
25  * &lt;xs:extension base="xs:annotated"&gt;
26  * &lt;xs:attribute name="namespace" type="xs:namespaceList" use="optional" default="##any"/&gt;
27  * &lt;xs:attribute name="processContents" use="optional" default="strict"
28  * &lt;xs:simpleType&gt;
29  * &lt;xs:restriction base="xs:NMTOKEN"&gt;
30  * &lt;xs:enumeration value="skip"/&gt;
31  * &lt;xs:enumeration value="lax"/&gt;
32  * &lt;xs:enumeration value="strict"/&gt;
33  * &lt;/xs:restriction&gt;
34  * &lt;/xs:simpleType&gt;
35  * &lt;/xs:attribute&gt;
36  * &lt;/xs:extension&gt;
37  * &lt;/xs:complexContent&gt;
38  * &lt;/xs:complexType&gt;
39  * </pre></p>
40  *
41  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
42  */

43 public interface XsTWildcard extends XsTAnnotated {
44   public static class ProcessContents {
45     final private String JavaDoc value;
46     ProcessContents(String JavaDoc pValue) {
47       value = pValue;
48     }
49     public String JavaDoc toString() { return value; }
50     public String JavaDoc getValue() { return value; }
51     public static ProcessContents valueOf(String JavaDoc pValue) {
52       if ("skip".equals(pValue)) {
53         return SKIP;
54       } else if ("lax".equals(pValue)) {
55         return LAX;
56       } else if ("strict".equals(pValue)) {
57         return STRICT;
58       } else {
59         throw new IllegalArgumentException JavaDoc("Invalid value for ProcessContents: " + pValue + "; expected either of 'skip', 'lax', or 'strict'");
60       }
61     }
62   }
63
64   public static final ProcessContents SKIP = new ProcessContents("skip");
65   public static final ProcessContents LAX = new ProcessContents("lax");
66   public static final ProcessContents STRICT = new ProcessContents("strict");
67
68   public void setNamespace(String JavaDoc pList);
69   public XsNamespaceList getNamespace();
70
71   public void setProcessContents(ProcessContents pProcessContents);
72   public ProcessContents getProcessContents();
73 }
74
Popular Tags