gpt4 book ai didi

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

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

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

YTagList.setLanguage介绍

暂无

代码示例

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

private YTagList getTaglist(YLanguage yLanguage, Map<YLanguage, YTagList> tags) {
  if(tags.containsKey(yLanguage)){
    return tags.get(yLanguage);
  }
  YTagList tagList = new YTagList();
  tagList.setLanguage(yLanguage);
  tagList.setType(TagTypes.TG_KEYWORD);
  tags.put(yLanguage, tagList);
  return tagList;
}

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

protected void fillRights(YElement yElement, List<YExportable> referedElements, Map<String, List<StringWithAttributes>> ret) {
  //copyrigths
  //rights
  if (yElement.getOneAttributeSimpleValue(CommonAttributeTypes.AT_COPYRIGHT_HOLDER) != null) {
    if (!ret.containsKey(E_RIGHTS)) {
      ret.put(E_RIGHTS, new ArrayList<StringWithAttributes>());
    }
    ret.get(E_RIGHTS).add(new StringWithAttributes(yElement.getOneAttributeSimpleValue(CommonAttributeTypes.AT_COPYRIGHT_HOLDER)));
  }
  //From synat;) 
  YTagList licenses = yElement.getTagList("License");
  if (licenses != null) {
    for (String licenseText : licenses.getValues()) {
      if (!ret.containsKey(E_RIGHTS)) {
        ret.put(E_RIGHTS, new ArrayList<StringWithAttributes>());
      }
      StringWithAttributes swa = new StringWithAttributes(licenseText);
      if (licenses.setLanguage(YLanguage.Sandawe) != null && StringUtils.isNotBlank(licenses.getLanguage().getShortCode())) {
        swa.addAttribute("lang", licenses.getLanguage().getShortCode());
      }
      ret.get(E_RIGHTS).add(swa);
    }
  }
}

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

private void updateKeywords(YElement article, org.jdom.Element kg) {
  YTagList kwds = new YTagList(YLanguage.English, TagTypes.TG_KEYWORD);
  List<org.jdom.Element> ks = JDOMHelper.getChildren(kg, "kwd");
  for (org.jdom.Element k : ks) {
    kwds.addValue(JDOMHelper.textOfElement(k));
  }
  Attribute kwdLang = kg.getAttribute("lang", Namespace.XML_NAMESPACE);
  YLanguage lang = extractYLanguage(kwdLang);
  if (lang != null) {
    kwds.setLanguage(lang);
  }
  if (kwds.size() > 0) {
    // System.out.println("[NlmToYTransformer] Adding keywords");
    article.addTagList(kwds);
  }
}

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