gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-16 18:30:40 25 4
gpt4 key购买 nike

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

YName.<init>介绍

暂无

代码示例

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

protected YName convert(List<Serializable> content) {
  YRichText text = convertText(content);
  YName name = new YName(text);
  return name;
}

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

/**
 * Creates a name with type "canonical" given its language and text.
 * If the text is empty or null uses the value of <code>canonicalNameDefault</code>
 * property.
 *
 * @param lang language of the name
 * @param text text of the name, may be null
 * @return created name
 */
public YName canonicalName(YLanguage lang, String text) {
  if (empty(text)) text = canonicalNameDefault;
  return new YName(lang, text, NM_CANONICAL);
}

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

/**
 * Creates a name given its language, text and type.
 * If the text is empty or null, does not create a name but returns null.
 *
 * @param lang language of the name
 * @param text text of the name, may be null
 * @param type type of the name
 * @return created name, or null if text was empty or null
 */
public YName name(YLanguage lang, String text, String type) {
  if (empty(text)) return null;
  return new YName(lang, text, type);
}

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

/**
 * Creates a name given its language, text and type.
 * If the text is empty or null, does not create a name but returns null.
 *
 * @param lang language of the name
 * @param text text of the name, may be null
 * @param type type of the name
 * @return created name, or null if text was empty or null
 */
public YName name(YLanguage lang, YRichText text, String type) {
  if (empty(text)) return null;
  return new YName(lang, text, type);
}

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

@Override
protected boolean enhanceMetadata(BxZone zone, YElement metadata) {
  metadata.addName(new YName(zone.toText().replaceAll("\n", " ")));
  return true;
}

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

private void appendAncestorDataToYAncestor(List<YAncestor> result, String type, AncestorData data) {
  if (StringUtils.isNotBlank(data.getId()) || StringUtils.isNotBlank(data.getName())) {
    result.add(new YAncestor(ResourceDataConstants.MAP_ANCESTOR_TYPE_TO_LEVEL.get(type), data.getId(), new YName(data.getName())));
  }
}

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

private YName createYName(String language, String text, String type) {
  YLanguage ylanguage = YLanguage.byCode(language, YLanguage.English);
  YRichText yTitleText = yRichTextExtractor.extractFrom(text);
  return new YName(ylanguage, yTitleText, type);
}

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

YContentFile buildYContentFile() {
  YContentFile yContentFile = new YContentFile(String.valueOf(id), FileTypes.FT_FULL_TEXT,
      format, Lists.newArrayList(location));
  YName yName = new YName(name);
  yName.setType(NameTypes.NM_FILE_NAME);
  yContentFile.addName(yName);
  return yContentFile;
}

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

public static void addPublisher(YElement element, String publisher) {
  YStructure structure = Enhancers.getOrCreateJournalStructure(element);
  YAncestor ancestor = new YAncestor(YConstants.EXT_LEVEL_JOURNAL_PUBLISHER);
  ancestor.addName(new YName(publisher));
  structure.addAncestor(ancestor);
}

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

public static void addJournal(YElement element, String journal) {
  YStructure structure = Enhancers.getOrCreateJournalStructure(element);
  YAncestor ancestor = new YAncestor(YConstants.EXT_LEVEL_JOURNAL_JOURNAL);
  ancestor.addName(new YName(journal));
  structure.addAncestor(ancestor);
}

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

public static void addVolume(YElement element, String volume) {
  YStructure structure = getOrCreateJournalStructure(element);
  YAncestor ancestor = new YAncestor(YConstants.EXT_LEVEL_JOURNAL_VOLUME);
  ancestor.addName(new YName(volume));
  structure.addAncestor(ancestor);
}

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

public static void addIssue(YElement element, String issue) {
    YStructure structure = getOrCreateJournalStructure(element);
    YAncestor ancestor = new YAncestor(YConstants.EXT_LEVEL_JOURNAL_ISSUE);
    ancestor.addName(new YName(issue));
    structure.addAncestor(ancestor);
  }
}

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

