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

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

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

YElement.setRelations介绍

暂无

代码示例

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

private static YElement correctRelations(YElement yelement) {
  LinkedList<YRelation> yrl = new LinkedList<YRelation>();
  for(YRelation yr : yelement.getRelations()) yrl.add(transformRelation(yr));
  yelement.setRelations(yrl);
  
  
  return yelement;
}

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

private static YElement correctRelations(YElement yelement) {
  LinkedList<YRelation> yrl = new LinkedList<YRelation>();
  for(YRelation yr : yelement.getRelations()) yrl.add(transformRelation(yr));
  yelement.setRelations(yrl);
  
  
  return yelement;
}

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

public ArticleBuilder setReferences(List<ReferenceInfo> references) {
  List<YRelation> yRelations = removeReferencesToFromRelations();
  yRelations = addNewReferencesToRelations(references, yRelations);
  article.setRelations(yRelations);
  return this;
}

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

private void updateReferencesFromMetadata(final CatalogInformationEnhancedObject<YExportable> result)
    throws CatalogException, TransformationException {
  final YExportable exportable = result.getObject();
  if (exportable instanceof YElement) {
    final YElement element = (YElement) exportable;
    final IExportable iMetadata = dataSourcesFactory.getMetadataModelDataSource()
        .getMetadataModelExportable(id);
    final DocMetadata metadata = iMetadata instanceof DocMetadata ? (DocMetadata) iMetadata : null;
    if (metadata != null) {
      final List<DocReference> references = metadata.getReferences();
      if (references != null && !references.isEmpty()) {
        final List<YRelation> relationsFromMetadata = toYRelations(references);
        element.setRelations(relationsFromMetadata);
        if (metadata.isTaggedWith(C_BIBREF_GEN)) {
          element.addAttribute(YConstants.AT_BIB_GEN, Boolean.TRUE.toString());
        }
      }
    }
  }
}

相关文章