gpt4 book ai didi

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

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

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

YElement.getLanguages介绍

暂无

代码示例

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

@Override
public List<LanguageData> prepareLanguage(YElement yElement, Locale locale) {
  List<LanguageData> result = new ArrayList<LanguageData>();
  for (YLanguage language : yElement.getLanguages()) {
    result.add(makeLanguageData(language, locale));
  }
  return result;
}

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

protected void fillLanguages(YElement yElement, List<YExportable> referedElements, Map<String, List<StringWithAttributes>> ret) {
  //        language element
  if (!yElement.getLanguages().isEmpty()) {
    ret.put(E_LANGUAGE, new ArrayList<StringWithAttributes>());
  }
  for (YLanguage yLanguage : yElement.getLanguages()) {
    ret.get(E_LANGUAGE).add(new StringWithAttributes(yLanguage.getName()));
  }
}

代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core

protected String prepareLanguages(YElement element) {
  StringBuilder langs = new StringBuilder();
  boolean wasFirst = false;
  for (YLanguage lang : element.getLanguages()) {
    if (wasFirst) {
      langs.append(",");
      langs.append(" ");
    }
    langs.append(languageDictionary.getShortDescription(lang.getShortCode()));
    wasFirst = true;
  }
  return langs.toString().trim();
}

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

/**
 * accomplished
 */
private void proceedLanguage() {
  for(YLanguage yl : in_item.getLanguages()){
    paos_doc.add(new PredicateAndObject(RelConstants.RL_LANGUAGE, yl.getName().toLowerCase()));
  }
}

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

/**
 * accomplished
 */
private void proceedLanguage() {
  for(YLanguage yl : in_item.getLanguages()){
    paos_doc.add(new PredicateAndObject(RelConstants.RL_LANGUAGE, yl.getName().toLowerCase()));
  }
}

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

protected void fillLanguages(HtmlMetaHeaders metadata, YElement yElement) {
  for (YLanguage yLanguage : yElement.getLanguages()) {
    if (StringUtils.isNotEmpty(yLanguage.getShortCode())) {
      metadata.addMetadataName(DC_NAMESPACE + SEPARATOR + DublinCoreStrings.E_LANGUAGE, yLanguage.getShortCode());
    }
  }
}

代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core

protected List<LocalizedString> prepareLanguagesSeparated(YElement element) {
  List<LocalizedString> langs = new ArrayList<LocalizedString>();
  for (YLanguage lang : element.getLanguages()) {
    langs.add(new LocalizedString( languageDictionary.getShortDescription(lang.getShortCode()), languageDictionary.getShortDescription(lang.getShortCode())));
  }
  return langs;
}

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

for(YLanguage yl : item.getLanguages()){
  paos_doc.add(new PredicateAndObject(RelConstants.RL_LANGUAGE, yl.getName().toLowerCase()));

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

if (CollectionUtils.isNotEmpty(yElement.getLanguages())) {
  result.setLanguage(new LanguageData(yElement.getLanguages().get(0)));

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

private YElement buildJournalElement(JournalMetadata journalMetadata, CrossrefIdGenerator generator) {
  YElement element = new YElement();
  YStructure structure = buildStructureFromParent(null, HierarchyWithLevelIds.EXT_HIERARCHY_JOURNAL, HierarchyWithLevelIds.EXT_LEVEL_JOURNAL_JOURNAL);
  element.addStructure(structure);
  YLanguage language = YLanguage.byCode(journalMetadata.getLanguage());
  element.getLanguages().add(language);
  element.getIds().addAll(convertIssns(journalMetadata.getIssns()));
  if (StringUtils.isNotBlank(journalMetadata.getCoden())) {
    element.getIds().add(new YId(IdSchemaIds.EXT_SCHEME_CODEN, journalMetadata.getCoden()));
  }
  for (String fullTitle : journalMetadata.getFullTitles()) {
    element.addName(new YName(fullTitle));
  }
  for (String abbrevTitle : journalMetadata.getAbbrevTitles()) {
    YName abbrev = new YName(abbrevTitle);
    abbrev.setType(NameTypes.NM_ABBREVIATION);
    element.addName(abbrev);
  }
  if (journalMetadata.getDoiData() != null) {
    String doi = journalMetadata.getDoiData().getDoi();
    element.getIds().add(new YId(IdSchemaIds.EXT_SCHEME_DOI, doi));
  }
  String issn = element.getFirstIdOrNullIfAny(IdSchemaIds.EXT_SCHEME_ISSN);
  String journalId = generator.generateJournalId(issn, element.getOneName().getText());
  element.setId(journalId);
  return element;
}

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