KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xerces > xs > XSComplexTypeDefinition


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.xerces.xs;
18
19 /**
20  * This interface represents the Complex Type Definition schema component.
21  */

22 public interface XSComplexTypeDefinition extends XSTypeDefinition {
23     // Content Model Types
24
/**
25      * Represents an empty content type. A content type with the distinguished
26      * value empty validates elements with no character or element
27      * information item children.
28      */

29     public static final short CONTENTTYPE_EMPTY = 0;
30     /**
31      * Represents a simple content type. A content type which is simple
32      * validates elements with character-only children.
33      */

34     public static final short CONTENTTYPE_SIMPLE = 1;
35     /**
36      * Represents an element-only content type. An element-only content type
37      * validates elements with children that conform to the supplied content
38      * model.
39      */

40     public static final short CONTENTTYPE_ELEMENT = 2;
41     /**
42      * Represents a mixed content type.
43      */

44     public static final short CONTENTTYPE_MIXED = 3;
45
46     /**
47      * [derivation method]: either <code>DERIVATION_EXTENSION</code>,
48      * <code>DERIVATION_RESTRICTION</code>, or <code>DERIVATION_NONE</code>
49      * (see <code>XSConstants</code>).
50      */

51     public short getDerivationMethod();
52
53     /**
54      * [abstract]: a boolean. Complex types for which <code>abstract</code> is
55      * true must not be used as the type definition for the validation of
56      * element information items.
57      */

58     public boolean getAbstract();
59
60     /**
61      * A set of attribute uses if it exists, otherwise an empty
62      * <code>XSObjectList</code>.
63      */

64     public XSObjectList getAttributeUses();
65
66     /**
67      * An attribute wildcard if it exists, otherwise <code>null</code>.
68      */

69     public XSWildcard getAttributeWildcard();
70
71     /**
72      * [content type]: one of empty (<code>CONTENTTYPE_EMPTY</code>), a simple
73      * type definition (<code>CONTENTTYPE_SIMPLE</code>), mixed (
74      * <code>CONTENTTYPE_MIXED</code>), or element-only (
75      * <code>CONTENTTYPE_ELEMENT</code>).
76      */

77     public short getContentType();
78
79     /**
80      * A simple type definition corresponding to a simple content model,
81      * otherwise <code>null</code>.
82      */

83     public XSSimpleTypeDefinition getSimpleType();
84
85     /**
86      * A particle for a mixed or element-only content model, otherwise
87      * <code>null</code>.
88      */

89     public XSParticle getParticle();
90
91     /**
92      * [prohibited substitutions]: a subset of {extension, restriction}
93      * @param restriction Extension or restriction constants (see
94      * <code>XSConstants</code>).
95      * @return True if <code>restriction</code> is a prohibited substitution,
96      * otherwise false.
97      */

98     public boolean isProhibitedSubstitution(short restriction);
99
100     /**
101      * [prohibited substitutions]: A subset of {extension, restriction} or
102      * <code>DERIVATION_NONE</code> represented as a bit flag (see
103      * <code>XSConstants</code>).
104      */

105     public short getProhibitedSubstitutions();
106
107     /**
108      * A set of [annotations] if it exists, otherwise an empty
109      * <code>XSObjectList</code>.
110      */

111     public XSObjectList getAnnotations();
112
113 }
114
Popular Tags