gpt4 book ai didi

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

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

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

YCurrent.<init>介绍

暂无

代码示例

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

private void updateJournalCurrentLevel() {
  YStructure struct = yJournal.getStructure(YConstants.EXT_HIERARCHY_JOURNAL);
  struct.setCurrent(new YCurrent(YConstants.EXT_LEVEL_JOURNAL_JOURNAL));
}

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

/**
 * Returns YCurrent object representing level of element in journal
 * hierarchy. Method never returns null - if journal hierarchy level is not
 * specified, empty YCurrent object is returned.
 */
public static YCurrent yCurrentInJournalHierarchy(final YElement element) {
  YCurrent result = null;
  final YStructure struct = element.getStructure(HierarchyWithLevelIds.EXT_HIERARCHY_JOURNAL);
  if (struct != null) {
    result = struct.getCurrent();
  }
  return result == null ? new YCurrent() : result;
}

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

private void updateYearCurrentLevel() {
  YStructure struct = yYear.getStructure(YConstants.EXT_HIERARCHY_JOURNAL);
  struct.setCurrent(new YCurrent(YConstants.EXT_LEVEL_JOURNAL_YEAR));
}

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

private void updateVolumeCurrentLevel() {
  YStructure struct = yVolume.getStructure(YConstants.EXT_HIERARCHY_JOURNAL);
  struct.setCurrent(new YCurrent(YConstants.EXT_LEVEL_JOURNAL_VOLUME));
}

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

private void updateIssueCurrentLevel() {
  YStructure struct = yIssue.getStructure(YConstants.EXT_HIERARCHY_JOURNAL);
  struct.setCurrent(new YCurrent(YConstants.EXT_LEVEL_JOURNAL_ISSUE));
}

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

private void updateArticleCurrentLevel(ZentralBlattSoFieldParser.SoFieldData soData) {
  YStructure articleStructure = yArticle.getStructure(YConstants.EXT_HIERARCHY_JOURNAL);
  YCurrent current = new YCurrent(YConstants.EXT_LEVEL_JOURNAL_ARTICLE);
  if (soData.pages != null && soData.pages.length() > 0) {
    current.setPosition(soData.pages);
  }
  articleStructure.setCurrent(current);
}

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

private void addCurrent(YStructure journal, ArticleEditForm form) {
  YCurrent yCurrent = new YCurrent(YConstants.EXT_LEVEL_JOURNAL_ARTICLE);
  yCurrent.setPosition(form.getPages());
  journal.setCurrent(yCurrent);
}

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

public static YStructure getOrCreateJournalStructure(YElement element) {
  YStructure structure = element.getStructure(YConstants.EXT_HIERARCHY_JOURNAL);
  if (structure == null) {
    structure = new YStructure(YConstants.EXT_HIERARCHY_JOURNAL);
    structure.setCurrent(new YCurrent(YConstants.EXT_LEVEL_JOURNAL_ARTICLE));
    element.addStructure(structure);
  }
  return structure;
}

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

private void appendStructure(ResourceData resource, YElement yElement) {
  final String hierarchy = ResourceDataConstants.MAP_TYPE_TO_HIERARCHY.get(resource.getType());
  final String current = ResourceDataConstants.MAP_TYPE_TO_CURRENT.get(resource.getType());
  YStructure structure = new YStructure(hierarchy);
  final AncestorData pages = extractAncestorFromHierarchyData(resource, ResourceDataConstants.ANCESTOR_LEVEL_NAME_PAGES);
  
  final String position = pages == null ? StringUtils.EMPTY : StringUtils.defaultString(pages.getName());
  structure.setCurrent(new YCurrent(current).setPosition(position));
  final Collection<YAncestor> ancestors = mapHierarchyToAncestors(resource.getType(), resource.getHierarchy());
  if (CollectionUtils.isNotEmpty(ancestors)) {
    structure.setAncestors(ancestors);
  }
  yElement.addStructure(structure);
}

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

@Override
protected YCurrent getCurrent(PublicationMeta meta, YElement directAncestor) {
  YCurrent current = new YCurrent();
  switch (meta.getLevel().toLowerCase()) {
    case WileyComponentConstants.PMETA_SERIES:
      current.setLevel(HierarchyWithLevelIds.EXT_LEVEL_BOOK_SERIES);
      break;
    case WileyComponentConstants.PMETA_PRODUCT:
      current.setLevel(HierarchyWithLevelIds.EXT_LEVEL_BOOK_BOOK);
      break;
    case WileyComponentConstants.PMETA_PART:
      current.setLevel(HierarchyWithLevelIds.EXT_LEVEL_BOOK_PART);
      break;
    case WileyComponentConstants.PMETA_UNIT:
      current.setLevel(HierarchyWithLevelIds.EXT_LEVEL_BOOK_CHAPTER);
      break;
    default:
      throw new ConfigurationException("Unknown level: " + meta.getLevel());
  }
  return current;
}

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

