コード例 #1
0
  private String propertyVal(final Id id) {
    final Property p = card.getProperty(id);

    if (p == null) {
      return null;
    }

    return p.getValue();
  }
コード例 #2
0
  /**
   * @return displayname of entoty represented by this info
   * @throws WebdavException
   */
  public String getDisplayname() throws WebdavException {
    if (card == null) {
      return null;
    }

    final String nn = propertyVal(Id.NICKNAME);

    if (nn != null) {
      return nn;
    }

    final N n = (N) card.getProperty(Id.N);

    if (n == null) {
      return null;
    }

    return notNull(n.getGivenName()) + " " + notNull(n.getFamilyName());
  }