gpt4 book ai didi

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

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

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

YAncestor.getOneName介绍

暂无

代码示例

代码示例来源:origin: pl.edu.icm.synat/synat-process-common

private void appendAncestorName(YStructure structure, Map<String, String> output, String level) {
  YAncestor ancestor = structure.getAncestor(level);
  if (ancestor != null && ancestor.getOneName()!=null ) {
    final String name = ancestor.getOneName().getText();
    if (StringUtils.isNotBlank(name)) {
      output.put(level, name);
    }
  }
}

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

protected void fillVolumeAndIssue(HtmlMetaHeaders metadata, YStructure yJournalStructure) {
  YAncestor volumeAncestor = yJournalStructure.getAncestor(HierarchyWithLevelIds.EXT_LEVEL_JOURNAL_VOLUME);
  YAncestor issueAncestor = yJournalStructure.getAncestor(HierarchyWithLevelIds.EXT_LEVEL_JOURNAL_ISSUE);
  if (volumeAncestor != null && volumeAncestor.getOneName() != null) {
    metadata.addMetadataName(WP_ISSUE, volumeAncestor.getOneName().getText());
  }
  if (issueAncestor != null && issueAncestor.getOneName() != null) {
    metadata.addMetadataName(WP_VOLUME, issueAncestor.getOneName().getText());
  }
}

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

protected void fillJournalTitle(HtmlMetaHeaders metadata, YStructure yJournalStructure) {
  YAncestor journalAncestor = yJournalStructure.getAncestor(HierarchyWithLevelIds.EXT_LEVEL_JOURNAL_JOURNAL);
  if (journalAncestor != null && journalAncestor.getOneName() != null) {
    metadata.addMetadataName(WP_JOURNAL_TITLE, journalAncestor.getOneName().getText());
  }
}

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

private void fillBookTitle(HtmlMetaHeaders headers, YElement yElement) {
  YStructure booklStructure = yElement.getStructure(HierarchyWithLevelIds.EXT_HIERARCHY_BOOK);
  YAncestor bookAncestor = booklStructure.getAncestor(HierarchyWithLevelIds.EXT_LEVEL_BOOK_BOOK);
  if (bookAncestor != null) {
    headers.addMetadataName(WP_INBOOK_TITLE, bookAncestor.getOneName().getText());
  }
}

代码示例来源:origin: pl.edu.icm.synat/synat-process-common

@Override
public boolean modify(YElement element) {
  if (element != null) {
    YStructure structure = element.getStructure(HierarchyWithLevelIds.EXT_HIERARCHY_JOURNAL);
    if (structure != null) {
      YAncestor journal = structure.getAncestor(HierarchyWithLevelIds.EXT_LEVEL_JOURNAL_JOURNAL);
      if (journal != null && StringUtils.isBlank(journal.getIdentity()) && journal.getOneName() != null ) {
        final String name = journal.getOneName().getText();
        final String journalId = resolveJournalId(name);
        if (journalId != null) {
          journal.setIdentity(journalId);
          Map<String,String> parameters = buildParameters(structure);
          Map<String,String> structureIds = indexSearchUtil.resolveStructureIds(journalId, parameters);
          if (MapUtils.isNotEmpty(structureIds)) {
            for (Map.Entry<String, String> entry : structureIds.entrySet()) {
              structure.getAncestor(entry.getKey()).setIdentity(entry.getValue());
            }
          }
          return true;
        }
      }
    }
  }
  return false;
}

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

protected void fillPublicationDate(HtmlMetaHeaders metadata, YElement yElement) {
  for (YDate date : yElement.getDates()) {
    if (StringUtils.equals(DateTypes.DT_PUBLISHED, date.getType())) {
      String parsedDate = parseDate(date);
      if (parsedDate != null) {
        metadata.addMetadataName(WP_PUBLICATION_DATE, parseDate(date));
        return;
      }
    }
  }
  if (yElement.getStructure(HierarchyWithLevelIds.EXT_HIERARCHY_JOURNAL) != null) {
    YAncestor yAncestor = yElement.getStructure(HierarchyWithLevelIds.EXT_HIERARCHY_JOURNAL).getAncestor(HierarchyWithLevelIds.EXT_LEVEL_JOURNAL_YEAR);
    if (yAncestor != null && yAncestor.getOneName() != null) {
      metadata.addMetadataName(WP_PUBLICATION_DATE, yAncestor.getOneName().getText());
    }
  }
}

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