protected YStructure buildStructureFromParent(YElement parent, String hierarchy, String currentLevel) {
  YStructure structure = new YStructure(hierarchy);
  YCurrent current = new YCurrent(currentLevel);
  structure.setCurrent(current);
  if (parent != null) {
    YStructure parentStructure = parent.getStructure(hierarchy);
    structure.getAncestors().addAll(parentStructure.getAncestors());
    YAncestor ancestor = new YAncestor(parentStructure.getCurrent().getLevel(), parent.getId());
    ancestor.getNames().addAll(parent.getNames());
    ancestor.getIds().addAll(parent.getIds());
    structure.addAncestor(ancestor);
  }
  return structure;
}

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

private YElement buildElement(HierarchyLevel hierarchyLevel, String elementLevel, String parentId,
                 String parentLevel, String parentName) {
    final String elementId = hierarchyLevel.getId();
    final String name = hierarchyLevel.getName();

    YElement element = new YElement(elementId);
    element.setNames(Lists.newArrayList(new YName(name)));
    final YStructure yStructure = new YStructure(HierarchyWithLevelIds.EXT_HIERARCHY_JOURNAL);
    yStructure.setCurrent(new YCurrent(elementLevel));
    final YAncestor parent = new YAncestor(parentLevel, parentId);
    parent.addName(new YName(parentName));
    yStructure.addAncestor(parent);
    element.setStructures(Lists.newArrayList(yStructure));

    return element;
  }
}

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

protected void updateYElement(final DataSet dataSet, final YElement yElement) {
  YStructure yStructure = new YStructure(DATA_SET_YSTRUCTURE);
  YCurrent yCurrent = new YCurrent(DATA_SET_YLEVEL);
  yStructure.setCurrent(yCurrent);
  Collection<YStructure> structures = Collections.singletonList(yStructure);
  yElement.setStructures(structures);
  
  if (StringUtils.isNotBlank(dataSet.getId())) {
    yElement.setId(DATA_SET_YELEMENT_ID_PREFIX + dataSet.getId());
  }
  
  if (StringUtils.isNotBlank(dataSet.getName())) {
    yElement.setNames(Collections.singletonList(new YName(dataSet.getName())));
  }
  
  if (StringUtils.isNotBlank(dataSet.getDescription())) {
    yElement.setDescriptions(Collections.singletonList(new YDescription(YLanguage.Undetermined, dataSet.getDescription())));
  }
  if (dataSet.getDefaultLicense() != null) {
    YTagList tagList = new YTagList();
    tagList.setType(YModelUtils.LICENSE);
    tagList.addValue(dataSet.getDefaultLicense().getId());
    yElement.addTagList(tagList);
  }
}

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

Collections.singletonList(id));
yElement.addContent(viedoContnentUrl);
YCurrent currentLevel = new YCurrent().setLevel(VideoConstants.VIDEO_CURRENT_LEVEL);
yElement.addStructure(new YStructure().setHierarchy(HierarchyWithLevelIds.EXT_HIERARCHY_PUBLICATION).setCurrent(currentLevel));
NativeDocument nativeDocument = documentFactory.createDocument(recordId.getUid());

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

@Override
  protected YCurrent getCurrent(PublicationMeta meta, YElement directAncestor) {
    YCurrent current = new YCurrent();
    switch (meta.getLevel().toLowerCase()) {
      case WileyComponentConstants.PMETA_SERIES:
        current.setLevel(HierarchyWithLevelIds.EXT_LEVEL_JOURNAL_SERIES);
        break;
      case WileyComponentConstants.PMETA_PRODUCT:
        current.setLevel(HierarchyWithLevelIds.EXT_LEVEL_JOURNAL_JOURNAL);
        break;
      case WileyComponentConstants.PMETA_PART:
        String lastLevel = getLevel(directAncestor);
        current.setLevel(getNextPartLevel(meta, lastLevel));
        break;
      case WileyComponentConstants.PMETA_UNIT:
        current.setLevel(HierarchyWithLevelIds.EXT_LEVEL_JOURNAL_ARTICLE);
        break;
      default:
        throw new ConfigurationException("Unknown level: " + meta.getLevel());
    }
    return current;
  }
}

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

