gpt4 book ai didi

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

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

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

YContentFile.<init>介绍

暂无

代码示例

代码示例来源:origin: pl.edu.icm.synat/synat-process-common

private void prepareCover(YElement element, String location, String mimeType, String fileId) {
  List<String> locations = new ArrayList<String>();
  locations.add(fileId);
  locations.add(location);
  YContentFile newCover = new YContentFile(fileId, FileTypes.FT_COVER, mimeType, locations);
  element.getContents().add(newCover);
}

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

protected YContentFile getContentFile(Link link) {
    String name = link.getHref();
    name = StringUtils.removeStart(name, WileyComponentConstants.CONENT_LINK_PREFIX);
    name = StringUtils.stripStart(name, "/\\");
    YContentFile contentFile = new YContentFile(name, FileTypes.FT_FULL_TEXT, "application/pdf", null);
    contentFile.getLocations().add(name);
    return contentFile;
  }
}

代码示例来源: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.synat/synat-importer-speech-to-text

private void prepareContent(Video video, YElement yElement) {
  YContentFile viedoUrlContnent = new YContentFile(video.getId(), VideoConstants.VIDEO_URL_FILE_TYPE, VideoConstants.YOUTUBE_FORMAT, Collections.singletonList(video.getId()));
  yElement.addContent(viedoUrlContnent);
  String thumbnailUrl = parseThumbnailUrl(video);
  if (thumbnailUrl != null) {
    // TODO format detect
    YContentFile thumbnailContent = new YContentFile(video.getId() + "_thumbnail", FileTypes.FT_THUMBNAIL, MediaType.ANY_IMAGE_TYPE.toString(), Collections.singletonList(thumbnailUrl));
    yElement.addContent(thumbnailContent);
  }
}

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

/**
 * Creates a content file given its required properties.
 * If some of the specified values are empty or null, does not create a content file
 * but returns null. If some, but not all, of the specified locations are empty or null they are
 * not used.
 *
 * @param id file identifier
 * @param type type of content
 * @param mime MIME type of the file
 * @param locations URLs for the locations of the file, empty and null locations are omitted
 * @return created content file, or null if some input was empty or missing
 */
public YContentFile contentFile(String id, String type, String mime, String... locations) {
  if (empty(id) || empty(type) || empty(mime)) return null;
  ArrayList<String> ls = new ArrayList<String>(locations.length);
  for (String l : locations) if (!empty(l)) ls.add(l);
  if (ls.isEmpty()) return null;
  return new YContentFile(id, type, mime, ls);
}

代码示例来源: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.synat/synat-importer-yadda

private Document prepareContentAndSpeechToText(PlatonTVFile input, String id, RecordId recordId, YElement yElement) {
  String transliterationPartId = UUID.randomUUID().toString();
  YContentFile viedoContnentUrl = new YContentFile(id + "_" + transliterationPartId, VideoConstants.VIDEO_URL_FILE_TYPE, "pionierFormat",
      Collections.singletonList(id));
  yElement.addContent(viedoContnentUrl);
    try {
      document.addBinaryAttachment(transliterationPartId, FileUtils.readFileToByteArray(input.getSpeechToTextFile()));
      YContentFile viedoSpeechToTextContent = new YContentFile(id + "_text_" + transliterationPartId, FileTypes.FT_FULL_TEXT, "plain/text",
          Collections.singletonList(transliterationPartId));
      yElement.addContent(viedoSpeechToTextContent);

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

ocrContent = new YContentFile();
contentPartName = idGenerator.generate();
ocrContent.addLocation(contentPartName);

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

article.addContent(new YContentFile().addLocation(aid.getTextTrim()));

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

YContentFile description = new YContentFile();
description.setAttributes(template.getAttributes());
description.setDescriptions(template.getDescriptions());

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

YContentFile description = new YContentFile();
description.setAttributes(template.getAttributes());
description.setDescriptions(template.getDescriptions());

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