Interface XSSimpleTypeDefinition

  • All Superinterfaces:
    XSObject, XSTypeDefinition
    All Known Subinterfaces:
    XSSimpleType
    All Known Implementing Classes:
    XSSimpleTypeDecl, XSSimpleTypeDelegate

    public interface XSSimpleTypeDefinition
    extends XSTypeDefinition
    This interface represents the Simple Type Definition schema component. This interface provides several query operations for facet components. Users can either retrieve the defined facets as XML Schema components, using the facets and the multiValueFacets attributes; or users can separately query a facet's properties using methods such as getLexicalFacetValue, isFixedFacet, etc.
    • Field Detail

      • VARIETY_ABSENT

        static final short VARIETY_ABSENT
        The variety is absent for the anySimpleType definition.
        See Also:
        Constant Field Values
      • FACET_WHITESPACE

        static final short FACET_WHITESPACE
        4.3.5 whitespace.
        See Also:
        Constant Field Values
      • FACET_MAXINCLUSIVE

        static final short FACET_MAXINCLUSIVE
        4.3.7 maxInclusive.
        See Also:
        Constant Field Values
      • FACET_MAXEXCLUSIVE

        static final short FACET_MAXEXCLUSIVE
        4.3.9 maxExclusive.
        See Also:
        Constant Field Values
      • FACET_MINEXCLUSIVE

        static final short FACET_MINEXCLUSIVE
        4.3.9 minExclusive.
        See Also:
        Constant Field Values
      • FACET_MININCLUSIVE

        static final short FACET_MININCLUSIVE
        4.3.10 minInclusive.
        See Also:
        Constant Field Values
      • FACET_TOTALDIGITS

        static final short FACET_TOTALDIGITS
        4.3.11 totalDigits .
        See Also:
        Constant Field Values
      • FACET_FRACTIONDIGITS

        static final short FACET_FRACTIONDIGITS
        4.3.12 fractionDigits.
        See Also:
        Constant Field Values
      • FACET_ENUMERATION

        static final short FACET_ENUMERATION
        4.3.5 enumeration.
        See Also:
        Constant Field Values
      • ORDERED_FALSE

        static final short ORDERED_FALSE
        A constant defined for the 'ordered' fundamental facet: not ordered.
        See Also:
        Constant Field Values
      • ORDERED_PARTIAL

        static final short ORDERED_PARTIAL
        A constant defined for the 'ordered' fundamental facet: partially ordered.
        See Also:
        Constant Field Values
      • ORDERED_TOTAL

        static final short ORDERED_TOTAL
        A constant defined for the 'ordered' fundamental facet: total ordered.
        See Also:
        Constant Field Values
    • Method Detail

      • getVariety

        short getVariety()
        [variety]: one of {atomic, list, union} or absent.
      • getPrimitiveType

        XSSimpleTypeDefinition getPrimitiveType()
        If variety is atomic the primitive type definition (a built-in primitive datatype definition or the simple ur-type definition) is available, otherwise null.
      • getBuiltInKind

        short getBuiltInKind()
        Returns the closest built-in type category this type represents or derived from. For example, if this simple type is a built-in derived type integer the INTEGER_DV is returned.
      • getItemType

        XSSimpleTypeDefinition getItemType()
        If variety is list the item type definition (an atomic or union simple type definition) is available, otherwise null.
      • getMemberTypes

        XSObjectList getMemberTypes()
        If variety is union the list of member type definitions (a non-empty sequence of simple type definitions) is available, otherwise an empty XSObjectList.
      • getDefinedFacets

        short getDefinedFacets()
        [facets]: all facets defined on this type. The value is a bit combination of FACET_XXX constants of all defined facets.
      • isDefinedFacet

        boolean isDefinedFacet​(short facetName)
        Convenience method. [Facets]: check whether a facet is defined on this type.
        Parameters:
        facetName - The name of the facet.
        Returns:
        True if the facet is defined, false otherwise.
      • getFixedFacets

        short getFixedFacets()
        [facets]: all defined facets for this type which are fixed.
      • isFixedFacet

        boolean isFixedFacet​(short facetName)
        Convenience method. [Facets]: check whether a facet is defined and fixed on this type.
        Parameters:
        facetName - The name of the facet.
        Returns:
        True if the facet is fixed, false otherwise.
      • getLexicalFacetValue

        java.lang.String getLexicalFacetValue​(short facetName)
        Convenience method. Returns a value of a single constraining facet for this simple type definition. This method must not be used to retrieve values for enumeration and pattern facets.
        Parameters:
        facetName - The name of the facet, i.e. FACET_LENGTH, FACET_TOTALDIGITS. To retrieve the value for a pattern or an enumeration, see enumeration and pattern.
        Returns:
        A value of the facet specified in facetName for this simple type definition or null.
      • getLexicalEnumeration

        StringList getLexicalEnumeration()
        A list of enumeration values if it exists, otherwise an empty StringList.
      • getLexicalPattern

        StringList getLexicalPattern()
        A list of pattern values if it exists, otherwise an empty StringList.
      • getOrdered

        short getOrdered()
        Fundamental Facet: ordered.
      • getFinite

        boolean getFinite()
        Fundamental Facet: cardinality.
      • getBounded

        boolean getBounded()
        Fundamental Facet: bounded.
      • getNumeric

        boolean getNumeric()
        Fundamental Facet: numeric.
      • getFacets

        XSObjectList getFacets()
        A list of constraining facets if it exists, otherwise an empty XSObjectList. Note: This method must not be used to retrieve values for enumeration and pattern facets.
      • getMultiValueFacets

        XSObjectList getMultiValueFacets()
        A list of enumeration and pattern constraining facets if it exists, otherwise an empty XSObjectList.
      • getFacet

        XSObject getFacet​(int facetType)
        A constraining facet object. An instance of XSFacet or XSMultiValueFacet.
      • getAnnotations

        XSObjectList getAnnotations()
        A sequence of [annotations] or an empty XSObjectList.