pl.edu.icm.synat.logic.model.utils.YModelUtils.fetchSurname()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(122)

本文整理了Java中pl.edu.icm.synat.logic.model.utils.YModelUtils.fetchSurname()方法的一些代码示例,展示了YModelUtils.fetchSurname()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YModelUtils.fetchSurname()方法的具体详情如下:
包路径:pl.edu.icm.synat.logic.model.utils.YModelUtils
类名称:YModelUtils
方法名:fetchSurname

YModelUtils.fetchSurname介绍

暂无

代码示例

代码示例来源:origin: pl.edu.icm.synat/synat-business-services-api

public static String getContributorNameForSort(YContributor contributor) {
  String name = fetchNames(contributor);
  final String surname = fetchSurname(contributor);
  if (StringUtils.isNotEmpty(surname) && StringUtils.isNotEmpty(name)) {
    return UserProfileUtils.createNameForSorting(name, surname);
  }
  return getDefaultContributor(contributor);
}

代码示例来源:origin: pl.edu.icm.synat/synat-business-services-api

/**
 * Utility function retrieving name of YContributor
 *
 * @param contributor
 * @return concatenation of NM_SURNAME and NM_FORENAMES names separated with
 *         ", "
 */
public static String getDefaultContributor(YContributor contributor) {
  String name = fetchNames(contributor);
  final String surname = fetchSurname(contributor);
  if (StringUtils.isNotEmpty(surname) && StringUtils.isNotEmpty(name)) {
    return UserProfileUtils.createFullName(name, surname);
  }
  return getDefaultName(contributor);
}

代码示例来源:origin: pl.edu.icm.synat/synat-portal-core

public ResourceContributor transformYContributorToResourceContributor(final String documentId, YContributor contributor) {
  String forenames = YModelUtils.fetchNames(contributor);
  String surname = YModelUtils.fetchSurname(contributor);
  Integer contributorId = BwmetaContributorUtils.getContributorId(contributor);
  final boolean hasSuggestion = fetchHasSuggestions(documentId, contributorId);
    String identity = BwmetaContributorUtils.getContributorIdentity(contributor);
  ResourceContributor resourceContributor = new ResourceContributor(contributorId, identity, hasSuggestion).setAffiliationIds(contributor
      .getAffiliationRefs());
  if (StringUtils.isNotBlank(identity)) {
    resourceContributor.setThumbnailPath(thumbnailService.resolveUserAvatar(identity));
    resourceContributor.setCurrentId(identity);
  }
  final String canonicalName = YModelUtils.getCanonicalName(contributor);
  if (StringUtils.isNotBlank(forenames) && StringUtils.isNotBlank(surname)) {
    resourceContributor.setForenames(forenames).setSurname(surname);
    if (StringUtils.isBlank(canonicalName)) {
      resourceContributor.setCanonicalName(UserProfileUtils.createFullName(forenames, surname));
    }
  } else if (StringUtils.isBlank(canonicalName)) {
    resourceContributor.setCanonicalName(YModelUtils.getDefaultName(contributor));
  }
  if (StringUtils.isNotBlank(canonicalName)) {
    resourceContributor.setCanonicalName(canonicalName);
  }
  return resourceContributor;
}

代码示例来源:origin: pl.edu.icm.synat/synat-process-common

IdentityIndexDocument indexDocument = new IdentityIndexDocument(contributorId);
indexDocument.setRole(contributor.getRole());
String surname = YModelUtils.fetchSurname(contributor);
indexDocument.setSurname(StringUtils.trim(surname));
String name = YModelUtils.fetchNames(contributor);

相关文章