gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-15 21:14:40 25 4
gpt4 key购买 nike

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

YAffiliation.<init>介绍

暂无

代码示例

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

private static void putAffiliation(YElement element, String text, String ref) {
  text = text.replaceFirst(" and$", "").replaceFirst("\\S+@.*$", "").replaceFirst("[Ee]mails?:.*$", "");
  text = text.replaceFirst("[Ee]-[Mm]ails?:.*$", "").trim().replaceFirst("[\\.,;]$", "");
  YAffiliation affiliation = new YAffiliation(Enhancers.affiliationIdFromIndex(ref), text);
  element.addAffiliation(affiliation);
}

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

protected void convertAffiliations(BibEntry source, YElement yElement) {
    String affiliations = source.getFirstFieldValue(BibEntry.FIELD_AFFILIATION);
    if (affiliations != null) {
      List<YAffiliation> yAffiliationsList = new ArrayList<YAffiliation>();
      String[] split = affiliations.split("; ");
      for (String affiliation : split) {
        yAffiliationsList.add(new YAffiliation().setText(affiliation));
      }
      yElement.setAffiliations(yAffiliationsList);
    }
  }
}

代码示例来源:origin: pl.edu.icm.yadda/bwmeta-import

/**
 * Creates an affiliation given its identifier and text.
 * If either is empty or null, does not create an affiliation but returns null.
 *
 * @param id identifier of the affiliation
 * @param text text of the affiliation
 * @return created affiliation, or null if id or text were empty or null
 */
public YAffiliation affiliation(String id, String text) {
  if (empty(id) || empty(text)) return null;
  return new YAffiliation(id, text);
}

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

public  List<YAffiliation>  extractAllAffiliations(org.jdom.Element ameta) {
  int autoID=1;
  List<YAffiliation> affsList=new ArrayList<>();
  List<org.jdom.Element> cg = JDOMHelper.optChildren(ameta, "contrib-group");
  for (org.jdom.Element group : cg) {
    for (org.jdom.Element affElement: JDOMHelper.getChildren(group, "aff")){
      String id=affElement.getAttributeValue("id");
      if (StringUtils.isBlank(id)) {
        id=""+(autoID++);
      }
      YAffiliation aff=new YAffiliation(id, JDOMHelper.getTextTrim(affElement));
      affsList.add(aff);
    }
  }
  return affsList;
}

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

public static YAffiliation getOrCreateAffiliation(YElement element, String id) {
  YAffiliation affiliation = element.getAffiliation(id);
  if (affiliation == null) {
    affiliation = new YAffiliation().setId(id);
    element.addAffiliation(affiliation);
  }
  return affiliation;
}

代码示例来源:origin: pl.edu.icm.yadda.repowebeditor/repository-web-editor-core

public ArticleBuilder setAuthors(Map<Integer, PersonInfoViewObject> personsMap) {
  List<YContributor> contributors = new ArrayList<>();
  for (Map.Entry<Integer, PersonInfoViewObject> entry : personsMap.entrySet()) {
    PersonInfoViewObject personViewObject = entry.getValue();
    YContributor author = new YContributor(YConstants.CR_AUTHOR, false);
    author.setNames(extractPersonYNames(personViewObject));
    final List<String> affiliationNames = personViewObject.getAffiliations();
    Boolean isCorrespondingAuthor = personViewObject.getCorrespondingAuthor();
    boolean addCorrespondenceAff = isCorrespondingAuthor != null ? isCorrespondingAuthor : false;
    if (CollectionUtils.isNotEmpty(affiliationNames)) {
      for (String affiliationName : affiliationNames) {
        if (StringUtils.isNotBlank(affiliationName)) {
          final String affiliationId = UUID.randomUUID().toString();
          YAffiliation affiliation = new YAffiliation(affiliationId, affiliationName);
          author.addAffiliationRef(affiliationId);
          article.addAffiliation(affiliation);
          if (addCorrespondenceAff) {
            author.addAttribute(CommonAttributeTypes.AT_CORRESPONDENCE, affiliationName);
            addCorrespondenceAff = false;
          }
        }
      }
    }
    author.addAttribute(extractEmailAttributes(personViewObject));
    contributors.add(author);
  }
  article.setContributors(contributors);
  return this;
}

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

YAffiliation yaf = new YAffiliation();
yaf.setId(af.getXmlId());
String orgName = StringUtils.EMPTY;

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

String affid = affPref + num;
        num++;
        YAffiliation aff = new YAffiliation(affid, inName.getName());
        article.addAffiliation(aff);
        nameAffID.put(inName.getName(), affid);
YAffiliation aff = new YAffiliation(it.getId(), it.getName());
article.addAffiliation(aff);

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

contributor.getAffiliationRefs().add(affiliationRef);
if (element.getAffiliation(affiliationRef) == null) {
  YAffiliation yAffiliation = new YAffiliation(affiliationRef, affiliation);
  element.addAffiliation(yAffiliation);

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

for(String aff:affiliations){
  t=t+1;
  article.addAffiliation(new YAffiliation()
  .setText(aff)
  .setId("aff"+t));

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