1 /* 2 * reserved comment block 3 * DO NOT REMOVE OR ALTER! 4 */ 5 /* 6 * Copyright 2003,2004 The Apache Software Foundation. 7 * 8 * Licensed under the Apache License, Version 2.0 (the "License"); 9 * you may not use this file except in compliance with the License. 10 * You may obtain a copy of the License at 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * Unless required by applicable law or agreed to in writing, software 15 * distributed under the License is distributed on an "AS IS" BASIS, 16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 * See the License for the specific language governing permissions and 18 * limitations under the License. 19 */ 20 21 package com.sun.org.apache.xerces.internal.xs; 22 23 /** 24 * This interface represents the Complex Type Definition schema component. 25 */ 26 public interface XSComplexTypeDefinition extends XSTypeDefinition { 27 // Content Model Types 28 /** 29 * Represents an empty content type. A content type with the distinguished 30 * value empty validates elements with no character or element 31 * information item children. 32 */ 33 public static final short CONTENTTYPE_EMPTY = 0; 34 /** 35 * Represents a simple content type. A content type which is simple 36 * validates elements with character-only children. 37 */ 38 public static final short CONTENTTYPE_SIMPLE = 1; 39 /** 40 * Represents an element-only content type. An element-only content type 41 * validates elements with children that conform to the supplied content 42 * model. 43 */ 44 public static final short CONTENTTYPE_ELEMENT = 2; 45 /** 46 * Represents a mixed content type. 47 */ 48 public static final short CONTENTTYPE_MIXED = 3; 49 50 /** 51 * [derivation method]: either <code>DERIVATION_EXTENSION</code>, 52 * <code>DERIVATION_RESTRICTION</code>, or <code>DERIVATION_NONE</code> 53 * (see <code>XSConstants</code>). 54 */ 55 public short getDerivationMethod(); 56 57 /** 58 * [abstract]: a boolean. Complex types for which <code>abstract</code> is 59 * true must not be used as the type definition for the validation of 60 * element information items. 61 */ 62 public boolean getAbstract(); 63 64 /** 65 * A set of attribute uses if it exists, otherwise an empty 66 * <code>XSObjectList</code>. 67 */ 68 public XSObjectList getAttributeUses(); 69 70 /** 71 * An attribute wildcard if it exists, otherwise <code>null</code>. 72 */ 73 public XSWildcard getAttributeWildcard(); 74 75 /** 76 * [content type]: one of empty (<code>CONTENTTYPE_EMPTY</code>), a simple 77 * type definition (<code>CONTENTTYPE_SIMPLE</code>), mixed ( 78 * <code>CONTENTTYPE_MIXED</code>), or element-only ( 79 * <code>CONTENTTYPE_ELEMENT</code>). 80 */ 81 public short getContentType(); 82 83 /** 84 * A simple type definition corresponding to a simple content model, 85 * otherwise <code>null</code>. 86 */ 87 public XSSimpleTypeDefinition getSimpleType(); 88 89 /** 90 * A particle for a mixed or element-only content model, otherwise 91 * <code>null</code>. 92 */ 93 public XSParticle getParticle(); 94 95 /** 96 * [prohibited substitutions]: a subset of {extension, restriction} 97 * @param restriction Extension or restriction constants (see 98 * <code>XSConstants</code>). 99 * @return True if <code>restriction</code> is a prohibited substitution, 100 * otherwise false. 101 */ 102 public boolean isProhibitedSubstitution(short restriction); 103 104 /** 105 * [prohibited substitutions]: A subset of {extension, restriction} or 106 * <code>DERIVATION_NONE</code> represented as a bit flag (see 107 * <code>XSConstants</code>). 108 */ 109 public short getProhibitedSubstitutions(); 110 111 /** 112 * A sequence of [annotations] or an empty <code>XSObjectList</code>. 113 */ 114 public XSObjectList getAnnotations(); 115 116 }