gpt4 book ai didi

pl.edu.icm.model.bwmeta.y.YContributor.setRole()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-16 07:34:40 28 4
gpt4 key购买 nike

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

YContributor.setRole介绍

暂无

代码示例

代码示例来源:origin: pl.edu.icm.yadda/yadda-client-common

yc.setInstitution(false);
if(cim.get("role")!=null) yc.setRole(cim.get("role"));

代码示例来源:origin: pl.edu.icm.yadda/yadda-client-common

yc.setRole(val.getValue());

代码示例来源:origin: pl.edu.icm.yadda/yadda-client-common

yc.setRole(val.getValue());

代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl

private static void putAuthor(YElement element, String author, List<String> refs) {
  author = author.replaceAll(" +\\.", ".");
  YName name = new YName().setType(YConstants.NM_CANONICAL).setText(author);
  YContributor contributor = new YContributor().setRole(YConstants.CR_AUTHOR).addName(name);
  for (String ref : refs) {
    if (ref.equals("*") || ref.equals("†")) {
      // Currently nothing is done
    } else {
      String id = Enhancers.affiliationIdFromIndex(ref);
      if (element.getAffiliation(id) != null) {
        contributor.addAffiliationRef(id);
      }
    }
  }
  element.addContributor(contributor);
}

代码示例来源:origin: pl.edu.icm.synat/synat-importer-direct

switch (cret.getCreatorRole().toLowerCase()) {
  case "author":
    cont.setRole(ContributorRoles.CR_AUTHOR);
    break;
  case "editor":
    cont.setRole(ContributorRoles.CR_EDITOR);
    break;
  default:

代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl

private static void putEditor(YElement element, String editor) {
  YName name = new YName().setType(YConstants.NM_CANONICAL).setText(editor);
  YContributor contributor = new YContributor().setRole(YConstants.CR_EDITOR).addName(name);
  element.addContributor(contributor);
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl

public void convertContributors(BibEntry source, YElement yElement) {
  List<YContributor> yContributors = new ArrayList();
  //authors
  List<YContributor> yAuthors = parseBibEntryPersons(source.getAllFieldValues(BibEntry.FIELD_AUTHOR), YConstants.CR_AUTHOR);
  //editors
  List<YContributor> yEditors = parseBibEntryPersons(source.getAllFieldValues(BibEntry.FIELD_EDITOR), YConstants.CR_EDITOR);
  yContributors.addAll(yAuthors);
  yContributors.addAll(yEditors);
  //publisher
  if (source.getFirstFieldValue(BibEntry.FIELD_ADDRESS) != null
      && source.getFirstFieldValue(BibEntry.FIELD_PUBLISHER) != null) {
    String publisher = source.getFirstFieldValue(BibEntry.FIELD_PUBLISHER);
    String address = source.getFirstFieldValue(BibEntry.FIELD_ADDRESS);
    YContributor yPublisher = new YContributor();
    yPublisher.setRole(YConstants.CR_PUBLISHER);
    yPublisher.addName(new YName().setType(YConstants.NM_CANONICAL).setText(publisher));
    yPublisher.addAttribute(YConstants.AT_ADDRESS_CITY, address);
    yContributors.add(yPublisher);
  }
  yElement.setContributors(yContributors);
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl

protected List<YContributor> parseBibEntryPersons(List<String> persons, String role) {
  List<YContributor> yContributorList = new ArrayList<YContributor>();
  for (String person : persons) {
    YContributor yContributor = new YContributor();
    yContributor.setPerson(true);
    yContributor.setRole(role);
    yContributor.addName(new YName().setType(YConstants.NM_CANONICAL).setText(person));
    String[] split = person.split(", ");
    if (split.length > 0) {
      yContributor.addName(new YName().setType(YConstants.NM_SURNAME).setText(split[0]));
    }
    if (split.length > 1) {
      yContributor.addName(new YName().setType(YConstants.NM_FORENAMES).setText(split[1]));
    }
    if (split.length > 2) {
      yContributor.addName(new YName().setType(YConstants.NM_SUFFIX).setText(split[2]));
    }
    yContributorList.add(yContributor);
  }
  return yContributorList;
}

代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers

ycont.setRole(ContributorRoles.CR_AUTHOR);
article.addContributor(ycont);

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

private YContributor initYContributor(ResourceContributor input, String yRole) {
  YContributor contributor = new YContributor();
  contributor.addName(new YName(UserProfileUtils.createFullName(input.getForenames(), input.getSurname())).setType(NameTypes.NM_CANONICAL));
  contributor.addName(new YName(input.getForenames()).setType(NameTypes.NM_FORENAMES));
  contributor.addName(new YName(input.getSurname()).setType(NameTypes.NM_SURNAME));
  contributor.setRole(yRole);
  if (StringUtils.isNotBlank(input.getOrigApprovedId())) {
    BwmetaContributorUtils.setContributorIdentity(contributor, input.getOrigApprovedId());
  }
  if (input.getContributorId() == null) {
    throw new IllegalArgumentException();
  }
  BwmetaContributorUtils.setContributorId(contributor, input.getContributorId());
  
  if(input.getAffiliationIds() != null){
    for (String affId : input.getAffiliationIds()) {
      if(StringUtils.isNotBlank(affId)){
        contributor.addAffiliationRef(affId);
      }
    }
  }
  return contributor;
}

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