gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-14 11:02:49 26 4
gpt4 key购买 nike

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

YModelUtils.fetchNames介绍

暂无

代码示例

代码示例来源: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

String surname = YModelUtils.fetchSurname(contributor);
indexDocument.setSurname(StringUtils.trim(surname));
String name = YModelUtils.fetchNames(contributor);
indexDocument.setName(StringUtils.trim(name));
if (StringUtils.isBlank(indexDocument.getName()) && StringUtils.isBlank(indexDocument.getSurname())) {

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com