Exemplo n.º 1
0
  private ProxyInfo assembleProxyInfoForUser(UserAccount proxyUser) {
    String userUri = proxyUser.getUri();
    String label = assembleUserAccountLabel(proxyUser);
    String classLabel = "";
    String imageUrl =
        UrlBuilder.getUrl(
            PlaceholderUtil.getPlaceholderImagePathForType(vreq, VitroVocabulary.USERACCOUNT));

    // Does this user have a profile? Can we get better info?
    Individual proxyProfilePage = getProfilePage(proxyUser);
    if (proxyProfilePage != null) {
      String thumbUrl = proxyProfilePage.getThumbUrl();
      if ((thumbUrl != null) && (!thumbUrl.isEmpty())) {
        imageUrl = UrlBuilder.getUrl(thumbUrl);
      }
      classLabel = getMostSpecificTypeLabel(proxyProfilePage.getURI());
    }
    return new ProxyInfo(userUri, label, classLabel, imageUrl);
  }
 private String getNextPageLink(int startIndex, int hitsPerPage, String baseUrl, ParamMap params) {
   params.put("startIndex", String.valueOf(startIndex + hitsPerPage));
   // return new PagingLink("Next", baseUrl, params);
   return UrlBuilder.getUrl(baseUrl, params);
 }