title: Validating queryparam values jersey
body: <p>Are there any other ways besides the one below to validate query parameter values i.e. is there a Jersey way to this by mapping to a schema via a wadl. Thank you</p>
  
  <pre><code>@Path("smooth")
  @GET
  public Response smooth(
      @DefaultValue("blue") @QueryParam("min-color") ColorParam minColor,
  
  public class ColorParam extends Color {
   public ColorParam(String s) {
      super(getRGB(s));
   }
  
   private static int getRGB(String s) {
      if (s.charAt(0) == '#') {
          try {
              Color c = Color.decode("0x" + s.substring(1));
              return c.getRGB();
          } catch (NumberFormatException e) {
              throw new WebApplicationException(400);
  </code></pre>