C# 클래스 nl.siegmann.epublib.epub.PackageDocumentReader

Reads the opf package document as defined by namespace http://www.idpf. org/2007/opf
상속: PackageDocumentBase
파일 보기 프로젝트 열기: lanfengqi/EpubLib-Sharp 1 사용 예제들

공개 메소드들

메소드 설명
read ( Resource packageResource, EpubReader epubReader, Book book, Resources resources ) : void

비공개 메소드들

메소드 설명
findCoverHrefs ( System.Xml.Linq.XElement packageDocument ) : List

package

findTableOfContentsResource ( System.Xml.Linq.XElement spineElement, Resources resources ) : Resource

The spine tag should contain a 'toc' attribute with as value the resource id of the table of contents resource. Here we try several ways of finding this table of contents resource. We try the given attribute value, some often-used ones and finally look through all resources for the first resource with the table of contents mimetype.

fixHrefs ( String packageHref, Resources resourcesByHref ) : Resources

Strips off the package prefixes up to the href of the packageHref. Example: If the packageHref is "OEBPS/content.opf" then a resource href like "OEBPS/foo/bar. html" will be turned into "foo/bar.html"

generateSpineFromResources ( Resources resources ) : Spine

Creates a spine out of all resources in the resources. The generated spine consists of all XHTML pages in order of their href.

readCover ( System.Xml.Linq.XElement packageDocument, Book book ) : void

Finds the cover resource in the packageDocument and adds it to the book if found. Keeps the cover resource in the resources map

readGuide ( System.Xml.Linq.XElement packageDocument, EpubReader epubReader, Book book, Resources resources ) : void

Reads the book's guide. Here some more attempts are made at finding the cover page.

readManifest ( System.Xml.Linq.XElement packageDocument, String packageHref, EpubReader epubReader, Resources resources, String>.Dictionary idMapping ) : Resources

Reads the manifest containing the resource ids, hrefs and mediatypes.

readSpine ( System.Xml.Linq.XElement packageDocument, EpubReader epubReader, Resources resources, String>.Dictionary idMapping ) : Spine

Reads the document's spine, containing all sections in reading order.

메소드 상세

read() 공개 정적인 메소드

public static read ( Resource packageResource, EpubReader epubReader, Book book, Resources resources ) : void
packageResource nl.siegmann.epublib.domain.Resource
epubReader EpubReader
book nl.siegmann.epublib.domain.Book
resources nl.siegmann.epublib.domain.Resources
리턴 void