public static Severity parseSeverity(String str) throws IllegalSeverityException {
  if (str.equalsIgnoreCase(Messages.ERROR)) {
    return ERROR;
  }
 else   if (str.equalsIgnoreCase(Messages.WARNING)) {
    return WARNING;
  }
 else {
    throw new IllegalSeverityException();
  }
}

public static Severity parseSeverity ( String str ) throws IllegalSeverityException { if ( str . equalsIgnoreCase ( Messages . ERROR ) ) { return ERROR ; } else if ( str . equalsIgnoreCase ( Messages . WARNING ) ) { return WARNING ; } else { throw new IllegalSeverityException ( ) ; } }
parse str and convert to appropriate severity .
