Class SchemaSetImpl.AnySimpleType

    • Constructor Detail

      • AnySimpleType

        AnySimpleType()
    • Method Detail

      • asComplexType

        public XSComplexType asComplexType()
        Description copied from interface: XSType
        Casts this object to XSComplexType if possible, otherwise returns null.
        Specified by:
        asComplexType in interface XSType
      • isDerivedFrom

        public boolean isDerivedFrom​(XSType t)
        Description copied from interface: XSType
        Returns true if this type is derived from the specified type.

        Note that t.isDerivedFrom(t) returns true.

        Specified by:
        isDerivedFrom in interface XSType
      • isSimpleType

        public boolean isSimpleType()
        Description copied from interface: XSType
        Returns true if this instanceof XSSimpleType.
        Specified by:
        isSimpleType in interface XSType
      • isComplexType

        public boolean isComplexType()
        Description copied from interface: XSType
        Returns true if this instanceof XSComplexType.
        Specified by:
        isComplexType in interface XSType
      • getBaseType

        public XSType getBaseType()
        Description copied from interface: XSType
        Returns the base type of this type. Note that if this type represents xs:anyType, this method returns itself. This is awkward as an API, but it follows the schema specification.
        Specified by:
        getBaseType in interface XSType
        Returns:
        always non-null.
      • getSimpleBaseType

        public XSSimpleType getSimpleBaseType()
        Description copied from interface: XSSimpleType
        Gets the base type as XSSimpleType. Equivalent to (XSSimpleType)getBaseType() Since this is a simple type, we know that the base type is also a simple type. The only exception is xs:anySimpleType, which has xs:anyType as the base type.
        Specified by:
        getSimpleBaseType in interface XSSimpleType
        Returns:
        null if this is xs:anySimpleType. Otherwise non-null.
      • isPrimitive

        public boolean isPrimitive()
        Description copied from interface: XSSimpleType
        Returns true if this is a primitive built-in simple type (that directly derives from xs:anySimpleType, by definition.)
        Specified by:
        isPrimitive in interface XSSimpleType
      • getFacet

        public XSFacet getFacet​(java.lang.String name)
        Description copied from interface: XSSimpleType
        Gets the effective facet object of the given name.

        For example, if a simple type "foo" is derived from xs:string by restriction with the "maxLength" facet and another simple type "bar" is derived from "foo" by restriction with another "maxLength" facet, this method will return the latter one, because that is the most restrictive, effective facet.

        For those facets that can have multiple values (pattern facets and enumeration facets), this method will return only the first one. TODO: allow clients to access all of them by some means.

        Specified by:
        getFacet in interface XSSimpleType
        Returns:
        If this datatype has a facet of the given name, return that object. If the facet is not specified anywhere in its derivation chain, null will be returned.
      • getDeclaredFacet

        public XSFacet getDeclaredFacet​(java.lang.String name)
        Description copied from interface: XSRestrictionSimpleType
        Gets the declared facet object of the given name.

        This method returns a facet object that is added in this type and does not recursively check the ancestors.

        For those facets that can have multiple values (pattern facets and enumeration facets), this method will return only the first one.

        Specified by:
        getDeclaredFacet in interface XSRestrictionSimpleType
        Returns:
        Null if the facet is not specified in the last step of derivation.
      • getDeclaredFacets

        public java.util.List<XSFacet> getDeclaredFacets​(java.lang.String name)
        Description copied from interface: XSRestrictionSimpleType
        Gets the declared facets of the given name. This method is for those facets (such as 'pattern') that can be specified multiple times on a simple type.
        Specified by:
        getDeclaredFacets in interface XSRestrictionSimpleType
        Returns:
        can be empty but never be null.
      • isRestriction

        public boolean isRestriction()
        Description copied from interface: XSSimpleType
        Returns true if this instanceof XSRestrictionSimpleType.
        Specified by:
        isRestriction in interface XSSimpleType
      • isList

        public boolean isList()
        Description copied from interface: XSSimpleType
        Returns true if this instanceof XSListSimpleType.
        Specified by:
        isList in interface XSSimpleType
      • isUnion

        public boolean isUnion()
        Description copied from interface: XSSimpleType
        Returns true if this instanceof XSUnionSimpleType.
        Specified by:
        isUnion in interface XSSimpleType
      • isFinal

        public boolean isFinal​(XSVariety v)
        Description copied from interface: XSSimpleType
        Returns true if this type definition is marked as 'final' with respect to the given XSVariety.
        Specified by:
        isFinal in interface XSSimpleType
        Returns:
        true if the type is marked final.
      • getRedefinedCount

        public int getRedefinedCount()
        Description copied from interface: XSType
        Returns the number of complex types that redefine this component.

        For example, if A is redefined by B and B is redefined by C, A.getRedefinedCount()==2, B.getRedefinedCount()==1, and C.getRedefinedCount()==0.

        Specified by:
        getRedefinedCount in interface XSType
      • listSubstitutables

        public XSType[] listSubstitutables()
        Description copied from interface: XSType
        Lists up types that can substitute this type by using xsi:type. Includes this type itself.

        This method honors the block flag.

        Specified by:
        listSubstitutables in interface XSType