Class XSComplexTypeDecl

    • Constructor Detail

      • XSComplexTypeDecl

        public XSComplexTypeDecl()
    • Method Detail

      • setName

        public void setName​(String name)
      • getTypeCategory

        public short getTypeCategory()
        Description copied from interface: XSTypeDefinition
        Return whether this type definition is a simple type or complex type.
        Specified by:
        getTypeCategory in interface XSTypeDefinition
      • getFinalSet

        public short getFinalSet()
      • getTargetNamespace

        public String getTargetNamespace()
      • containsTypeID

        public boolean containsTypeID()
      • setIsAbstractType

        public void setIsAbstractType()
      • setContainsTypeID

        public void setContainsTypeID()
      • setIsAnonymous

        public void setIsAnonymous()
      • derivedFromType

        public boolean derivedFromType​(XSTypeDefinition ancestor,
                                       short derivationMethod)
        Description copied from interface: XSTypeDefinition
        Convenience method which checks if this type is derived from the given ancestorType.
        Specified by:
        derivedFromType in interface XSTypeDefinition
        Parameters:
        ancestor - An ancestor type definition.
        derivationMethod - A bit combination representing a subset of { DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION, DERIVATION_LIST }.
        Returns:
        True if this type is derived from ancestorType using only derivation methods from the derivationMethod .
      • derivedFrom

        public boolean derivedFrom​(String ancestorNS,
                                   String ancestorName,
                                   short derivationMethod)
        Description copied from interface: XSTypeDefinition
        Convenience method which checks if this type is derived from the given ancestor type.
        Specified by:
        derivedFrom in interface XSTypeDefinition
        Parameters:
        ancestorNS - An ancestor type namespace.
        ancestorName - An ancestor type name.
        derivationMethod - A bit combination representing a subset of { DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION, DERIVATION_LIST }.
        Returns:
        True if this type is derived from ancestorType using only derivation methods from the derivationMethod .
      • isDOMDerivedFrom

        public boolean isDOMDerivedFrom​(String ancestorNS,
                                        String ancestorName,
                                        int derivationMethod)
        Checks if a type is derived from another given the the name, namespace and derivation method. See: http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#TypeInfo-isDerivedFrom
        Parameters:
        ancestorNS - The namspace of the ancestor type declaration
        ancestorName - The name of the ancestor type declaration
        derivationMethod - The derivation method
        Returns:
        boolean True if the ancestor type is derived from the reference type by the specifiied derivation method.
      • reset

        public void reset()
      • getType

        public short getType()
        Get the type of the object, i.e ELEMENT_DECLARATION.
        Specified by:
        getType in interface XSObject
      • getName

        public String getName()
        The name of this XSObject depending on the XSObject type.
        Specified by:
        getName in interface XSObject
      • getAnonymous

        public boolean getAnonymous()
        A boolean that specifies if the type definition is anonymous. Convenience attribute. This is a field is not part of XML Schema component model.
        Specified by:
        getAnonymous in interface XSTypeDefinition
      • getNamespace

        public String getNamespace()
        The namespace URI of this node, or null if it is unspecified. defines how a namespace URI is attached to schema components.
        Specified by:
        getNamespace in interface XSObject
      • getDerivationMethod

        public short getDerivationMethod()
        {derivation method} Either extension or restriction. The valid constant value for this XSConstants EXTENTION, RESTRICTION.
        Specified by:
        getDerivationMethod in interface XSComplexTypeDefinition
      • isFinal

        public boolean isFinal​(short derivation)
        {final} For complex type definition it is a subset of {extension, restriction}. For simple type definition it is a subset of {extension, list, restriction, union}.
        Specified by:
        isFinal in interface XSTypeDefinition
        Parameters:
        derivation - Extension, restriction, list, union constants (defined in XSConstants).
        Returns:
        True if derivation is in the final set, otherwise false.
      • getFinal

        public short getFinal()
        {final} For complex type definition it is a subset of {extension, restriction}.
        Specified by:
        getFinal in interface XSTypeDefinition
        Returns:
        A bit flag that represents: {extension, restriction) or none for complexTypes; {extension, list, restriction, union} or none for simpleTypes;
      • getAbstract

        public boolean getAbstract()
        {abstract} A boolean. Complex types for which {abstract} is true must not be used as the {type definition} for the validation of element information items.
        Specified by:
        getAbstract in interface XSComplexTypeDefinition
      • getContentType

        public short getContentType()
        {content type} One of empty, a simple type definition (see simpleType, or mixed, element-only (see cmParticle).
        Specified by:
        getContentType in interface XSComplexTypeDefinition
      • isProhibitedSubstitution

        public boolean isProhibitedSubstitution​(short prohibited)
        {prohibited substitutions} A subset of {extension, restriction}.
        Specified by:
        isProhibitedSubstitution in interface XSComplexTypeDefinition
        Parameters:
        prohibited - extention or restriction constants (defined in XSConstants).
        Returns:
        True if prohibited is a prohibited substitution, otherwise false.
      • isDerivedFrom

        public boolean isDerivedFrom​(String typeNamespaceArg,
                                     String typeNameArg,
                                     int derivationMethod)
        Specified by:
        isDerivedFrom in interface TypeInfo