本文整理了Java中pl.edu.icm.model.bwmeta.y.YElement.addContent()
方法的一些代码示例,展示了YElement.addContent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YElement.addContent()
方法的具体详情如下:
包路径:pl.edu.icm.model.bwmeta.y.YElement
类名称:YElement
方法名:addContent
暂无
代码示例来源: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.bwmeta/bwmeta-2-foreign-transformers
public void updateElementContentLinks(org.jdom.Element ameta, YElement article) {
List<org.jdom.Element> selfs = JDOMHelper.getChildren(ameta, "self-uri");
for (org.jdom.Element uri : selfs) {
String type = FileTypes.FT_FULL_TEXT;
String mime = uri.getAttributeValue("content-type");
if (mime == null) {
type = FileTypes.FT_ELEMENT_WEBPAGE;
mime = "text/html";
}
String href = uri.getAttributeValue("href", XLINK_NAMESPACE);
YContentFile contentFile = y.contentFile(href, type, mime, href);
if (contentFile!=null) {
contentFile.addDescription(new YDescription(YLanguage.English, uri.getValue()));
article.addContent(contentFile);
}
}
}
代码示例来源: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
yElement.addContent(viedoContnentUrl);
YCurrent currentLevel = new YCurrent().setLevel(VideoConstants.VIDEO_CURRENT_LEVEL);
yElement.addStructure(new YStructure().setHierarchy(HierarchyWithLevelIds.EXT_HIERARCHY_PUBLICATION).setCurrent(currentLevel));
YContentFile viedoSpeechToTextContent = new YContentFile(id + "_text_" + transliterationPartId, FileTypes.FT_FULL_TEXT, "plain/text",
Collections.singletonList(transliterationPartId));
yElement.addContent(viedoSpeechToTextContent);
} catch (IOException e) {
problemHandler.handleProblem(LogSeverity.WARN, id, "SpeechToText ERROR", "IOException when file read.");
代码示例来源:origin: pl.edu.icm.synat/synat-business-services-impl
ocrContent.setType(DEFAULT_CONTENT_TYPE);
ocrContent.setId(contentPartName);
element.addContent(ocrContent);
ocrContent.setFormat(format);
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers
article.addContent(new YContentFile().addLocation(aid.getTextTrim()));
代码示例来源:origin: pl.edu.icm.ceon/ceon-converters-commons
leaf.addContent(description);
代码示例来源:origin: pl.edu.icm.yadda/bwmeta-import
leaf.addContent(description);
代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl
article.addContent(y.contentFile(href, type, mime, href));
内容来源于网络,如有侵权,请联系作者删除!