gpt4 book ai didi

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

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

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

YId.<init>介绍

暂无

代码示例

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

private YId convert(String mediatype, String value, boolean book) {
  switch (mediatype) {
    case PRINT:
      return new YId(book ? IdSchemaIds.EXT_SCHEME_ISBN : IdSchemaIds.EXT_SCHEME_ISSN, value);
    case ELECTRONIC:
      return new YId(book ? IdSchemaIds.EXT_SCHEME_EISBN : IdSchemaIds.EXT_SCHEME_EISSN, value);
  }
  return null;
}

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

@Override
protected boolean enhanceMetadata(MatchResult result, YElement metadata) {
  // FIXME: Scheme for urn?
  metadata.addId(new YId("urn", result.group(1)));
  return true;
}

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

@Override
  protected boolean enhanceMetadata(MatchResult result, YElement metadata) {
    metadata.addId(new YId(YConstants.EXT_SCHEME_ISSN, result.group(1)));
    return true;
  }
}

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

@Override
  protected boolean enhanceMetadata(MatchResult result, YElement metadata) {
    metadata.addId(new YId(YConstants.EXT_SCHEME_DOI, result.group(1)));
    return true;
  }
}

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

@Override
protected YId convert(Doi source) {
  return new YId(IdSchemaIds.EXT_SCHEME_DOI, source.getvalue());
}

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

@Override
protected YId convert(Issn source) {
  if (WileyComponentConstants.ISSN_ELECTRONIC.equalsIgnoreCase(source.getType())) {
    return new YId(IdSchemaIds.EXT_SCHEME_EISSN, source.getvalue());
  } else {
    return new YId(IdSchemaIds.EXT_SCHEME_ISSN, source.getvalue());
  }
}

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

private void updateJournalIssns(org.jdom.Element jmeta, YElement journal) {
  // journal.addId(y.id(EXT_SCHEME_ISSN, jmeta.getChildTextTrim("issn")));
  List<org.jdom.Element> issns = JDOMHelper.getChildren(jmeta, "issn");
  for (org.jdom.Element issn : issns) {
    String issnValue = issn.getValue().trim();
    // System.out.println("[NlmToYTransformer] Adding next issn:" +
    // issnValue);
    if (StringUtils.isNotBlank(issnValue)) {
     journal.addId(new YId(EXT_SCHEME_ISSN, issnValue));
    }
  }
}

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

/**
 * While mizar id is inserted bydegreuter as keyword, 
 * we are making special traslation
 * @param kg
 * @param article 
 */
void updateMizarID(org.jdom.Element kg, YElement article){
  List<org.jdom.Element> ks = JDOMHelper.getChildren(kg, "kwd");
  for (org.jdom.Element k : ks) {
     String t=k.getText();
    if (t.toLowerCase().contains("identifier") && t.toLowerCase().contains((":"))){
      String id=t.split(":")[1].trim();
      article.addId(new YId(IdSchemaIds.EXT_SCHEME_MIZAR_MATHEMATICAL_LIBRARY, id));
    }
  }
}

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

/**
 * Adds next ISSN number safely (checking if it is not already added).
 * 
 * @param yelement
 * @param issn
 */
private void appendNextIssn(YElement yelement, String issn) {
  YId id = new YId(YConstants.EXT_SCHEME_ISSN, issn);
  YId formattedId = new YId(YConstants.EXT_SCHEME_ISSN, ZentralBlattConverterTools.formatIssn(issn));
  // make sure that is not already added from other field
  if (!yelement.getIds().contains(id) && !yelement.getIds().contains(formattedId)) {
    yelement.addId(id);
  }
}

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

@Override
  protected YId convert(Id source) {
    return new YId(WileyComponentConstants.WILEY_SCHEMA_ID, WileyUtils.processId(source.getValue()));
  }
}

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

/**
 * Creates an identifier given its scheme and value.
 * If the scheme or value is empty or null, does not create an identifier
 * but returns null.
 *
 * @param scheme scheme of the identifier
 * @param value value of the identifier
 * @return created identifier, or null if either parameter was empty or null
 */
public YId id(String scheme, String value) {
  if (empty(scheme) || empty(value)) return null;
  return new YId(scheme, value);
}

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

