KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ws > jaxme > xs > XSSimpleType


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;
18
19
20 /** <p>Details of a simple type.</p>
21  *
22  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
23  */

24 public interface XSSimpleType {
25   /** <p>Returns whether the simple type is atomic.</p>
26    */

27   public boolean isAtomic();
28   /** <p>Returns the atomic type details.</p>
29    * @throws IllegalStateException The type is a list or union.
30    */

31   public XSAtomicType getAtomicType();
32   /** <p>Returns whether the simple type is a list.</p>
33    */

34   public boolean isList();
35   /** <p>Returns the list type details.</p>
36    * @throws IllegalStateException The type is atomic or a union.
37    */

38   public XSListType getListType();
39   /** <p>Returns whether the simple type is a union.</p>
40    */

41   public boolean isUnion();
42   /** <p>Returns the union type details.</p>
43    * @throws IllegalStateException The type is atomic or a list.
44    */

45   public XSUnionType getUnionType();
46
47   /** <p>Returns the value of the "pattern" facet or null, if the pattern has not been set.</p>
48    * <p>The returned value is an array of pattern arrays. The latter arrays are the
49    * patterns defined in one restriction step. These have to be combined by "OR".
50    * The resulting, combined arrays are being grouped by an "AND". This is according to
51    * <a HREF="http://www.w3.org/TR/xmlschema-2/index.html#rf-pattern">
52    * http://www.w3.org/TR/xmlschema-2/index.html#rf-pattern, 4.3.4.3</a>.</p>
53    */

54   public String JavaDoc[][] getPattern();
55
56   /** <p>Returns the values of the "enumeration" facets.</p>
57    */

58   public XSEnumeration[] getEnumerations();
59
60   /** <p>Returns whether the type is a restriction of another
61    * simple type. (Almost all simple types are, the exception being
62    * the ur type {@link org.apache.ws.jaxme.xs.types.XSAnySimpleType}.</p>
63    */

64   public boolean isRestriction();
65
66   /** <p>If the simple type is a restriction, returns the restricted
67    * simple type.</p>
68    *
69    * @throws IllegalStateException This type is no restriction of
70    * another simple type.
71    */

72   public XSType getRestrictedType();
73 }
74
Popular Tags