/** * @return the description string for the specified map. If the description string was specified * as "<item tag> main description" then only the main description is returned. */ public String getDescription(String map) { Description desc = getDescriptionItem(map); if (desc != null) { String dstr = desc.getDescription(); if (dstr.startsWith("<") && (dstr.indexOf('>') > -1)) { return dstr.substring(dstr.indexOf('>') + 1).trim(); } else { return desc.getDescription().trim(); } } else { return null; } }
/** @return the full description string for the specified map */ public String getFullDescription(String map) { Description desc = getDescriptionItem(map); if (desc != null) { return desc.getDescription(); } else { return null; } }
/** * @return the item tag for the specified map if the description was specified as "<item tag> main * description". Otherwise null is returned. */ public String getItemTag(String map) { Description desc = getDescriptionItem(map); if (desc != null) { String dstr = desc.getDescription(); if (dstr.startsWith("<") && (dstr.indexOf('>') > -1)) { return dstr.substring(1, dstr.indexOf('>')); } } return null; }