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

x33g5p2x  于2022-02-05 转载在 其他  
字(9.6k)|赞(0)|评价(0)|浏览(133)

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

YElement.addContributor介绍

暂无

代码示例

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

YName ynam = new YName(nam);
c.addName(ynam);
article.addContributor(c);

代码示例来源: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.bwmeta/bwmeta-2-foreign-transformers

public void updateProvider(org.jdom.Element ameta, YElement element) {
  List<org.jdom.Element> cs = extractProvider(ameta);
  for (org.jdom.Element c : cs) {
    String providerName = JDOMHelper.getChildTextTrim(c, "meta-value");
    if (JDOMHelper.getChildTextTrim(c, "meta-name").equalsIgnoreCase("provider") && JDOMHelper.toNull(providerName) != null) {
      element.addContributor(
          new YContributor(ContributorRoles.CR_REPOSITORY, true).addName(y.canonicalName(YLanguage.NoLinguisticContent, providerName)));
    }
  }
}

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

/**
 * Processes <code>journal-meta</code> metadata creating a publisher element.
 *
 * @param jmeta the metadata element to extract publisher info from
 * @return the created publisher element
 */
private YElement processPublisher(Element jmeta) {
  YName pname = y.canonicalName(YLanguage.Undetermined, getTextTrim(optDescendant(jmeta, "publisher", "publisher-name")));
  // TODO: add publisher-loc
  return y.element(HierarchyWithLevelIds.EXT_LEVEL_JOURNAL_PUBLISHER, pname, ROOT).addContributor(new YContributor(ContributorRoles.CR_PUBLISHER, true).addName(pname));
}

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

/**
 * Processes <code>journal-meta</code> metadata creating a publisher element.
 *
 * @param jmeta the metadata element to extract publisher info from
 * @return the created publisher element
 */
private YElement processPublisher(org.jdom.Element jmeta) {
  YName pname = y.canonicalName(YLanguage.Undetermined, getTextTrim(optDescendant(jmeta, "publisher", "publisher-name")));
  // TODO: add publisher-loc
  return y.element(EXT_LEVEL_JOURNAL_PUBLISHER, pname, ROOT).addContributor(new YContributor(CR_PUBLISHER, true).addName(pname));
}

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

/**
 * Processes <code>journal-meta</code> metadata creating a publisher
 * element.
 * 
 * @param jmeta
 *            the metadata element to extract publisher info from
 * @return the created publisher element
 */
private YElement processPublisher(org.jdom.Element jmeta,List<YExportable> list, boolean addPublisher) {
  YName pname = y.canonicalName(YLanguage.Undetermined,
      JDOMHelper.getTextTrim(JDOMHelper.optDescendant(jmeta, "publisher", "publisher-name")));
  // TODO: add publisher-localization
  
  String id=getIdGenerator().getPublisherId(pname.getText());
  YInstitution inst=new YInstitution();
  String instId=IdPrefixes.EXT_PREFIX_INSTITUTION+idgen.generateIdSuffix((pname.getText().toLowerCase().replaceAll("\\s", " ").replaceAll(" +", " ").trim()));
  inst.setId(instId);
  inst.addName(pname);
  if (addPublisher) {
    list.add(inst);
  }
  return factory.element(EXT_LEVEL_JOURNAL_PUBLISHER, pname, ROOT ,id).addContributor(
      new YContributor(CR_PUBLISHER, true).addName(pname).setIdentity(instId));
}

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

YElement publisher = y.element(EXT_LEVEL_JOURNAL_PUBLISHER, pname, ROOT).addContributor(new YContributor(CR_PUBLISHER, true).addName(pname));
  root.addContributor(temp);

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

yelement.addContributor(ycontributor);

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

@Override
  public void parseMetadata(YElement element, PublicationMeta pm, YLanguage defaultLanguage, List<YElement> ancestors) {
    PublisherInfo pi = pm.getPublisherInfo();
    if (pi != null) {
      String nam = pi.getPublisherName() != null ? pi.getPublisherName().getvalue() : null;
      if (StringUtils.isNotBlank(nam)) {
        YContributor cont = new YContributor(ContributorRoles.CR_PUBLISHER, true);
        cont.addName(new YName(nam));
        PublisherLoc location = pi.getPublisherLoc();
        if (location != null) {
          if (StringUtils.isNotBlank(location.getvalue())) {
            cont.addAttribute(CommonAttributeTypes.AT_ADDRESS_STREET, location.getvalue());
          }
        }
        element.addContributor(cont);
      }
    }
  }
}

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

journal.addContributor(new YContributor(ContributorRoles.CR_PUBLISHER, true).addName(pname));
return journal;

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

