public String toString() {
        String result = templateType.toString() + ": ";
        switch (templateType) {
        case LABEL:
            if (replacements == null) {
                result += getId();
            } else {
                for (StringTemplate object : replacements) {
                    result += object + getId();
                }
            }
            break;
        case TEMPLATE:
            result += getId();
            if (defaultId != null) {
                result += " (" + defaultId + ")";
            }
            result += " [";
            for (int index = 0; index < keys.size(); index++) {
                result += "[" + keys.get(index) + ": "
                    + replacements.get(index).toString() + "]";
            }
            result += "]";
            break;
        case KEY:
            result += getId();
            if (defaultId != null) {
                result += " (" + defaultId + ")";
            }
            break;
        case NAME:
        default:
            result += getId();
        }
        return result;
    }