protected void convertIds(BibEntry source, YElement yElement) {
  String doi = source.getFirstFieldValue(BibEntry.FIELD_DOI);
  if (doi != null) {
    yElement.addId(new YId(YConstants.EXT_SCHEME_DOI, doi));
  }
  String issn = source.getFirstFieldValue(BibEntry.FIELD_ISSN);
  if (issn != null) {
    yElement.addId(new YId(YConstants.EXT_SCHEME_ISSN, issn));
  }
  String isbn = source.getFirstFieldValue(BibEntry.FIELD_ISBN);
  if (isbn != null) {
    yElement.addId(new YId(YConstants.EXT_SCHEME_ISBN, isbn));
  }
}

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

private YElement buildBookSeriesElement(SeriesMetadata seriesMetadata, YElement conferenceEventElement, CrossrefIdGenerator generator) {
  YElement element = new YElement();
  extractSeriesMetadata(null, generator, element, seriesMetadata);
  YRelation proceedingsRelation = new YRelation(RelationTypes.RL_PROCEEDINGS_OF, new YId(StringUtils.EMPTY, conferenceEventElement.getId()));
  element.getRelations().add(proceedingsRelation);
  return element;
}

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

@Override
protected YId convert(Isbn source) {
  if (StringUtils.startsWithIgnoreCase(source.getType(), WileyComponentConstants.ISSBN_ONLINE)) {
    return new YId(IdSchemaIds.EXT_SCHEME_EISBN, source.getvalue());
  } else if (StringUtils.startsWithIgnoreCase(source.getType(), WileyComponentConstants.ISSBN_PRINT)) {
    return new YId(IdSchemaIds.EXT_SCHEME_ISBN, source.getvalue());
  }
  throw new NotImplementedException("Unknown type: " + source.getType());
}

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

public boolean updateJournalId(ZentralBlattSeFieldParser.SeFieldData seData, YAncestor ancestor) {
  // ZBL-ID:
  if (seData.jrnlId != null && seData.jrnlId.length() > 0) {
    YId zblId = new YId(YConstants.EXT_SCHEME_ZBL, seData.jrnlId);
    yJournal.addId(zblId);
    updateYElementIdBasingOnZblId(yJournal, "jrnl:");
    ancestor.setIdentity(yJournal.getId());
    ancestor.addId(zblId);
    return true;
  }
  return false;
}

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

protected void extractSeriesMetadata(YElement parent, CrossrefIdGenerator generator, YElement element, SeriesMetadata seriesMetadata) {
  List<YName> seriesNames = convertTitles(seriesMetadata.getTitles());
  List<YId> seriesIds = new ArrayList<>();
  seriesIds.addAll(convertIssns(seriesMetadata.getIssns()));
  if (StringUtils.isNotBlank(seriesMetadata.getCoden())) {
    seriesIds.add(new YId(IdSchemaIds.EXT_SCHEME_CODEN, seriesMetadata.getCoden()));
  }
  element.getIds().addAll(seriesIds);
  element.getNames().addAll(seriesNames);
  String id = generator.generateBookSeriesId(element.getFirstIdOrNullIfAny(IdSchemaIds.EXT_SCHEME_ISSN), getDefaultName(element));
  element.setId(id);
  element.addStructure(buildStructureFromParent(parent, HierarchyWithLevelIds.EXT_HIERARCHY_BOOK, HierarchyWithLevelIds.EXT_LEVEL_BOOK_SERIES));
}

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

private void appendBibliography(ResourceData resource, YElement yElement) {
  if (!resource.getBibliography().isEmpty()) {
    for (BibliographyReference bib : resource.getBibliography()) {
      YRelation relation = new YRelation();
      relation.setType(RelationTypes.RL_REFERENCE_TO);
      relation.addAttribute(ReferenceAttributeTypes.AT_REFERENCE_TEXT, bib.getText());
      if (StringUtils.isNotBlank(bib.getAssignedId())) {
        relation.setTarget(new YId(IdSchemaIds.EXT_SCHEME_YADDA, bib.getAssignedId()));
      }
      yElement.addRelation(relation);
    }
  }
}

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

