aoqi@0: /* aoqi@0: * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. aoqi@0: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. aoqi@0: * aoqi@0: * This code is free software; you can redistribute it and/or modify it aoqi@0: * under the terms of the GNU General Public License version 2 only, as aoqi@0: * published by the Free Software Foundation. Oracle designates this aoqi@0: * particular file as subject to the "Classpath" exception as provided aoqi@0: * by Oracle in the LICENSE file that accompanied this code. aoqi@0: * aoqi@0: * This code is distributed in the hope that it will be useful, but WITHOUT aoqi@0: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or aoqi@0: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License aoqi@0: * version 2 for more details (a copy is included in the LICENSE file that aoqi@0: * accompanied this code). aoqi@0: * aoqi@0: * You should have received a copy of the GNU General Public License version aoqi@0: * 2 along with this work; if not, write to the Free Software Foundation, aoqi@0: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. aoqi@0: * aoqi@0: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA aoqi@0: * or visit www.oracle.com if you need additional information or have any aoqi@0: * questions. aoqi@0: */ aoqi@0: aoqi@0: package com.sun.xml.internal.xsom; aoqi@0: aoqi@0: import java.util.List; aoqi@0: aoqi@0: aoqi@0: /** aoqi@0: * Complex type. aoqi@0: * aoqi@0: * @author aoqi@0: * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com) aoqi@0: */ aoqi@0: public interface XSComplexType extends XSType, XSAttContainer aoqi@0: { aoqi@0: /** aoqi@0: * Checks if this complex type is declared as an abstract type. aoqi@0: */ aoqi@0: boolean isAbstract(); aoqi@0: aoqi@0: boolean isFinal(int derivationMethod); aoqi@0: /** aoqi@0: * Roughly corresponds to the block attribute. But see the spec aoqi@0: * for gory detail. aoqi@0: */ aoqi@0: boolean isSubstitutionProhibited(int method); aoqi@0: aoqi@0: /** aoqi@0: * Gets the scope of this complex type. aoqi@0: * This is not a property defined in the schema spec. aoqi@0: * aoqi@0: * @return aoqi@0: * null if this complex type is global. Otherwise aoqi@0: * return the element declaration that contains this anonymous aoqi@0: * complex type. aoqi@0: */ aoqi@0: XSElementDecl getScope(); aoqi@0: aoqi@0: /** aoqi@0: * The content of this complex type. aoqi@0: * aoqi@0: * @return aoqi@0: * always non-null. aoqi@0: */ aoqi@0: XSContentType getContentType(); aoqi@0: aoqi@0: /** aoqi@0: * Gets the explicit content of a complex type with a complex content aoqi@0: * that was derived by extension. aoqi@0: * aoqi@0: *

aoqi@0: * Informally, the "explicit content" is the portion of the aoqi@0: * content model added in this derivation. IOW, it's a delta between aoqi@0: * the base complex type and this complex type. aoqi@0: * aoqi@0: *

aoqi@0: * For example, when a complex type T2 derives fom T1, then: aoqi@0: *

aoqi@0:      * content type of T2 = SEQUENCE( content type of T1, explicit content of T2 )
aoqi@0:      * 
aoqi@0: * aoqi@0: * @return aoqi@0: * If this complex type is derived by restriction or has a aoqi@0: * simple content, this method returns null. aoqi@0: * IOW, this method only works for a complex type with aoqi@0: * a complex content derived by extension from another complex type. aoqi@0: */ aoqi@0: XSContentType getExplicitContent(); aoqi@0: aoqi@0: // meaningful only if getContentType returns particles aoqi@0: boolean isMixed(); aoqi@0: aoqi@0: /** aoqi@0: * If this {@link XSComplexType} is redefined by another complex type, aoqi@0: * return that component. aoqi@0: * aoqi@0: * @return null aoqi@0: * if this component has not been redefined. aoqi@0: */ aoqi@0: public XSComplexType getRedefinedBy(); aoqi@0: aoqi@0: /** aoqi@0: * Returns a list of direct subtypes of this complex type. If the type is not subtyped, returns empty list. aoqi@0: * Doesn't return null. aoqi@0: * Note that the complex type may be extended outside of the scope of the schemaset known to XSOM. aoqi@0: * @return aoqi@0: */ aoqi@0: public List getSubtypes(); aoqi@0: aoqi@0: /** aoqi@0: * Returns a list of element declarations of this type. aoqi@0: * @return aoqi@0: */ aoqi@0: public List getElementDecls(); aoqi@0: aoqi@0: }