gpt4 book ai didi

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

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

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

YAncestor.getLevel介绍

暂无

代码示例

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

private boolean notInLevelToSkip(final YAncestor ancestor) {
  final String ancestorsLevel = ancestor.getLevel();
  for (final String level : levelsToSkip) {
    if (level.equals(ancestorsLevel)) {
      return false;
    }
  }
  return true;
}

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

public static Map<String, IdentifiersData> collectIdentifiers(YElement element) {
  Map<String, IdentifiersData> data = new HashMap<>();
  for (YStructure structure : element.getStructures()) {
    for (YAncestor ancestor : structure.getAncestors()) {
      if(SUPPORTRED_LEVELS.contains(ancestor.getLevel())){
        data.putAll(collectObjectIdentifiers(ancestor, ancestor.getLevel()));
      }
    }
  }
  data.putAll(collectObjectIdentifiers(element, StringUtils.EMPTY));
  return data;
}

代码示例来源:origin: pl.edu.icm.synat/synat-sdk-sample-services

private String findDoubledLevel(YElement element) {
  YStructure structure = element.getStructure(HierarchyWithLevelIds.EXT_HIERARCHY_JOURNAL);
  if (structure == null) {
    return null;
  }
  
  List<YAncestor> ancestors = structure.getAncestors();
  
  Set<String> existingLevels = new HashSet<String>();
  
  for (YAncestor yAncestor : ancestors) {
    String level = yAncestor.getLevel();
    if (level != null) {
      if (existingLevels.contains(level)) {
        return level;
      } else {
        existingLevels.add(level);
      }
    }
  }
  return null;
}

代码示例来源:origin: pl.edu.icm.synat/synat-business-services-api

private Map<String, YDate> extractDatesFromHierarchy(final List<YStructure> structures) {
  Map<String, YDate> dates = new HashMap<>();
  for (final YStructure structure : structures) {
    for (final YAncestor ancestor : structure.getAncestors()) {
      dates.putAll(processYDates(ancestor.getDates()));
      if (HierarchyWithLevelIds.EXT_LEVEL_JOURNAL_YEAR.equals(ancestor.getLevel())) {
        dates.put("hierarchy", getDateFromYear(ancestor));
      }
    }
  }
  return dates;
}

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

private ListMultimap<String, YAncestor> getMappedAncestors(Collection<YAncestor> ancestors) {
  ListMultimap<String, YAncestor> mappedAncestors = ListMultimapBuilder.hashKeys().arrayListValues().build();
  for (YAncestor ancestor : ancestors) {
    mappedAncestors.put(ancestor.getLevel(), ancestor);
  }
  return mappedAncestors;
}

代码示例来源:origin: pl.edu.icm.yadda.repowebeditor/repository-web-editor-core

private YAncestor setNonIssueAncestorsAndGetExisitingIssue(String issueId, YStructure journal) {
  YAncestor existingIssue = null;
  List<YAncestor> nonIssueAncestors = new ArrayList<>();
  for(YAncestor ancestor : journal.getAncestors()) {
    boolean isNotIssue = !ancestor.getLevel().equals(YConstants.EXT_LEVEL_JOURNAL_ISSUE);
    boolean isCurrentIssue = ancestor.getIdentity().equals(issueId);
    if(isNotIssue) {
      nonIssueAncestors.add(ancestor);
    } else if(isCurrentIssue) {
      existingIssue = ancestor;
    } else {
      // ignore/remove non current issues
    }
  }
  journal.setAncestors(nonIssueAncestors);
  return existingIssue;
}

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

private static void replaceJournalNameField(final YElement yElement, final String[] values) {
  if (values != null && values.length > 0) {
  }
  final YStructure structure = yElement.getStructure(YConstants.EXT_HIERARCHY_JOURNAL);
  if (structure != null) {
    for (final YAncestor ancestor : structure.getAncestors()) {
      final String level = ancestor.getLevel();
      if (YConstants.EXT_LEVEL_JOURNAL_JOURNAL.equals(level)) {
        final String firstJournalName = values[0];
        ancestor.addName(new YName(null, firstJournalName, Y_TYPE_HIGHLIGHTED));
      }
    }
  }
}

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

String level = actAnc.getLevel();
  actAncMap.put(level, actAnc);
  String level = expAnc.getLevel();
  if (actAncMap.containsKey(level)) {
  String level = yanc.getLevel();
  result.append(level, ResultStatus.FAILED, 1);
String level = yanc.getLevel();
result.append(level, ResultStatus.REDUNDANT, 1);

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

private List<StructureData> prepareStructure(YElement yElement, String hierarchy, String[] levels, String... topLevelIds) {
  List<String> topLevels = Arrays.asList(topLevelIds);
  String topId = null;
  String topLevelId = null;
  List<StructureData> ancestors = new ArrayList<StructureData>();
  final YStructure structure = yElement.getStructure(hierarchy);
  if (structure != null) {
    ListMultimap<String, YAncestor> mappedAncestors = getMappedAncestors(structure.getAncestors());
    for (String level : levels) {
      final YAncestor ancestor = getAncestor(mappedAncestors, level);
      if (ancestor != null && ArrayUtils.contains(StructureData.LEVELS_ALLOWED, ancestor.getLevel())) {
        if (topLevels.contains(ancestor.getLevel())) {
          topId = ancestor.getIdentity();
          topLevelId = ancestor.getLevel();
          ancestors.add(new StructureData(ancestor.getIdentity(), YModelUtils.getDefaultName(ancestor), ancestor.getLevel(), topId, topLevelId));
        } else {
          ancestors.add(new StructureData(ancestor.getIdentity(), IndexUtils.encodeNameValue(YModelUtils.getDefaultName(ancestor)),
              ancestor.getLevel(), topId, topLevelId));
        }
      }
    }
    if (StringUtils.isNotBlank(structure.getCurrent().getPosition())
        && ArrayUtils.contains(StructureData.ALLOWED_LEVELS_OF_CURRENT_POSITION, structure.getCurrent().getLevel())) {
      ancestors.add(new StructureData(null, structure.getCurrent().getPosition()));
    }
  }
  return ancestors;
}

代码示例来源:origin: pl.edu.icm.synat/synat-sdk-sample-services

if (HierarchyWithLevelIds.EXT_LEVEL_JOURNAL_VOLUME.equals(yAncestor.getLevel())) {
  if (firstVolume == null) {
    firstVolume = yAncestor;

代码示例来源: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.synat/synat-sdk-sample-services

if (levelToFix.equals(yAncestor.getLevel())) {
  YElement ancElement = fetchElement(repository, yAncestor.getIdentity());
  YStructure structure = ancElement.getStructure(HierarchyWithLevelIds.EXT_HIERARCHY_JOURNAL);

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