@Override
public void parseMetadata(YElement element, PublicationMeta pm, YLanguage defaultLanguage, List<YElement> ancestors) {
  Numbering volumeNumbering = WileyUtils.getNumbering(pm.getNumberingGroup(), WileyComponentConstants.NUMBERING_VOLUME);
  String volNum = volumeNumbering.getNumber();
  String volume = volumeNumbering.getvalue();
  volNum = StringUtils.isNotBlank(volNum) ? volNum : volume;
  String id = ancestors.get(ancestors.size() - 1).getId() + "-v-" + volNum;
  id = WileyUtils.processId(id);
  element.setId(id);
  YName nam = new YName(volume);
  nam.setSortKey(volNum);
  element.addName(nam);
}

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

@Deprecated
public static YPerson resolveYPerson(PersonData personData) {
  YPerson person = new YPerson();
  person.setId(personData.getId());
  person.addName(new YName(personData.getName()).setType(NameTypes.NM_CANONICAL));
  return person;
}

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

private void updateIssue(ZentralBlattSoFieldParser.SoFieldData soData) {
  if (soData.issue != null && soData.issue.length() > 0) {
    YAncestor ancestor = new YAncestor(YConstants.EXT_LEVEL_JOURNAL_ISSUE); // TODO
    // UID?
    YName issueName = new YName(soData.issue);
    yIssue.addName(issueName);
    ancestor.setIdentity(yIssue.getId());
    ancestor.addName(issueName);
    yArticle.getStructure(YConstants.EXT_HIERARCHY_JOURNAL).addAncestor(ancestor);
  }
}

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

private static void putEditor(YElement element, String editor) {
  YName name = new YName().setType(YConstants.NM_CANONICAL).setText(editor);
  YContributor contributor = new YContributor().setRole(YConstants.CR_EDITOR).addName(name);
  element.addContributor(contributor);
}

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

private YCategory buildCategory(String code, String name, String id, String classification, String parentCode) {
  YCategory res = new YCategory();
  res.setCode(code);
  res.setId(id);
  res.setClassification(classification);
  res.setParent(parentCode);
  res.addName(new YName(name));
  return res;
}

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

private void appendContents(ResourceData resource, YElement yElement) {
  for (ResourceData.ResourceFileData content : resource.getContents()) {
    if (!content.isToBeDeleted()) {
      final String fileId = content.getId();
      final String fileName = content.getName();
      if (!checkIfContentPresent(yElement, fileId)) {
        String mime = ExtendedMimeTypeHelper.resolveTypeForFile(fileName != null ? new File(fileName) : null);
        List<String> locations = Collections.singletonList(content.getLocation());
        yElement.addContent(new YContentFile(fileId, content.getType(), mime, locations).addName(new YName(fileName)));
      }
    }
  }
}

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

private void updateVolume(ZentralBlattSoFieldParser.SoFieldData soData) {
  if (soData.volume != null && soData.volume.length() > 0) {
    YAncestor ancestor = new YAncestor(YConstants.EXT_LEVEL_JOURNAL_VOLUME); // TODO
    // UID?
    YName volumeName = new YName(soData.volume);
    yVolume.addName(volumeName);
    ancestor.setIdentity(yVolume.getId());
    ancestor.addName(volumeName);
    yIssue.getStructure(YConstants.EXT_HIERARCHY_JOURNAL).addAncestor(ancestor);
    yArticle.getStructure(YConstants.EXT_HIERARCHY_JOURNAL).addAncestor(ancestor);
  }
}

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

private YElement buildVolumeElementFromSeries(ProceedingsSeriesMetadata proceedingsSeriesMetadata, YElement parent, CrossrefIdGenerator generator) {
  YElement bookVolumeElement = new YElement();
  bookVolumeElement.addStructure(buildStructureFromParent(parent, HierarchyWithLevelIds.EXT_HIERARCHY_BOOK, HierarchyWithLevelIds.EXT_LEVEL_BOOK_VOLUME));
  bookVolumeElement.addName(new YName(proceedingsSeriesMetadata.getVolume()));
  String id = generator.generateBookVolumeId(parent.getId(), proceedingsSeriesMetadata.getVolume());
  bookVolumeElement.setId(id);
  return bookVolumeElement;
}

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