public void updateElementPublisher(org.jdom.Element jmeta, YElement journal) {
  YName pname = y.canonicalName(YLanguage.Undetermined,
      JDOMHelper.getTextTrim(JDOMHelper.optDescendant(jmeta, "publisher", "publisher-name")));
  String loc = JDOMHelper.getTextTrim(JDOMHelper.optDescendant(jmeta, "publisher", "publisher-loc"));
  journal.addContributor(new YContributor(ContributorRoles.CR_PUBLISHER, true).addName(pname).addAttribute(NlmToYConstants.AT_PUBLISHER_LOCATION, loc));
}

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

cont.addAffiliationRef(a);
  article.addContributor(cont).addAffiliation(y.affiliation(aref, address));
} else {
  YContributor cont=new YContributor(ContributorRoles.CR_OTHER, false)
    cont.addAffiliationRef(a);
  article.addContributor(cont).addAffiliation(y.affiliation(aref, address));

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

/**
 * Processes <code>journal-meta</code> metadata creating a journal element.
 *
 * @param jmeta the metadata element to extract journal info from
 * @param parent parent element for the created element
 * @return the created journal element
 */
private YElement processJournal(org.jdom.Element jmeta, YElement parent) {
  org.jdom.Element jtitles = jmeta.getChild("journal-title-group");
  List<org.jdom.Element> aids = jmeta.getChildren("journal-id");
  YElement journal = y.element(EXT_LEVEL_JOURNAL_JOURNAL,
      y.canonicalName(YLanguage.Undetermined, jtitles.getChildTextTrim("journal-title")),
      parent).addName(y.name(YLanguage.Undetermined, jtitles.getChildTextTrim("abbrev-journal-title"), NM_ABBREVIATION)).addId(y.id(EXT_SCHEME_ISSN, jmeta.getChildTextTrim("issn")));
  for (org.jdom.Element aid : aids) {
    if ("eudml-id".equalsIgnoreCase(aid.getAttributeValue("journal-id-type"))) {
      journal.addId(new YId(YConstants.EXT_SCHEMA_EUDML, aid.getText()));
    } else {
      journal.addId(new YId("bwmeta1.id-class." + aid.getAttributeValue("journal-id-type"), aid.getText()));
    }
  }
  YName pname = y.canonicalName(YLanguage.Undetermined, getTextTrim(optDescendant(jmeta, "publisher", "publisher-name")));
  journal.addContributor(new YContributor(CR_PUBLISHER, true).addName(pname));
  return journal;
}

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

cont.addName(y.name(YLanguage.NoLinguisticContent, forenames, NM_FORENAMES));
  article.addContributor(
      cont.addAttribute(CommonAttributeTypes.AT_CONTACT_EMAIL, toNull(getTextTrim(optDescendant(c, "email")))).addAffiliationRef(aref)).addAffiliation(y.affiliation(aref, address));
} else {
    cont.addName(y.name(YLanguage.NoLinguisticContent, forenames, NameTypes.NM_FORENAMES));
   article.addContributor(
      cont.addAttribute(CommonAttributeTypes.AT_CONTACT_EMAIL, toNull(getTextTrim(optDescendant(c, "email")))).addAffiliationRef(aref)).addAffiliation(y.affiliation(aref, address));

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

article.addContributor(
      new YContributor(ctValue, false).addName(y.canonicalName(YLanguage.NoLinguisticContent, canonicalName)).addName(y.name(YLanguage.NoLinguisticContent, surname, NM_SURNAME)).addName(y.name(YLanguage.NoLinguisticContent, forenames, NM_FORENAMES)).addAttribute(AT_CONTACT_EMAIL, toNull(getTextTrim(optDescendant(c, "email")))).addAffiliationRef(aref)).addAffiliation(y.affiliation(aref, address));
} else {
  article.addContributor(
      new YContributor(YConstants.CR_OTHER, false).addName(y.canonicalName(YLanguage.NoLinguisticContent, canonicalName)).addName(y.name(YLanguage.NoLinguisticContent, surname, NM_SURNAME)).addName(y.name(YLanguage.NoLinguisticContent, forenames, NM_FORENAMES)).addAttribute(AT_CONTACT_EMAIL, toNull(getTextTrim(optDescendant(c, "email")))).addAffiliationRef(aref)).addAffiliation(y.affiliation(aref, address));

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

article.addContributor(ycont);

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

for (ResourceContributor contributor: contributors.getValue()) {
  if (contributor.isValidContributor()){
    yElement.addContributor(transformResourceContributorToYContributor(contributors.getKey(), contributor));

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

addNotNullAttribute(contributor, JatsSpecificAttributeTypes.AT_MEDLINE_VALID, Boolean.toString(aut.isValid()));
article.addContributor(contributor);

相关文章