@Override
    public String toString() {
        return "query profile '" + getId()  + "'" + (type!=null ? " of type '" + type.getId() + "'" : "");
    }
Switches this from write-only to read-only mode.
This profile can never be modified again after this method returns.
Calling this on an already frozen profile has no effect.

Calling this will also freeze any profiles inherited and referenced by this.
container-search/src/main/java/com/yahoo/search/query/profile/QueryProfile.java