Class AbstractWhiteSpaceFacet

    • Constructor Detail

      • AbstractWhiteSpaceFacet

        protected AbstractWhiteSpaceFacet()
        No-arg constructor. By default only 'collapse' is supported for the whiteSpace facet.
      • AbstractWhiteSpaceFacet

        protected AbstractWhiteSpaceFacet​(boolean whiteSpaceCollapseOnly)
        Construct a new AbstractXSPatternFacet optionally allowing the whiteSpace facet to be set to 'replace' and 'preserve' values in addition to 'collaps'.
        Parameters:
        whiteSpaceCollapseOnly - If set to true only 'collapse' is allowed for the whiteSpace facet. If set to false 'collaps', 'replace' and 'preserve' values are allowed for whiteSpace facet.
    • Method Detail

      • hasWhiteSpace

        public final boolean hasWhiteSpace()
        Returns true if the whiteSpace facet is used.
        Returns:
        True if the whiteSpace facet is used.
      • getWhiteSpace

        public final java.lang.String getWhiteSpace()
        Returns the whiteSpace facet of this type.
        Returns:
        The whiteSpace facet of this type.
      • setWhiteSpace

        public final void setWhiteSpace​(java.lang.String value)
        Sets the whiteSpace facet of this XSType. The value of the whiteSpace facet must be one of the following:
        • preserve
        • replace
        • collapse
        Any other value will generate a warning and the whiteSpace facet keeps unchanged.
        Parameters:
        value - The value for the whiteSpace facet.
      • setFacet

        protected void setFacet​(Facet facet)
        Set the given facet for XSType if applicable.
        Overrides:
        setFacet in class AbstractPatternFacet
        Parameters:
        facet - The facet to set for XSType.
      • setWhiteSpaceFacet

        protected final void setWhiteSpaceFacet​(Facet facet)
        Transfer given facet if it is a whiteSpace.
        Parameters:
        facet - The facet to transfer.
      • codeWhiteSpaceFacet

        protected final void codeWhiteSpaceFacet​(JSourceCode jsc,
                                                 java.lang.String validatorName)
        Generate the source code for pattern facet validation.
        Parameters:
        jsc - The JSourceCode to fill in.
        validatorName - The name of the TypeValidator that the whiteSpace should be added to.