public static BorderType valueOf(final String name){
    BorderType[] allTypes = getAllTypes();
    for (BorderType type : allTypes) {
      if (type.getId().equals(name)) return type;
    }
    throw new UnexpectedFormElementException("unknown type: "+name);
  }
public static BorderType valueOf(final String name)