private Map<String, AncestorData> extractHierarchy(YElement yElement) {
  Map<String, AncestorData> result = new HashMap<String, AncestorData>();
  for (final String hierarhyId : YModelUtils.ALLOWED_HIERARCHY_ID) {
    YStructure yStructure = yElement.getStructure(hierarhyId);
    if (yStructure != null) {
      for (YAncestor ancestor : yStructure.getAncestors()) {
        if (ResourceDataConstants.MAP_ANCESTOR_TYPE_TO_LEVEL.containsValue(ancestor.getLevel())) {
          final YName ancestorName = ancestor.getOneName();
          if (ancestorName != null) {
            result.put(ResourceDataConstants.MAP_ANCESTOR_TYPE_TO_LEVEL.inverse().get(ancestor.getLevel()),
                new AncestorData().setId(ancestor.getIdentity()).setName(ancestorName.getText()));
          }
        }
      }
      YCurrent current = yStructure.getCurrent();
      if(current!=null && StringUtils.isNotBlank(current.getPosition())){
        result.put(ResourceDataConstants.ANCESTOR_LEVEL_NAME_PAGES, new AncestorData().setName(current.getPosition()));
      }
    }
  }
  return result;
}

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

private String highlightedName(YElement element, ElementInfo elementInfo, InfoEntry entry) {
  String hlName = null;
  // try to get highlighted name
  YStructure struct = element.getStructure(elementInfo.getHierarchyId());
  if (struct != null) {
    YAncestor ancestor = struct.getAncestor(entry.getLevel());
    if (ancestor != null) {
      YName name = ancestor.getOneName(HighlightUtils.Y_TYPE_HIGHLIGHTED);
      if (!ancestor.getIdentity().equals(entry.getExtId())) {
        log.warn(
            "Different ancestor in YElement ({}) and infoService ({}). Highlight not performed.",
            ancestor.getIdentity(), entry.getExtId());
      } else if (name != null) {
        hlName = name.getText();
      }
    }
  }
  return hlName;
}

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

if(hier_journal != null){
  YAncestor hier_journal_publisher = hier_journal.getAncestor(RepositoryStringConstants.HIERARCHY_JOURNAL_PUBLISHER);
  if(hier_journal_publisher != null && hier_journal_publisher.getOneName()!=null){
    paos_doc.add(new PredicateAndObject(RelConstants.RL_PUBLISHER, hier_journal_publisher.getOneName().getText()));
  if(hier_journal_journal != null && hier_journal_journal.getOneName()!=null){
    paos_doc.add(new PredicateAndObject(RelConstants.RL_JOURNAL, hier_journal_journal.getOneName().getText()));
  if(hier_journal_year != null && hier_journal_year.getOneName()!=null){
    paos_doc.add(new PredicateAndObject(RelConstants.RL_YEAR, hier_journal_year.getOneName().getText()));
  if(hier_journal_volume != null && hier_journal_volume.getOneName()!=null){
    paos_doc.add(new PredicateAndObject(RelConstants.RL_VOLUME, hier_journal_volume.getOneName().getText()));
  if(hier_journal_issue != null && hier_journal_issue.getOneName()!=null){
    paos_doc.add(new PredicateAndObject(RelConstants.RL_ISSUE, hier_journal_issue.getOneName().getText()));

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

final YAncestor journalAncestor = yStructure.getAncestor(YConstants.EXT_LEVEL_JOURNAL_JOURNAL);
if (journalAncestor != null) {
  final YName journalName = journalAncestor.getOneName(YConstants.NM_CANONICAL);
  docMetadata.setJournal(journalName == null ? null : journalName.getText());
  final YName volumeName = volumeAncestor.getOneName(YConstants.NM_CANONICAL);
  docMetadata.setVolume(volumeName == null ? null : volumeName.getText());
  final YName issueName = issueAncestor.getOneName(YConstants.NM_CANONICAL);
  docMetadata.setIssue(issueName == null || issueName.getText().equals("[unknown]") ? null : issueName
      .getText());

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

YAncestor journalAncestor = yStructure.getAncestor(YConstants.EXT_LEVEL_JOURNAL_JOURNAL);
if (journalAncestor != null) {
  YName journalName = journalAncestor.getOneName(YConstants.NM_CANONICAL);
  docMetadata.setJournal(journalName == null ? null : journalName.getText());
  YName volumeName = volumeAncestor.getOneName(YConstants.NM_CANONICAL);
  docMetadata.setVolume(volumeName == null ? null : volumeName.getText());
  YName issueName = issueAncestor.getOneName(YConstants.NM_CANONICAL);
  docMetadata.setIssue(issueName == null || issueName.getText().equals("[unknown]")
      ? null : issueName.getText());

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