gpt4 book ai didi

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

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

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

YContributor.getOneAttribute介绍

暂无

代码示例

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

private static String legacyPersonAttribute(final YContributor contributor, final String legacyAttribute) {
  final AbstractA<?> person = contributor.getOneAttribute(AT_CONTRIBUTOR_PERSON);
  String result = attributeValue(person, legacyAttribute);
  // ContributorUtil does it but standard transformers do not
  // this is problem - e.g. a lot of psjd articles have legacy attribute
  // directly
  // under contributor, not under person attribute of contributor
  if (StringUtils.isEmpty(result)) {
    result = attributeValue(contributor, legacyAttribute);
  }
  return StringUtils.defaultString(result);
}

代码示例来源: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/yaddaweb-lite-core

protected List<String> resolveAddresses(final YContributor contributor, final IFilteringContext filteringContext) {
  final List<String> addresses = new LinkedList<String>();
  if (contributor.isInstitution()) {
    final YAttribute institution = contributor.getOneAttribute(YConstants.AT_INSTITUTION);
    if (institution != null) {
      for (final YAttribute address : institution.getAttributes(YConstants.AT_INSTITUTION_ADDRESS)) {
        addresses.add(detailsFilter.filter(address.getValue(), InputType.RICH_TEXT, filteringContext));
      }
    }
  }
  return addresses;
}

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

/**
 * Creates PublisherData using YElement
 *
 * @param yElement
 *            metadata element used to create object
 */
public PublisherData createPublisherData(YContributor contributor) {
  PublisherData pd = new PublisherData();
  populateBaseProperties(contributor, pd);
  if (contributor.getOneAttribute(CommonAttributeTypes.AT_CONTACT_URL) != null) {
    pd.setUrl(contributor.getOneAttribute(CommonAttributeTypes.AT_CONTACT_URL).getValue());
  }
  final String email = contributor.getOneAttributeSimpleValue(CommonAttributeTypes.AT_CONTACT_EMAIL);
  if (StringUtils.isNotBlank(email)) {
    pd.setEmail(email);
  }
  return pd;
}

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

bibEntry.setField(BibEntry.FIELD_PUBLISHER, yPublisherList.get(0).getOneName(YConstants.NM_CANONICAL).getText());
if (yPublisherList.get(0).getOneAttribute(YConstants.AT_ADDRESS_CITY) != null) {
  String address = yPublisherList.get(0).getOneAttribute(YConstants.AT_ADDRESS_CITY).getValue();
  bibEntry.setField(BibEntry.FIELD_ADDRESS, address);

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

public EditorialOfficeInfo getEditorialOfficeInfo(AbstractElementInfo<?> abstractElementInfo) {
  List<YContributor> contributors = abstractElementInfo.getContributors();
  if (contributors != null) {
    for (YContributor contributor : contributors) {
      if (contributor.isInstitution() &&
          ContributorConstants.ROLE_EDITORIAL_OFFICE.equals(contributor.getRole())) {
        YAttribute institution = contributor.getOneAttribute(YConstants.AT_INSTITUTION);
        if (institution != null) {
          String email = elementAttributesExtractor.getInstitutionEmail(institution);
          String www = elementAttributesExtractor.getInstitutionWWW(institution);
          return new EditorialOfficeInfo(email, www);
        }
      }
    }
  }
  return null;
}

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

String foreNames = YModelUtils.getNameByType(cont, NameTypes.NM_FORENAMES);
canonical.add(foreNames);
YAttribute fmPrefix = cont.getOneAttribute(WileyComponentConstants.WILEY_ATT_FAMILY_NAME_PREFIX);
if (fmPrefix != null) {
  canonical.add(fmPrefix.getValue());

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