gpt4 book ai didi

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

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

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

YElement.addLanguage介绍

暂无

代码示例

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

private YElement prepareYElement(String id, Properties prop) {
  YElement yElement = new YElement();
  yElement.setId(id);
  if (!prop.getProperty("title").isEmpty()) {
    yElement.addName(new YName(prepareProperty("title", prop)));
  }
  
  yElement.addDescription(new YDescription(YLanguage.Undetermined, prepareProperty("description", prop), DescriptionTypes.DS_SUMMARY));
  
  if (!prop.getProperty("key-words").isEmpty()) {
    List<String> tags = new ArrayList<String>(Arrays.asList(prepareProperty("key-words", prop).split(",")));
    yElement.addTagList(new YTagList().setType(TagTypes.TG_KEYWORD).setValues(tags));
  }
  
  if (!prop.getProperty("supplier").isEmpty()) {
    yElement.addAttribute("copyright-holder", prepareProperty("supplier", prop));
  }
  
  if (!prop.getProperty("duration").isEmpty()) {
    yElement.addAttribute("duration", prepareProperty("duration", prop));
  }
  yElement.addLanguage(YLanguage.Undetermined);
  
  return yElement;
}

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

@Override
public YElement process(Book book, YElement parent, CrossrefIdGenerator generator) {
  BookSeriesMetadata bookSeriesMetadata = book.getBookSeriesMetadata();
  YElement element = new YElement();
  if (StringUtils.isNotBlank(bookSeriesMetadata.getLanguage())) {
    element.addLanguage(YLanguage.byCode(bookSeriesMetadata.getLanguage()));
  }
  SeriesMetadata seriesMetadata = bookSeriesMetadata.getSeriesMetadata();
  extractSeriesMetadata(parent, generator, element, seriesMetadata);
  return element;
}

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

@Override
public YElement process(Book book, YElement parent, CrossrefIdGenerator generator) {
  BookSetMetadata bookSetMetadata = book.getBookSetMetadata();
  YElement element = new YElement();
  SetMetadata setMetadata = bookSetMetadata.getSetMetadata();
  List<YName> setNames = convertTitles(setMetadata.getTitles());
  element.getIds().addAll(convertIsbns(setMetadata.getIsbns()));
  element.getNames().addAll(setNames);
  String id = generator.generateBookSetId(element.getFirstIdOrNullIfAny(IdSchemaIds.EXT_SCHEME_ISBN), getDefaultName(element));
  element.setId(id);
  element.addStructure(buildStructureFromParent(parent, HierarchyWithLevelIds.EXT_HIERARCHY_BOOK, HierarchyWithLevelIds.EXT_LEVEL_BOOK_SERIES));
  if (StringUtils.isNotBlank(bookSetMetadata.getLanguage())) {
    element.addLanguage(YLanguage.byCode(bookSetMetadata.getLanguage()));
  }
  return element;
}

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

parent).addDescription(y.description(getYLang(aabstract), textOfElement(aabstract), DescriptionTypes.DS_ABSTRACT)).addLanguage(getYLang(ameta));

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

parent).addDescription(y.description(getYLang(aabstract), textOfElement(aabstract), DS_ABSTRACT)).addLanguage(getYLang(ameta));

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

article.addLanguage(YLanguage.byCode(at.getLanguage().value()));

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

yElement.addLanguage(resource.getLanguage().getyLanguage());

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

/**
 * Mbook is eudml only so we expect to have eudml id 
 * @param mbmeta nlm book element 
 * @param hierarchy hierachy to set 
 * @param level to set
 * @param idGenerator - generator for ids
 * @return generated yelement
 */
public YElement processMBookElement(Element mbmeta, String hierarchy, String level, NlmIdGenerator idGenerator) {
  org.jdom.Element btitles = JDOMHelper.optDescendant(mbmeta, "book-title-group");
  org.jdom.Element btitle = JDOMHelper.optDescendant(btitles, "book-title");
  YName mbookName = y.canonicalName(JDOMHelper.getYLang(btitle),
      JDOMHelper.textOfElement(btitle));
  Element mbookId = JDOMHelper.getChildWithGivenAttributeValue(mbmeta, "book-id", "pub-id-type", "eudml-id");
  String eudmlId=mbookId==null?null:mbookId.getValue();
  String id= idGenerator.getMbookId(eudmlId);
  YElement mbook = factory.element(hierarchy, level, mbookName, ROOT, id).addLanguage(JDOMHelper.getYLang(mbmeta));
  
  updater.updateElementIds(mbmeta, mbook, "book-id"); //bwmeta??
  updater.updateElementAuthors(mbmeta, mbook); // contributors
  updater.updateElementPubdate(mbmeta, mbook);
  updater.updateElementContentLinks(mbmeta, mbook);
  updater.updateProvider(mbmeta, mbook);
  updater.updateElementPublisher(mbmeta, mbook);
  return mbook;
}

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

private YElement initArticleinBookElement(org.jdom.Element ameta, YElement parent, NlmIdGenerator idGenerator) {
  org.jdom.Element atitles = JDOMHelper.optDescendant(ameta, "title-group");
  org.jdom.Element atitle = JDOMHelper.optDescendant(atitles, "article-title");
  org.jdom.Element aabstract = JDOMHelper.getChild(ameta, "abstract");
  Element articleId = JDOMHelper.getChildWithGivenAttributeValue(ameta, "article-id", "pub-id-type", "eudml-id");
  String eudmlId=articleId==null?null:articleId.getValue();
  String id=idGenerator.getBookArticleId(eudmlId);
  YElement article = factory.element(NlmToYConstants.EXT_HIERARCHY_MBOOK_ARTICLE, NlmToYConstants.EXT_LEVEL_MBOOK_ARTICLE_ARTICLE,
                    y.canonicalName(JDOMHelper.getYLang(atitle), JDOMHelper.textOfElement(atitle)),
                    parent, id)
               .addDescription(y.description(JDOMHelper.getYLang(aabstract),
                       JDOMHelper.textOfElement(aabstract), DescriptionTypes.DS_ABSTRACT))
               .addLanguage(JDOMHelper.getYLang(ameta));
  List<org.jdom.Element> trs = JDOMHelper.optChildren(atitles, "trans-title-group");
  for (org.jdom.Element tr : trs) {
    article.addName(y.name(JDOMHelper.getYLang(tr), JDOMHelper.textOfElement(JDOMHelper.getChild(tr, "trans-title")), NameTypes.NM_ALTERNATIVE));
  }
  
  return article;
}

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

String id=idGenerator.getBookId(isbn, eudmlId);
YElement book = factory.element(hierarchy, level, bookName, parent, id)
            .addLanguage(JDOMHelper.getYLang(bmeta));
    JDOMHelper.textOfElement(babstract), DescriptionTypes.DS_ABSTRACT)).addLanguage(JDOMHelper.getYLang(bmeta));

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

article.addDescription(y.description(JDOMHelper.getYLang(aabstract), JDOMHelper.textOfElement(aabstract), DS_ABSTRACT));
article.addLanguage(JDOMHelper.getYLang(ameta));

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

article.addLanguage(YLanguage.byCode(xmc.getArticle().getLanguage()));

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

YLanguage language = YLanguage.byCode(sLang);
if (language != null) {
  yElement.addLanguage(language);

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