- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中pl.edu.icm.model.bwmeta.y.YContentDirectory.getEntries()
方法的一些代码示例,展示了YContentDirectory.getEntries()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YContentDirectory.getEntries()
方法的具体详情如下:
包路径:pl.edu.icm.model.bwmeta.y.YContentDirectory
类名称:YContentDirectory
方法名:getEntries
暂无
代码示例来源:origin: pl.edu.icm.synat/synat-importer-direct
@Override
public Iterable<YContentFile> apply(YContentEntry input) {
if (input instanceof YContentFile) {
return Arrays.asList((YContentFile) input);
}
YContentDirectory directory = (YContentDirectory) input;
return createIterable(directory.getEntries());
}
};
代码示例来源:origin: pl.edu.icm.yadda.repowebeditor/repository-web-editor-core
private List<ContentInfo> getContentInfo(YContentDirectory directory){
return getContentInfo(directory.getEntries());
}
代码示例来源:origin: pl.edu.icm.synat/synat-process-common
@SuppressWarnings("rawtypes")
private static void processYContents(List<YContentEntry> entries, Predicate<YContentEntry<?>> shouldDeletePredicate) {
Iterator<YContentEntry> entryIt = entries.iterator();
while (entryIt.hasNext()) {
YContentEntry entry = entryIt.next();
if (entry instanceof YContentDirectory) {
YContentDirectory directory = (YContentDirectory) entry;
processYContents(directory.getEntries(), shouldDeletePredicate);
}
if (shouldDeletePredicate.test(entry)) {
entryIt.remove();
}
}
}
}
代码示例来源:origin: pl.edu.icm.synat/synat-business-services-api
private boolean hasChapteredContent(List<YContentEntry> contentList) {
for (YContentEntry<?> content : contentList) {
if (content instanceof YContentDirectory) {
YContentDirectory dir = (YContentDirectory) content;
if ((ContentTypes.CONTENT_PAGED.equals(dir.getType()) && findIfContentExists(dir.getEntries(), null)) || hasChapteredContent(dir.getEntries())) {
return true;
}
}
}
return false;
}
代码示例来源:origin: pl.edu.icm.synat/synat-business-services-api
private List<YContentDirectory> findChapters(List<YContentEntry> contentList, Locale locale) {
List<YContentDirectory> result = new ArrayList<YContentDirectory>();
for (YContentEntry<?> content : contentList) {
if (content instanceof YContentDirectory) {
YContentDirectory dir = (YContentDirectory) content;
if (ContentTypes.CONTENT_PAGED.equals(dir.getType())) {
result.add(dir);
} else {
result.addAll(findChapters(dir.getEntries(), locale));
}
}
}
return result;
}
代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core
private List<Page> resolveChapter(YContentDirectory dir) {
List<Page> result = new LinkedList<Page>();
for (YContentEntry e : dir.getEntries()) {
if (e.isFile()) {
result.add(resolveFile((YContentFile) e));
} else {
result.add(resolveMultiFile((YContentDirectory) e));
}
}
return result;
}
代码示例来源:origin: pl.edu.icm.synat/synat-business-services-api
private List<ContentChapterData> transformChaptersContent(List<YContentDirectory> chapters, Locale locale, String mainLevel) {
List<ContentChapterData> chaptersData = new ArrayList<ContentChapterData>();
for (YContentDirectory chapter : chapters) {
final List<ContentFileData> pages = findChapterPages(chapter.getEntries(), locale, mainLevel);
if(!pages.isEmpty()){
chaptersData.add(new ContentChapterData(chapter.getId(), getDirectoryName(chapter), pages));
}
}
return chaptersData;
}
代码示例来源:origin: pl.edu.icm.synat/synat-importer-direct
@SuppressWarnings("rawtypes")
private YContentFile findYContentFileById(Iterable<YContentEntry> contents, String id) {
for (YContentEntry<?> contentEntry : contents) {
if (contentEntry instanceof YContentFile) {
YContentFile contentFile = (YContentFile) contentEntry;
if (contentFile.getId().equals(id)) {
return contentFile;
}
} else {
YContentDirectory directory = (YContentDirectory) contentEntry;
return findYContentFileById(directory.getEntries(), id);
}
}
return null;
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-content
private List<YContentFile> processPlainTextEntry(final YContentEntry<?> yEntry) {
final List<YContentFile> result = new ArrayList<YContentFile>();
if (yEntry.isDirectory()) {
final YContentDirectory yDirectory = (YContentDirectory) yEntry;
for (final YContentEntry<?> yChild : yDirectory.getEntries()) {
result.addAll(processPlainTextEntry(yChild));
}
} else if (yEntry.isFile() && YConstants.FT_PLAIN_TEXT.equals(((YContentFile) yEntry).getType())) {
result.add((YContentFile) yEntry);
}
return result;
}
代码示例来源:origin: pl.edu.icm.synat/synat-business-services-api
private boolean findIfContentExists(List<YContentEntry> chapterEntries, String mainLevel) {
for (YContentEntry<?> content : chapterEntries) {
if (content instanceof YContentFile && yModelPropertyExtractor.isFileAccepted((YContentFile) content, mainLevel)) {
return true;
} else if (content instanceof YContentDirectory) {
if (findIfContentExists(((YContentDirectory) content).getEntries(), mainLevel)) {
return true;
}
}
}
return false;
}
代码示例来源:origin: pl.edu.icm.yadda/bwmeta-import
public void convertContentLocations(YContentEntry<?> entry) {
if (entry instanceof YContentDirectory) {
YContentDirectory dir = (YContentDirectory) entry;
for (YContentEntry<?> e : dir.getEntries()) {
convertContentLocations(e);
}
return;
}
YContentFile file = (YContentFile) entry;
List<String> newLocations = new ArrayList<String>();
for (String location : file.getLocations()) {
newLocations.add(location.replaceAll("^" + YConstants.MISC_PACK_RELATIVE_CONTENT_PREFIX + "archive/",
YConstants.MISC_LOCAL_CONTENT_ADDRESS_PREFIX));
}
file.setLocations(newLocations);
}
代码示例来源:origin: pl.edu.icm.synat/synat-business-services-api
protected YContentFile findCover(YContentEntry<?> entry) {
if (entry instanceof YContentDirectory) {
YContentDirectory directory = (YContentDirectory) entry;
for (YContentEntry<?> child : directory.getEntries()) {
YContentFile cover = findCover(child);
if (cover != null) {
return cover;
}
}
} else if (entry instanceof YContentFile) {
YContentFile file = (YContentFile) entry;
if (FileTypes.FT_COVER.equals(file.getType()) || FileTypes.FT_THUMBNAIL.equals(file.getType())) {
return file;
}
}
return null;
}
代码示例来源:origin: pl.edu.icm.synat/synat-portal-core
@SuppressWarnings("rawtypes")
private Map<String, YContentFile> scanForFulltextFiles(Collection<YContentEntry> contentEntries, Set<String> formats) {
Map<String, YContentFile> result = new HashMap<String, YContentFile>();
for (YContentEntry contentEntry : contentEntries) {
if (contentEntry instanceof YContentFile) {
YContentFile contentFile = (YContentFile) contentEntry;
if (StringUtils.equals(contentFile.getType(), "full-text") && formats.contains(contentFile.getFormat())) {
result.put(contentFile.getFormat(), contentFile);
}
} else if (contentEntry instanceof YContentDirectory) {
YContentDirectory contentDirectory = (YContentDirectory) contentEntry;
Map<String, YContentFile> subResult = scanForFulltextFiles(contentDirectory.getEntries(), formats);
subResult.putAll(result);
result = subResult;
}
}
return result;
}
代码示例来源:origin: pl.edu.icm.synat/synat-business-services-api
@Override
public List<String> extractContentLocation(@SuppressWarnings("rawtypes") List<YContentEntry> contentList, String mainLevel) {
List<String> result = new ArrayList<String>();
for (YContentEntry<?> content : contentList) {
if (content instanceof YContentFile) {
YContentFile file = (YContentFile) content;
if (yModelPropertyExtractor.isFileAccepted(file, mainLevel)) {
result.add(yModelPropertyExtractor.prepareLocation(file.getLocations()));
}
} else if (content instanceof YContentDirectory) {
YContentDirectory dir = (YContentDirectory) content;
result.addAll(extractContentLocation(dir.getEntries(), mainLevel));
}
}
return result;
}
代码示例来源:origin: pl.edu.icm.synat/synat-business-services-api
@SuppressWarnings("rawtypes")
private boolean checkContentAvailable(List<YContentEntry> contentList, String mainLevel) {
for (YContentEntry<?> content : contentList) {
if (content instanceof YContentFile) {
if (isFileAccepted((YContentFile) content, mainLevel)) {
return true;
}
} else if (content instanceof YContentDirectory) {
YContentDirectory dir = (YContentDirectory) content;
if (acceptedDirectoryTypes.contains(dir.getType()) && checkContentAvailable(dir.getEntries(), mainLevel)) {
return true;
}
}
}
return false;
}
代码示例来源:origin: pl.edu.icm.synat/synat-business-services-api
@SuppressWarnings("rawtypes")
private List<FilteredContentEntry<?>> filter(FilteredContentDirectory parent, List<YContentEntry> contentEntries, ContentFilter filter) {
List<FilteredContentEntry<?>> filtered = new ArrayList<>();
for(YContentEntry<?> entry:contentEntries) {
if(filter.accept(entry)) {
final FilteredContentEntry<?> currentEntry;
if (entry instanceof YContentFile) {
currentEntry = new FilteredContentFile(parent, (YContentFile) entry);
} else {
YContentDirectory cDirectory = (YContentDirectory) entry;
FilteredContentDirectory directory = new FilteredContentDirectory(parent, cDirectory);
filter(directory, cDirectory.getEntries(), filter);
currentEntry = directory;
}
filtered.add(currentEntry);
}
}
return filtered;
}
代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core
private Page resolveMultiFile(YContentDirectory dir) {
Page result = new Page();
if (dir.getType().equals(YConstants.CONTENT_MULTI_TYPE)) {
for (YContentEntry e : dir.getEntries()) {
if (e.isFile()) {
YContentFile file = (YContentFile) e;
if (!file.getLocations().isEmpty()) {
String location = file.getLocations().get(0)
.replace("yar://", "");
if (file.getType().equals(YConstants.FT_PLAIN_TEXT)) {
result.setText(location);
} else {
result.setScan(location);
}
}
}
}
}
return result;
}
代码示例来源:origin: pl.edu.icm.synat/synat-business-services-api
private List<ContentFileData> findChapterPages(List<YContentEntry> chapterEntries, Locale locale, String mainLevel) {
List<ContentFileData> result = new ArrayList<ContentFileData>();
for (YContentEntry<?> content : chapterEntries) {
if (content instanceof YContentFile) {
YContentFile file = (YContentFile) content;
if (yModelPropertyExtractor.isFileAccepted(file, mainLevel)) {
result.add(new ContentFileData(file.getId(), YModelUtils.getDefaultName(file), fetchName(file.getFormat(), locale), yModelPropertyExtractor.prepareLocation(file.getLocations())));
}
} else if (content instanceof YContentDirectory) {
YContentDirectory dir = (YContentDirectory) content;
if (ContentTypes.CONTENT_MULTI_TYPE.equals(dir.getType())) {
result.addAll(findChapterPages(dir.getEntries(), locale, mainLevel));
}
}
}
return result;
}
代码示例来源:origin: pl.edu.icm.synat/synat-business-services-impl
@SuppressWarnings("rawtypes")
private void extractContents(String elementId, List<YContentEntry> contents, FileGrp currentFileGrp) {
for (YContentEntry yContentEntry : contents) {
if (yContentEntry instanceof YContentDirectory) {
YContentDirectory directory = (YContentDirectory) yContentEntry;
FileGrp fileGrp = new FileGrp();
fileGrp.setID(directory.getId());
currentFileGrp.getFileGrps().add(fileGrp);
extractContents(elementId, directory.getEntries(), fileGrp);
} else {
YContentFile yfile = (YContentFile) yContentEntry;
if (isFileAcceptable(yfile)) {
FileType fileType = createFileType(elementId, yfile);
currentFileGrp.getFiles().add(fileType);
}
}
}
}
代码示例来源:origin: pl.edu.icm.synat/synat-business-services-api
private List<ContentEntryData> translateContent(List<YContentEntry> contentList, Locale locale, String mainLevel) {
List<ContentEntryData> result = new ArrayList<ContentEntryData>();
for (YContentEntry<?> content : contentList) {
if (content instanceof YContentFile) {
YContentFile file = (YContentFile) content;
if (yModelPropertyExtractor.isFileAccepted(file, mainLevel)) {
result.add(new ContentFileData(file.getId(), YModelUtils.getDefaultName(file), fetchName(file.getFormat(), locale), yModelPropertyExtractor.prepareLocation(file.getLocations())));
}
} else if (content instanceof YContentDirectory) {
YContentDirectory dir = (YContentDirectory) content;
if (ContentTypes.CONTENT_PAGED.equals(dir.getType()) && findIfContentExists(dir.getEntries(), mainLevel)) {
result.add(new ContentDirectoryData(dir.getId(), getDirectoryName(dir), dir.getType(), fetchName(dir.getType(), locale)));
} else if(findIfContentExists(dir.getEntries(), mainLevel)) {
result.add(new ContentDirectoryData(dir.getId(), getDirectoryName(dir), dir.getType(), fetchName(dir.getType(), locale), translateContent(dir.getEntries(), locale, mainLevel)));
}
}
}
return result;
}
本文整理了Java中pl.edu.icm.yadda.service2.YaddaError类的一些代码示例,展示了YaddaError类的具体用法。这些代码示例主要来源于Github/Stackov
本文整理了Java中pl.edu.icm.yadda.common.YaddaException类的一些代码示例,展示了YaddaException类的具体用法。这些代码示例主要来源于Github/S
本文整理了Java中pl.edu.icm.ceon.commons.YaddaCollectionsUtils类的一些代码示例,展示了YaddaCollectionsUtils类的具体用法。这些代码示
本文整理了Java中pl.edu.icm.model.bwmeta.YElement类的一些代码示例,展示了YElement类的具体用法。这些代码示例主要来源于Github/Stackoverflow
本文整理了Java中pl.edu.icm.model.bwmeta.YContributor类的一些代码示例,展示了YContributor类的具体用法。这些代码示例主要来源于Github/Stack
本文整理了Java中pl.edu.icm.model.bwmeta.y.YContentFile类的一些代码示例,展示了YContentFile类的具体用法。这些代码示例主要来源于Github/Sta
本文整理了Java中pl.edu.icm.model.bwmeta.y.YDescription类的一些代码示例,展示了YDescription类的具体用法。这些代码示例主要来源于Github/Sta
本文整理了Java中pl.edu.icm.model.bwmeta.y.YCurrent类的一些代码示例,展示了YCurrent类的具体用法。这些代码示例主要来源于Github/Stackoverfl
本文整理了Java中pl.edu.icm.model.bwmeta.y.YName类的一些代码示例,展示了YName类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Mav
本文整理了Java中pl.edu.icm.model.bwmeta.y.YStructure类的一些代码示例,展示了YStructure类的具体用法。这些代码示例主要来源于Github/Stackov
本文整理了Java中pl.edu.icm.model.bwmeta.y.YElement类的一些代码示例,展示了YElement类的具体用法。这些代码示例主要来源于Github/Stackoverfl
本文整理了Java中pl.edu.icm.model.bwmeta.y.YCategoryRef类的一些代码示例,展示了YCategoryRef类的具体用法。这些代码示例主要来源于Github/Sta
本文整理了Java中pl.edu.icm.model.bwmeta.y.YContentDirectory类的一些代码示例,展示了YContentDirectory类的具体用法。这些代码示例主要来源于
本文整理了Java中pl.edu.icm.model.bwmeta.y.YContentEntry类的一些代码示例,展示了YContentEntry类的具体用法。这些代码示例主要来源于Github/S
本文整理了Java中pl.edu.icm.model.bwmeta.y.YId类的一些代码示例,展示了YId类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平
本文整理了Java中pl.edu.icm.model.bwmeta.y.YRelation类的一些代码示例,展示了YRelation类的具体用法。这些代码示例主要来源于Github/Stackover
本文整理了Java中pl.edu.icm.model.bwmeta.y.YAncestor类的一些代码示例,展示了YAncestor类的具体用法。这些代码示例主要来源于Github/Stackover
本文整理了Java中pl.edu.icm.model.bwmeta.y.YAffiliation类的一些代码示例,展示了YAffiliation类的具体用法。这些代码示例主要来源于Github/Sta
本文整理了Java中pl.edu.icm.model.bwmeta.y.YDate类的一些代码示例,展示了YDate类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Mav
本文整理了Java中pl.edu.icm.model.bwmeta.y.YLanguage类的一些代码示例,展示了YLanguage类的具体用法。这些代码示例主要来源于Github/Stackover
我是一名优秀的程序员,十分优秀!