Class AbstractPatternFacet

  • Direct Known Subclasses:
    AbstractWhiteSpaceFacet

    public abstract class AbstractPatternFacet
    extends XSType
    A base class for types which support the pattern facet.
    Since:
    1.1
    Version:
    $Revision: 6678 $ $Date: 2005-03-05 06:42:06 -0700 (Sat, 05 Mar 2005) $
    Author:
    Keith Visco, Edward Kuns
    • Constructor Detail

      • AbstractPatternFacet

        public AbstractPatternFacet()
    • Method Detail

      • addPattern

        public final void addPattern​(java.lang.String pattern)
        Adds a pattern branch for this XSType. To successfully pass the pattern facets, only one branch needs to pass.
        Parameters:
        pattern - The regular expression for this XSType.
      • getPatterns

        public final java.util.List<java.lang.String> getPatterns()
        Get list of pattern facets.
        Returns:
        List of pattern facets.
      • setFacet

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

        protected final void addPatternFacet​(Facet facet)
        Transfer given facet if it is a pattern.
        Parameters:
        facet - The facet to transfer.
      • codePatternFacet

        protected final void codePatternFacet​(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 patterns should be added to.