public static RankType fromString(String rankTypeName) {
        try {
            return RankType.valueOf(rankTypeName.toUpperCase());
        }
        catch (IllegalArgumentException e) {
            throw new IllegalArgumentException("Unknown rank type '" + rankTypeName + "'. Supported rank types are " +
                                               "'identity', 'about', 'tags' and 'empty'.");
        }
    }
Returns the rank type from a string, regardless of its case.

@param  rankTypeName a rank type name in any casing
@return the rank type found
@throws IllegalArgumentException if not found
config-model/src/main/java/com/yahoo/schema/document/RankType.java