title: JAXB generated simple type missing restriction
body: <p>I'm currently generating my first JAXB data binding.  I have a schema which contains within it a xs:simpleType:</p>
  
  <pre><code>&lt;xs:simpleType name="NINumberType"&gt;
      &lt;xs:restriction base="xs:string"&gt;
          &lt;xs:pattern value="[A-Z]{2}\d{6}[A-D]{0,1}"/&gt;
      &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  </code></pre>
  
  <p>In my binding.xjb I have this:</p>
  
  <pre><code>&lt;jxb:bindings version="1.0"
       xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
       xmlns:xs="http://www.w3.org/2001/XMLSchema"
       xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
       jxb:extensionBindingPrefixes="xjc"&gt;
  
       &lt;jxb:bindings schemaLocation="mySchema.xsd" node="/xs:schema"&gt;
           &lt;jxb:globalBindings mapSimpleTypeDef="true" /&gt;
           &lt;jxb:schemaBindings&gt;
               &lt;jxb:package name="com.company.jaxb.mySchema"/&gt;
           &lt;/jxb:schemaBindings&gt;
       &lt;/jxb:bindings&gt;
  
  &lt;/jxb:bindings&gt;
  </code></pre>
  
  <p>Then, through Eclipse (well RAD 7.5) I right click the schema, and choose Generate->Java.  This produces data binding objects as expected, except that the <code>NINumberType</code> has no built in restrictions:</p>
  
  <pre><code>/**
   * &lt;p&gt;Java class for NINumberType simple type.
   * 
   * &lt;p&gt;The following schema fragment specifies the expected content contained within this class.
   * 
   * &lt;pre&gt;
   * &amp;lt;simpleType name="NINumberType"&gt;
   *   &amp;lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"&gt;
   *     &amp;lt;pattern value="[A-Z]{2}\d{6}[A-Z]{0,1}"/&gt;
   *   &amp;lt;/restriction&gt;
   * &amp;lt;/simpleType&gt;
   * &lt;/pre&gt;
   */
  @XmlAccessorType(XmlAccessType.FIELD)
  @XmlType(name = "NINumberType", propOrder = {"value"})
  public class NINumberType {
      @XmlValue
      protected String value;
  
      public String getValue() {return value;}
      public void setValue(String value) {this.value = value;}
  }
  </code></pre>
  
  <p>No mention is made of the regular expression restriction specified in my schema, except in the class level javadoc.  JAXB appears to have the information it needs to generate the restriction code, but is not using it.  Can anyone help me ensure that the restriction code is generated such that attempting to bind a poorly formatted NI number will fail?</p>