setCoverPage() public méthode

public setCoverPage ( Resource coverPage ) : void
coverPage Resource
Résultat void
        /// 
        /// <param name="packageResource"></param>
        /// <param name="epubReader"></param>
        /// <param name="book"></param>
        /// <param name="resources"></param>
        public static void read(Resource packageResource, EpubReader epubReader, Book book, Resources resources)
        {
            XElement packageDocument = XElement.Load(packageResource.getInputStream());
            String packageHref = packageResource.getHref();
            resources = fixHrefs(packageHref, resources);
            readGuide(packageDocument, epubReader, book, resources);
            System.Collections.Generic.Dictionary<string, string> idMapping = new Dictionary<string, string>();
            resources = readManifest(packageDocument, packageHref, epubReader, resources, idMapping);

            book.setResources(resources);
            readCover(packageDocument, book);
            //  book.setMetadata(PackageDocumentMetadataReader.readMetadata(packageDocument, book.getResources()));
            book.setSpine(readSpine(packageDocument, epubReader, book.getResources(), idMapping));

            // if we did not find a cover page then we make the first page of the book the cover page
            if (book.getCoverPage() == null && book.getSpine().size() > 0)
            {
                book.setCoverPage(book.getSpine().getResource(0));
            }
        }
 /// <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);
         }
     }
 }