gpt4 book ai didi

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

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

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

YContributor.getOneName介绍

暂无

代码示例

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

private String getContributorFirstName(final YContributor cont) {
  if (cont.getOneName(YConstants.NM_FORENAMES) != null) {
    return cont.getOneName(YConstants.NM_FORENAMES).getText();
  }
  final YAttribute person = cont.getOneAttribute(YConstants.AT_CONTRIBUTOR_PERSON);
  if (person != null) {
    return person.getOneAttributeSimpleValue(YConstants.AT_CONTRIBUTOR_PERSON_FIRSTNAME);
  } else {
    return cont.getOneAttributeSimpleValue(YConstants.AT_CONTRIBUTOR_PERSON_FIRSTNAME);
  }
}

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

private String getContributorLastName(final YContributor cont) {
  if (cont.getOneName(YConstants.NM_SURNAME) != null) {
    return cont.getOneName(YConstants.NM_SURNAME).getText();
  }
  final YAttribute person = cont.getOneAttribute(YConstants.AT_CONTRIBUTOR_PERSON);
  if (person != null) {
    return person.getOneAttributeSimpleValue(YConstants.AT_CONTRIBUTOR_PERSON_LASTNAME);
  } else {
    return cont.getOneAttributeSimpleValue(YConstants.AT_CONTRIBUTOR_PERSON_LASTNAME);
  }
}

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

@SuppressWarnings("deprecation")
public static void updateYRelationWithZblContributor(YRelation relye, YContributor c) {
  YAttribute ya = null;
  if (c.getOneName("canonical") != null)
    ya = new YAttribute(YConstants.AT_REFERENCE_PARSED_AUTHOR, c.getOneName("canonical").getText().toString());
  if (c.getAttributes(YConstants.AT_ZBL_AUTHOR_FINGERPRINT).size() > 0)
    ya.addAttribute(YConstants.AT_ZBL_AUTHOR_FINGERPRINT, c.getAttributes(YConstants.AT_ZBL_AUTHOR_FINGERPRINT)
        .get(0).getValue());
  if (c.getOneName("forenames") != null)
    ya.addAttribute(YConstants.AT_REFERENCE_PARSED_AUTHOR_FORENAMES, c.getOneName("forenames").getText()
        .toString());
  ya.addAttribute(YConstants.AT_REFERENCE_PARSED_AUTHOR_SURNAME, c.getOneName("surname").getText().toString());
  relye.addAttribute(ya);
}

代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core

private String prepareTitle(YContributor yContr, ContributorInfo contrInfo) {
  String title = "";
  if (doHighlight) {
    // values in index go through ContribInfoBuilder formatting
    // highlighted expected only when value from index equals value from
    // catalog
    YName highlightName = yContr.getOneName(HighlightUtils.Y_TYPE_HIGHLIGHTED);
    if (highlightName != null) {
      title = highlightName.getText();
    }
  }
  if (title.length() == 0) {
    // get value from catalog formatted by ContribInfoBuilder
    title = contrInfo.getText();
  }
  if ("_".equals(title)) {
    title = "";
  }
  return title;
}

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

public static List<PersonData> resolveElementContributors(YElement element, String type) {
  List<PersonData> people = new ArrayList<PersonData>();
  Map<String, FilteredString> affiliations = processAffiliations(element);
  for (YContributor contributor : element.getContributors()) {
    if (type.equals(contributor.getRole()) && contributor.getOneName() != null) {
      people.add(parseContributor(contributor, element.getId(), affiliations));
    }
  }
  return people;
}

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

