code: protected XmlSchemaPatternFacet createPatternFacet(final String pattern) {
          XmlSchemaPatternFacet xmlSchemaPatternFacet = new XmlSchemaPatternFacet();
          xmlSchemaPatternFacet.setValue(pattern);
          return xmlSchemaPatternFacet;
      }
docs: Create an XML schema pattern facet.
  
  @param pattern the value to set
  @return an XML schema pattern facet