public setCoverImage ( |
||
coverImage | ||
리턴 | void |
/// <summary> /// Finds the cover resource in the packageDocument and adds it to the book if /// found. Keeps the cover resource in the resources map /// </summary> /// <param>resources</param> /// <param name="packageDocument"></param> /// <param name="book"></param> private static void readCover(XElement packageDocument, Book book) { List<String> coverHrefs = findCoverHrefs(packageDocument); foreach (String coverHref in coverHrefs) { Resource resource = book.getResources().getByHref(coverHref); if (resource == null) { //log.error("Cover resource " + coverHref + " not found"); continue; } if (resource.getMediaType() == MediatypeService.XHTML) { book.setCoverPage(resource); } else if (MediatypeService.isBitmapImage(resource.getMediaType())) { book.setCoverImage(resource); } } }