src/share/jaxws_classes/com/sun/xml/internal/xsom/XSComplexType.java

changeset 0
373ffda63c9a
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/xsom/XSComplexType.java	Wed Apr 27 01:27:09 2016 +0800
     1.3 @@ -0,0 +1,119 @@
     1.4 +/*
     1.5 + * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
     1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.7 + *
     1.8 + * This code is free software; you can redistribute it and/or modify it
     1.9 + * under the terms of the GNU General Public License version 2 only, as
    1.10 + * published by the Free Software Foundation.  Oracle designates this
    1.11 + * particular file as subject to the "Classpath" exception as provided
    1.12 + * by Oracle in the LICENSE file that accompanied this code.
    1.13 + *
    1.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
    1.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.17 + * version 2 for more details (a copy is included in the LICENSE file that
    1.18 + * accompanied this code).
    1.19 + *
    1.20 + * You should have received a copy of the GNU General Public License version
    1.21 + * 2 along with this work; if not, write to the Free Software Foundation,
    1.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.23 + *
    1.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    1.25 + * or visit www.oracle.com if you need additional information or have any
    1.26 + * questions.
    1.27 + */
    1.28 +
    1.29 +package com.sun.xml.internal.xsom;
    1.30 +
    1.31 +import java.util.List;
    1.32 +
    1.33 +
    1.34 +/**
    1.35 + * Complex type.
    1.36 + *
    1.37 + * @author
    1.38 + *  Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
    1.39 + */
    1.40 +public interface XSComplexType extends XSType, XSAttContainer
    1.41 +{
    1.42 +    /**
    1.43 +     * Checks if this complex type is declared as an abstract type.
    1.44 +     */
    1.45 +    boolean isAbstract();
    1.46 +
    1.47 +    boolean isFinal(int derivationMethod);
    1.48 +    /**
    1.49 +     * Roughly corresponds to the block attribute. But see the spec
    1.50 +     * for gory detail.
    1.51 +     */
    1.52 +    boolean isSubstitutionProhibited(int method);
    1.53 +
    1.54 +    /**
    1.55 +     * Gets the scope of this complex type.
    1.56 +     * This is not a property defined in the schema spec.
    1.57 +     *
    1.58 +     * @return
    1.59 +     *      null if this complex type is global. Otherwise
    1.60 +     *      return the element declaration that contains this anonymous
    1.61 +     *      complex type.
    1.62 +     */
    1.63 +    XSElementDecl getScope();
    1.64 +
    1.65 +    /**
    1.66 +     * The content of this complex type.
    1.67 +     *
    1.68 +     * @return
    1.69 +     *      always non-null.
    1.70 +     */
    1.71 +    XSContentType getContentType();
    1.72 +
    1.73 +    /**
    1.74 +     * Gets the explicit content of a complex type with a complex content
    1.75 +     * that was derived by extension.
    1.76 +     *
    1.77 +     * <p>
    1.78 +     * Informally, the "explicit content" is the portion of the
    1.79 +     * content model added in this derivation. IOW, it's a delta between
    1.80 +     * the base complex type and this complex type.
    1.81 +     *
    1.82 +     * <p>
    1.83 +     * For example, when a complex type T2 derives fom T1, then:
    1.84 +     * <pre>
    1.85 +     * content type of T2 = SEQUENCE( content type of T1, explicit content of T2 )
    1.86 +     * </pre>
    1.87 +     *
    1.88 +     * @return
    1.89 +     *      If this complex type is derived by restriction or has a
    1.90 +     *      simple content, this method returns null.
    1.91 +     *      IOW, this method only works for a complex type with
    1.92 +     *      a complex content derived by extension from another complex type.
    1.93 +     */
    1.94 +    XSContentType getExplicitContent();
    1.95 +
    1.96 +    // meaningful only if getContentType returns particles
    1.97 +    boolean isMixed();
    1.98 +
    1.99 +    /**
   1.100 +     * If this {@link XSComplexType} is redefined by another complex type,
   1.101 +     * return that component.
   1.102 +     *
   1.103 +     * @return null
   1.104 +     *      if this component has not been redefined.
   1.105 +     */
   1.106 +    public XSComplexType getRedefinedBy();
   1.107 +
   1.108 +    /**
   1.109 +     * Returns a list of direct subtypes of this complex type. If the type is not subtyped, returns empty list.
   1.110 +     * Doesn't return null.
   1.111 +     * Note that the complex type may be extended outside of the scope of the schemaset known to XSOM.
   1.112 +     * @return
   1.113 +     */
   1.114 +    public List<XSComplexType> getSubtypes();
   1.115 +
   1.116 +    /**
   1.117 +     * Returns a list of element declarations of this type.
   1.118 +     * @return
   1.119 +     */
   1.120 +    public List<XSElementDecl> getElementDecls();
   1.121 +
   1.122 +}

mercurial