gpt4 book ai didi

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

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

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

YAncestor.getIds介绍

暂无

代码示例

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

private String getId(YAncestor ancestor, String scheme) {
  for (String eissn : ancestor.getIds(scheme)) {
    return eissn;
  }
  return null;
}

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

private String extracjIssnsFromArticle(List<YElement> yelements) {
  //System.out.println("[extracjIssnsFromArticle]");
  List<YElement> articles = YElementsParsingToolbox.filterYElementsOfStructureLevel(yelements,
      YConstants.EXT_LEVEL_JOURNAL_ARTICLE);
  if (articles.size() == 0) {
    return null;
  }
  if (articles.size() > 1) {
    log.error("More than one articles found in package of yelements!");
  }
  YElement article = articles.get(0);
  YStructure struct = article.getStructure(YConstants.EXT_HIERARCHY_JOURNAL);
  if (struct == null) {
    return null;
  }
  YAncestor ancest = struct.getAncestor(YConstants.EXT_LEVEL_JOURNAL_JOURNAL);
  if (ancest == null) {
    return null;
  }
  String issnsStr = extractIssnsStr(ancest.getIds());
  return issnsStr;
}

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

public static void copyDataToAncestor(YElement ele, YAncestor anc) {
  anc.getNames().addAll(ele.getNames());
  anc.getIds().addAll(ele.getIds());
  anc.getDates().addAll(ele.getDates());
  anc.setIdentity(ele.getId());
}

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

protected YStructure buildStructureFromParent(YElement parent, String hierarchy, String currentLevel) {
  YStructure structure = new YStructure(hierarchy);
  YCurrent current = new YCurrent(currentLevel);
  structure.setCurrent(current);
  if (parent != null) {
    YStructure parentStructure = parent.getStructure(hierarchy);
    structure.getAncestors().addAll(parentStructure.getAncestors());
    YAncestor ancestor = new YAncestor(parentStructure.getCurrent().getLevel(), parent.getId());
    ancestor.getNames().addAll(parent.getNames());
    ancestor.getIds().addAll(parent.getIds());
    structure.addAncestor(ancestor);
  }
  return structure;
}

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

protected void fillIdentifiers(HtmlMetaHeaders metadata, YElement yElement) {
  YStructure yStructure = yElement.getStructure(YaddaIdConstants.ID_HIERARACHY_JOURNAL);
  if (yStructure != null) {
    YAncestor yAncestor = yStructure.getAncestor(YaddaIdConstants.ID_LEVEL_JOURNAL_JOURNAL);
    if (yAncestor != null) {
      for (YId journalYId : yAncestor.getIds()) {
        if (YaddaIdConstants.IDENTIFIER_CLASS_ISSN.equals(journalYId.getScheme())) {
          metadata.addMetadataName(DC_NAMESPACE + SEPARATOR + DublinCoreStrings.E_IDENTIFIER, "ISSN " + journalYId.getValue());
        }
      }
    }
  }
  for (YId yId : yElement.getIds()) {
    if (IdSchemaIds.EXT_SCHEME_DOI.equals(yId.getScheme())) {
      metadata.addMetadataName(DC_NAMESPACE + SEPARATOR + DublinCoreStrings.E_IDENTIFIER, "DOI " + yId.getValue());
    } else if (IdSchemaIds.EXT_SCHEME_ISBN.equals(yId.getScheme())) {
      metadata.addMetadataName(DC_NAMESPACE + SEPARATOR + DublinCoreStrings.E_IDENTIFIER, "ISBN " + yId.getValue());
    } else {
      metadata.addMetadataName(DC_NAMESPACE + SEPARATOR + DublinCoreStrings.E_IDENTIFIER, yId.getValue());
    }
  }
}

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