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

x33g5p2x  于2022-02-05 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(102)

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

YStructure.getHierarchy介绍

暂无

代码示例

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

private List<YStructure> setNonJournalStructsAndGetJournalStructs(YElement article) {
  List<YStructure> journalStructures = new ArrayList<>();
  List<YStructure> nonJournalStructs = new ArrayList<>();
  for(YStructure struct : article.getStructures()) {
    if(!struct.getHierarchy().equals(YConstants.EXT_HIERARCHY_JOURNAL)) {
      nonJournalStructs.add(struct);
    } else {
      journalStructures.add(struct);
    }
  }
  article.setStructures(nonJournalStructs);
  return journalStructures;
}

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

protected boolean shouldBeInJournalPack(YExportable entity) {
  if (entity instanceof YElement) {
    YStructure structure = null;
    for (YStructure s : ((YElement) entity).getStructures()) {
      structure = null;
      if (journalPackHierarchies.contains(s.getHierarchy())) {
        structure = s;
      }
      if (structure != null) {
        String level = structure.getCurrent().getLevel();
        if (journalPackLevels.contains(level)) {
          return true;
        }
      }
    }
  }
  return false;
}

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

List<Pair<String, String>> getHierarchyLevels(YExportable exp) {
  ArrayList<Pair<String, String>> ret = new ArrayList<Pair<String, String>>();
  if (exp instanceof YElement) {
    for (YStructure str : ((YElement) exp).getStructures()) {
      String h = str.getHierarchy();
      String l = str.getCurrent().getLevel();
      ret.add(new Pair<String, String>(l,h));
    }
  }
  return ret;
}

代码示例来源:origin: pl.edu.icm.ceon/ceon-converters-commons

protected boolean isMediaLeaf(YExportable entity) {
  if (entity instanceof YElement) {
    YStructure structure = null;
    for (YStructure s : ((YElement) entity).getStructures()) {
      if (contentHierarchies.contains(s.getHierarchy())) {
        structure = s;
      }
    }
    if (structure != null && structure.getCurrent() != null) {
      String level = structure.getCurrent().getLevel();
      return YConstants.EXT_LEVEL_BOOK_BOOK.equals(level);
    }
  }
  return false;
}

代码示例来源:origin: pl.edu.icm.ceon/ceon-converters-commons

protected boolean shouldBeInJournalPack(YExportable entity) {
  if (entity instanceof YElement) {
    YStructure structure = null;
    for (YStructure s : ((YElement) entity).getStructures()) {
      structure = null;
      if (journalPackHierarchies.contains(s.getHierarchy())) {
        structure = s;
      }
      if (structure != null) {
        String level = structure.getCurrent().getLevel();
        if (journalPackLevels.contains(level)) {
          return true;
        }
      }
    }
  }
  return false;
}

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

protected boolean isMediaLeaf(YExportable entity) {
  if (entity instanceof YElement) {
    YStructure structure = null;
    for (YStructure s : ((YElement) entity).getStructures()) {
      if (contentHierarchies.contains(s.getHierarchy())) {
        structure = s;
      }
    }
    if (structure != null && structure.getCurrent() != null) {
      String level = structure.getCurrent().getLevel();
      return YConstants.EXT_LEVEL_BOOK_BOOK.equals(level);
    }
  }
  return false;
}

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

protected boolean isLeaf(YExportable entity) {
  if (entity instanceof YElement) {
    
    YStructure structure = null;
    for (YStructure s : ((YElement) entity).getStructures()) {
      if (contentHierarchies.contains(s.getHierarchy())) {
        structure = s;
      }
    }
    if (structure != null && structure.getCurrent() != null) {
      String level = structure.getCurrent().getLevel();
      if (contentLevels.contains(level)) {
        return true;
      }
      if (level.equalsIgnoreCase(HierarchyWithLevelIds.EXT_LEVEL_BOOK_BOOK)) {
        if (CollectionUtils.isNotEmpty(((YElement)entity).getContents())){
         return true;
        }
      }
    }
  }
  return false;
}

代码示例来源:origin: pl.edu.icm.ceon/ceon-converters-commons

public static boolean isLeaf(YExportable entity) {
  if (entity instanceof YElement) {
    
    YStructure structure = null;
    for (YStructure s : ((YElement) entity).getStructures()) {
      if (contentHierarchies.contains(s.getHierarchy())) {
        structure = s;
      }
    }
    if (structure != null && structure.getCurrent() != null) {
      String level = structure.getCurrent().getLevel();
      if (contentLevels.contains(level)) {
        return true;
      }
      if (level.equalsIgnoreCase(HierarchyWithLevelIds.EXT_LEVEL_BOOK_BOOK)) {
        if (CollectionUtils.isNotEmpty(((YElement)entity).getContents())){
         return true;
        }
      }
    }
  }
  return false;
}

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

String hierarchy = ystruct.getHierarchy();
actStructMap.put(hierarchy, ystruct);
String hierarchy = expYStruct.getHierarchy();

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

@Override
public YStructure build(PublicationMeta meta, List<YElement> ancestors) {
  if (isAlreadyBuilt(meta, ancestors)) {
    return null;
  }
  YStructure structure = new YStructure(getSupportedHierarchyId());
  YElement directAncestor = null;
  if (!ancestors.isEmpty()) {
    directAncestor = ancestors.get(ancestors.size() - 1);
    YStructure parentStructure = directAncestor.getStructure(getSupportedHierarchyId());
    structure.getAncestors().addAll(parentStructure.getAncestors());
    YAncestor ancestor = new YAncestor(structure.getHierarchy());
    ancestor.setLevel(getLevel(directAncestor));
    AncestorsManagement.copyDataToAncestor(directAncestor, ancestor);
    structure.getAncestors().add(ancestor);
  }
  structure.setCurrent(getCurrent(meta, directAncestor));
  return structure;
}

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

if ((!HierarchyWithLevelIds.EXT_HIERARCHY_JOURNAL.equalsIgnoreCase(st.getHierarchy())) &&
  (!HierarchyWithLevelIds.EXT_HIERARCHY_COLLECTION.equalsIgnoreCase(st.getHierarchy())) &&
  (!HierarchyWithLevelIds.EXT_HIERARCHY_CONFERENCE.equalsIgnoreCase(st.getHierarchy()))) {
  accept=true;

相关文章