private YElement buildBookFromBookMetadata(BookMetadata bookMetadata, YElement parent, CrossrefIdGenerator generator) {
  YElement bookElement = new YElement();
  bookElement.addStructure(buildStructureFromParent(parent, HierarchyWithLevelIds.EXT_HIERARCHY_BOOK, HierarchyWithLevelIds.EXT_LEVEL_BOOK_BOOK));
  bookElement.getNames().addAll(convertTitles(bookMetadata.getTitles()));
  bookElement.getContributors().addAll(convert(bookMetadata.getContributors(), bookElement));
  bookElement.getDates().addAll(convertDates(bookMetadata.getPublicationDates()));
  bookElement.getRelations().addAll(convertCitationList(bookMetadata.getCitationList()));
  bookElement.getIds().addAll(convertIsbns(bookMetadata.getIsbns()));
  if (bookMetadata.getDoiData() != null) {
    bookElement.getIds().add(new YId(IdSchemaIds.EXT_SCHEME_DOI, bookMetadata.getDoiData().getDoi()));
  }
  String id = generator.generateBookId(bookElement.getFirstIdOrNullIfAny(IdSchemaIds.EXT_SCHEME_DOI),
      bookElement.getFirstIdOrNullIfAny(IdSchemaIds.EXT_SCHEME_ISBN), bookElement.getFirstIdOrNullIfAny(IdSchemaIds.EXT_SCHEME_EISBN),
      getDefaultName(bookElement));
  bookElement.setId(id);
  return bookElement;
}

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

private YElement buildBookFromBookSeriesMetadata(BookSeriesMetadata bookSeriesMetadata, YElement parent, CrossrefIdGenerator generator) {
  YElement bookElement = new YElement();
  bookElement.addStructure(buildStructureFromParent(parent, HierarchyWithLevelIds.EXT_HIERARCHY_BOOK, HierarchyWithLevelIds.EXT_LEVEL_BOOK_BOOK));
  bookElement.getNames().addAll(convertTitles(bookSeriesMetadata.getTitles()));
  bookElement.getContributors().addAll(convert(bookSeriesMetadata.getContributors(), bookElement));
  bookElement.getDates().addAll(convertDates(bookSeriesMetadata.getPublicationDates()));
  bookElement.getRelations().addAll(convertCitationList(bookSeriesMetadata.getCitationList()));
  bookElement.getIds().addAll(convertIsbns(bookSeriesMetadata.getIsbns()));
  if (bookSeriesMetadata.getDoiData() != null) {
    bookElement.getIds().add(new YId(IdSchemaIds.EXT_SCHEME_DOI, bookSeriesMetadata.getDoiData().getDoi()));
  }
  String id = generator.generateBookId(bookElement.getFirstIdOrNullIfAny(IdSchemaIds.EXT_SCHEME_DOI),
      bookElement.getFirstIdOrNullIfAny(IdSchemaIds.EXT_SCHEME_ISBN), bookElement.getFirstIdOrNullIfAny(IdSchemaIds.EXT_SCHEME_EISBN),
      getDefaultName(bookElement));
  bookElement.setId(id);
  return bookElement;
}

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

private YElement buildChapterElementFromPaper(ConferencePaper conferencePaper, YElement parent, CrossrefIdGenerator generator) {
  YElement chapterElement = new YElement();
  YStructure structure = buildStructureFromParent(parent, HierarchyWithLevelIds.EXT_HIERARCHY_BOOK, HierarchyWithLevelIds.EXT_LEVEL_BOOK_CHAPTER);
  chapterElement.addStructure(structure);
  chapterElement.getNames().addAll(convertTitles(conferencePaper.getTitles()));
  chapterElement.getContributors().addAll(convert(conferencePaper.getContributors(), chapterElement));
  chapterElement.getDates().addAll(convertDates(conferencePaper.getPublicationDates()));
  chapterElement.getRelations().addAll(convertCitationList(conferencePaper.getCitationList()));
  if (conferencePaper.getDoiData() != null) {
    chapterElement.getIds().add(new YId(IdSchemaIds.EXT_SCHEME_DOI, conferencePaper.getDoiData().getDoi()));
  }
  updatePages(conferencePaper.getPages(), structure.getCurrent());
  String id = generator.generateBookPartId(parent.getId(), "chapter", chapterElement.getFirstIdOrNullIfAny(IdSchemaIds.EXT_SCHEME_DOI),
      getDefaultName(chapterElement));
  chapterElement.setId(id);
  return chapterElement;
}

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