01: /*
02: * The contents of this file are subject to the terms
03: * of the Common Development and Distribution License
04: * (the "License"). You may not use this file except
05: * in compliance with the License.
06: *
07: * You can obtain a copy of the license at
08: * https://jwsdp.dev.java.net/CDDLv1.0.html
09: * See the License for the specific language governing
10: * permissions and limitations under the License.
11: *
12: * When distributing Covered Code, include this CDDL
13: * HEADER in each file and include the License file at
14: * https://jwsdp.dev.java.net/CDDLv1.0.html If applicable,
15: * add the following below this CDDL HEADER, with the
16: * fields enclosed by brackets "[]" replaced with your
17: * own identifying information: Portions Copyright [yyyy]
18: * [name of copyright owner]
19: */
20: package com.sun.xml.xsom;
21:
22: /**
23: * Complex type.
24: *
25: * @author
26: * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
27: */
28: public interface XSComplexType extends XSType, XSAttContainer {
29: /**
30: * Checks if this complex type is declared as an abstract type.
31: */
32: boolean isAbstract();
33:
34: boolean isFinal(int derivationMethod);
35:
36: /**
37: * Roughly corresponds to the block attribute. But see the spec
38: * for gory detail.
39: */
40: boolean isSubstitutionProhibited(int method);
41:
42: /**
43: * Gets the scope of this complex type.
44: * This is not a property defined in the schema spec.
45: *
46: * @return
47: * null if this complex type is global. Otherwise
48: * return the element declaration that contains this anonymous
49: * complex type.
50: */
51: XSElementDecl getScope();
52:
53: /**
54: * The content of this complex type.
55: *
56: * @return
57: * always non-null.
58: */
59: XSContentType getContentType();
60:
61: /**
62: * Gets the explicit content of a complex type with a complex content
63: * that was derived by extension.
64: *
65: * <p>
66: * Informally, the "explicit content" is the portion of the
67: * content model added in this derivation. IOW, it's a delta between
68: * the base complex type and this complex type.
69: *
70: * <p>
71: * For example, when a complex type T2 derives fom T1, then:
72: * <pre>
73: * content type of T2 = SEQUENCE( content type of T1, explicit content of T2 )
74: * </pre>
75: *
76: * @return
77: * If this complex type is derived by restriction or has a
78: * simple content, this method returns null.
79: * IOW, this method only works for a complex type with
80: * a complex content derived by extension from another complex type.
81: */
82: XSContentType getExplicitContent();
83:
84: // meaningful only if getContentType returns particles
85: boolean isMixed();
86:
87: /**
88: * If this {@link XSComplexType} is redefined by another complex type,
89: * return that component.
90: *
91: * @return null
92: * if this component has not been redefined.
93: */
94: public XSComplexType getRedefinedBy();
95: }
|