示例#1
0
  /**
   * @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;
    }
  }
示例#2
0
  /** @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;
    }
  }
示例#3
0
  /**
   * @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;
  }