if (yContributor.getOneName(YConstants.NM_SURNAME) != null) {
  isSurname = true;
  fullName.append(yContributor.getOneName(YConstants.NM_SURNAME).getText());
  if (yContributor.getOneName(YConstants.NM_FORENAMES) != null) {
    isForename = true;
    String forenames = yContributor.getOneName(YConstants.NM_FORENAMES).getText();
    String[] forenameList = forenames.split(" ");
    if (forenameList.length > 0) {
if (yContributor.getOneName(YConstants.NM_SUFFIX) != null) {
  if (isSurname || isForename) {
    fullName.append(", ");
  String suffix = yContributor.getOneName(YConstants.NM_SUFFIX).getText();
  fullName.append(suffix);

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

public static List<PersonData> resolveAllElementContributors(YElement element) {
  List<PersonData> people = new ArrayList<PersonData>();
  Map<String, FilteredString> affiliations = processAffiliations(element);
  for (YContributor contributor : element.getContributors()) {
    if (!ContributorRoles.CR_PUBLISHER.equals(contributor.getRole()) && contributor.getOneName() != null) {
      people.add(parseContributor(contributor, element.getId(), affiliations));
    }
  }
  return people;
}

代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core

private static void replaceAthorsCoauthorsField(final YElement yElement, final String[] values) {
  for (final String value : values) {
    if (value != null && value.length() > 0) {
      final String rawValue = unhighlight(value);
      for (final YContributor cont : yElement.getContributors()) {
        final YName name = cont.getOneName();
        if (name != null && (rawValue.equals(name.getText()))) {
          final YName hlName = new YName(value);
          hlName.setType(Y_TYPE_HIGHLIGHTED);
          cont.getNames().add(hlName);
        }
      }
    }
  }
}

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

public void updateArticleInBookWithBookMeta(Element bmeta, final YElement article) {
  
  YDate date = article.getDate(DateTypes.DT_PUBLISHED);
  if (date == null) {
    updater.updateElementPubdate(bmeta, article);
  }
  
  boolean noPublisher = true;
  List<YContributor> yContributorList  = article.getContributors();
  List<YContributor> yPublisherList = new ArrayList<YContributor>();
   for (YContributor yContributor : yContributorList) {
     if (yContributor.getRole().equals(ContributorRoles.CR_PUBLISHER)) {
       yPublisherList.add(yContributor);
     }
   }
   if (!yPublisherList.isEmpty()) {
     String publisher = yPublisherList.get(0).getOneName(NameTypes.NM_CANONICAL).getText();
     String location = yPublisherList.get(0).getOneAttributeSimpleValue(NlmToYConstants.AT_PUBLISHER_LOCATION);
     if (publisher != null && location != null) {
       noPublisher = false;
     }
   }
   if (noPublisher) {
     updater.updateElementPublisher(bmeta, article);
   }
}

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

requestedUserId = userProfile.getId();
} catch (UserNotFoundException e) {
  YName yForeName = contributor.getOneName(NameTypes.NM_FORENAMES);
  String foreName = StringUtils.EMPTY;
  String surname = StringUtils.EMPTY;
    foreName = yForeName.getText();
  } else {
    yForeName = contributor.getOneName(NameTypes.NM_FORENAME);
    foreName = yForeName == null ? name : yForeName.getText();
  YName ySurname = contributor.getOneName(NameTypes.NM_SURNAME);
  if (ySurname != null) {
    surname = ySurname.getText();

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

bibEntry.setField(BibEntry.FIELD_PUBLISHER, yPublisherList.get(0).getOneName(YConstants.NM_CANONICAL).getText());

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

public ContributorInfo prepareContributorInfo(final YContributor cont, final boolean flatten) {
  final YName forenames = cont.getOneName(YConstants.NM_FORENAMES);
  final YName surname = cont.getOneName(YConstants.NM_SURNAME);
  final String firstName = forenames == null ? null : toText(forenames.getRichText(), flatten);
  final String lastName = surname == null ? null : toText(surname.getRichText(), flatten);
  final String text = cont.getDefaultName() == null ? null : toText(cont.getDefaultName().getRichText(), flatten);
  final String role = cont.getRole();
  final CONTRIBUTOR_TYPE type = detectContributorType(cont);
  return prepareContributorInfo(firstName, lastName, text, role, type);
}

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

if(sname!=null && zblc.getOneName("surname")!=null && sname.equals(zblc.getOneName("surname").getText())){
  if(zblc.getOneName("forenames").getText().split(" ").length >fname.split(" ").length){
    fname = zblc.getOneName("forenames").getText();
    YName fn = new YName(fname);
    fn.setType("forenames");

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

if(sname!=null && zblc.getOneName("surname")!=null && sname.equals(zblc.getOneName("surname").getText())){
  if(zblc.getOneName("forenames").getText().split(" ").length >fname.split(" ").length){
    fname = zblc.getOneName("forenames").getText();
    YName fn = new YName(fname);
    fn.setType("forenames");

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

if (sname != null && zblc.getOneName("surname") != null
    && sname.equals(zblc.getOneName("surname").getText())) {
  for (YAttribute a : zblc.getAttributes(YConstants.AT_ZBL_AUTHOR_FINGERPRINT)) {
    nc.addAttribute(a);

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

if(c.getOneName("canonical")!=null)
  ya = new YAttribute(YConstants.AT_REFERENCE_PARSED_AUTHOR,c.getOneName("canonical").getText().toString());
if(c.getAttributes(YConstants.AT_ZBL_AUTHOR_FINGERPRINT).size()>0)
  ya.addAttribute(YConstants.AT_ZBL_AUTHOR_FINGERPRINT , c.getAttributes(YConstants.AT_ZBL_AUTHOR_FINGERPRINT).get(0).getValue());
if(c.getOneName("forenames")!=null)
  ya.addAttribute(YConstants.AT_REFERENCE_PARSED_AUTHOR_FORENAMES , c.getOneName("forenames").getText().toString() );
ya.addAttribute(YConstants.AT_REFERENCE_PARSED_AUTHOR_SURNAME , c.getOneName("surname").getText().toString() );
relye.addAttribute(ya);

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

if(c.getOneName("canonical")!=null)
  ya = new YAttribute(YConstants.AT_REFERENCE_PARSED_AUTHOR,c.getOneName("canonical").getText().toString());
if(c.getAttributes(YConstants.AT_ZBL_AUTHOR_FINGERPRINT).size()>0)
  ya.addAttribute(YConstants.AT_ZBL_AUTHOR_FINGERPRINT , c.getAttributes(YConstants.AT_ZBL_AUTHOR_FINGERPRINT).get(0).getValue());
if(c.getOneName("forenames")!=null)
  ya.addAttribute(YConstants.AT_REFERENCE_PARSED_AUTHOR_FORENAMES , c.getOneName("forenames").getText().toString() );
ya.addAttribute(YConstants.AT_REFERENCE_PARSED_AUTHOR_SURNAME , c.getOneName("surname").getText().toString() );
relye.addAttribute(ya);

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

final List<YContributor> yContributors = yElement.getContributors();
for (final YContributor yContributor : yContributors) {
  final YName surname = yContributor.getOneName(YConstants.NM_SURNAME);
  final YName givennames = yContributor.getOneName(YConstants.NM_FORENAMES);

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

List<YContributor> yContributors = yElement.getContributors();
for (YContributor yContributor : yContributors) {
  YName surname = yContributor.getOneName(YConstants.NM_SURNAME);
  YName givennames = yContributor.getOneName(YConstants.NM_FORENAMES);

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