/**
 * Creates an element in the hierarchy.
 *
 * @param level hierarchy for the element
 * @param level level for the element in the hierarchy
 * @param name name to use as the canonical name of the element
 * @param parent parent for the element in the hierarchy
 * @param id eudml id
 * @return the created element
 */
public YElement element(String hierarchy, String level, YName name, YElement parent, String id) {
  YStructure ps = parent==null ? null : parent.getStructure(hierarchy);
  YStructure struct = new YStructure(hierarchy).setCurrent(new YCurrent(level));
  List<String> issns = parent==null ? null : parent.getIds(IdSchemaIds.EXT_SCHEME_ISSN);
  String issn = (issns==null || issns.isEmpty()) ? null : issns.get(0);
  if (ps != null) {
    YAncestor ancestor = new YAncestor(ps.getCurrent().getLevel(), parent.getId()).addName(parent.getDefaultName());
    if (StringUtils.isNotEmpty(issn)) {
      ancestor.addId(new YId(IdSchemaIds.EXT_SCHEME_ISSN, issn));
    }
    struct.setAncestors(ps.getAncestors()).addAncestor(ancestor);
  }
  return new YElement(id).addName(name).addStructure(struct);
}

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

@Override
public YElement process(Book book, YElement parent, CrossrefIdGenerator generator) {
  BookSeriesMetadata bookSeriesMetadata = book.getBookSeriesMetadata();
  String id = generator.generateBookVolumeId(parent.getId(), bookSeriesMetadata.getVolume());
  YElement element = new YElement();
  element.setId(id);
  element.addName(new YName(bookSeriesMetadata.getVolume()));
  YStructure structure = new YStructure(HierarchyWithLevelIds.EXT_HIERARCHY_BOOK);
  YCurrent current = new YCurrent(HierarchyWithLevelIds.EXT_LEVEL_BOOK_VOLUME);
  structure.setCurrent(current);
  structure.getAncestors().addAll(parent.getStructure(HierarchyWithLevelIds.EXT_HIERARCHY_BOOK).getAncestors());
  element.addStructure(structure);
  return element;
}

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

private void prepareYElementFromApi(Video video, YElement yElement) throws ParseException {
  yElement.addName(new YName(video.getSnippet().getTitle()));
  yElement.addDescription(new YDescription(YLanguage.Undetermined, video.getSnippet().getDescription()
          , DescriptionTypes.DS_SUMMARY));
  
  prepareDate(video, yElement);
  
  String license = video.getStatus().getLicense();
  if(null != license && license.contains("creativeCommon")) {
    yElement.addTagList(new YTagList().setType(YModelUtils.LICENSE).addValue("cc0"));
  }
  
  prepareContent(video, yElement);
  
  List<String> tags = video.getSnippet().getTags();
  if (CollectionUtils.isNotEmpty(tags)) {
    yElement.addTagList(new YTagList().setType(TagTypes.TG_KEYWORD).setValues(tags));
  }
  
  YCurrent currentLevel = new YCurrent().setLevel(VideoConstants.VIDEO_CURRENT_LEVEL);
  yElement.addStructure(new YStructure()
      .setHierarchy(HierarchyWithLevelIds.EXT_HIERARCHY_PUBLICATION)
      .setCurrent(currentLevel));
  
  prepareAttributes(video, yElement);
}

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

/**
 * Creates an element in the hierarchy specified by the <code>hierarchy</code> property.
 *
 * @param level level for the element in the hierarchy
 * @param name name to use as the canonical name of the element
 * @param parent parent for the element in the hierarchy
 * @return the created element
 */
public YElement element(String level, YName name, YElement parent) {
  YStructure ps = parent.getStructure(getHierarchy());
  YStructure struct = new YStructure(getHierarchy()).setCurrent(new YCurrent(level));
  if (ps != null)
    struct
      .setAncestors(ps.getAncestors())
      .addAncestor(
        new YAncestor(ps.getCurrent().getLevel(), parent.getId())
          .addName(parent.getDefaultName()));

  return new YElement(
      generateId(EXT_PREFIX_ELEMENT, parent, name))
    .addName(name)
    .addStructure(struct);
}

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

YCurrent current = new YCurrent();
current.setLevel(HierarchyWithLevelIds.EXT_LEVEL_JOURNAL_YEAR);
structure.setCurrent(current);

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