public Category(String category){
  Matcher m=categoryPattern.matcher(category);
  if (!m.matches()) {
    throw new IllegalArgumentException("Invalid category: " + category);
  }
  if (m.group(2) != null) {
    scheme=m.group(2);
  }
  term=m.group(3);
}

public Category ( String category ) { Matcher m = categoryPattern . matcher ( category ) ; if ( ! m . matches ( ) ) { throw new IllegalArgumentException ( "Invalid category: " + category ) ; } if ( m . group ( 2 ) != null ) { scheme = m . group ( 2 ) ; } term = m . group ( 3 ) ; }
constructs a new category from a category string . the format of the string is the same as the one used to represent a category in a gdata query : an optional scheme surrounded by braces , followed by a term .
