C# Class nl.siegmann.epublib.domain.Book

Afficher le fichier Open project: lanfengqi/EpubLib-Sharp Class Usage Examples

Méthodes publiques

Méthode Description
addResource ( Resource resource ) : Resource
addSection ( TOCReference parentSection, string sectionTitle, Resource resource ) : TOCReference

Adds the resource to the table of contents of the book as a child section of the given parentSection

addSection ( string title, Resource resource ) : TOCReference

Adds a resource to the book's set of resources, table of contents and if there is no resource with the id in the spine also adds it to the spine.

generateSpineFromTableOfContents ( ) : void
getContents ( ) : List

All Resources of the Book that can be reached via the Spine, the TableOfContents or the Guide.

Consists of a list of "reachable" resources:

  • The coverpage
  • The resources of the Spine that are not already in the result
  • The resources of the Table of Contents that are not already in the result
  • The resources of the Guide that are not already in the result
To get all html files that make up the epub file use

getCoverImage ( ) : Resource

The book's cover image.

getCoverPage ( ) : Resource

The book's cover page. An XHTML document containing a link to the cover image.

getGuide ( ) : Guide

The guide; contains references to special sections of the book like colophon, glossary, etc.

getMetadata ( ) : Metadata

The Book's metadata (titles, authors, etc)

getNcxResource ( ) : Resource
getOpfResource ( ) : Resource
getResources ( ) : Resources

The collection of all images, chapters, sections, xhtml files, stylesheets, etc that make up the book.

getSpine ( ) : Spine

The sections of the book that should be shown if a user reads the book from start to finish.

getTableOfContents ( ) : TableOfContents

The Table of Contents of the book.

getTitle ( ) : string

Gets the first non-blank title from the book's metadata.

setCoverImage ( Resource coverImage ) : void
setCoverPage ( Resource coverPage ) : void
setMetadata ( Metadata metadata ) : void
setNcxResource ( Resource ncxResource ) : void
setOpfResource ( Resource opfResource ) : void
setResources ( Resources resources ) : void
setSpine ( Spine spine ) : void
setTableOfContents ( TableOfContents tableOfContents ) : void

Private Methods

Méthode Description
addToContentsResult ( Resource resource, Resource>.Dictionary allReachableResources ) : void

Method Details

addResource() public méthode

public addResource ( Resource resource ) : Resource
resource Resource
Résultat Resource

addSection() public méthode

Adds the resource to the table of contents of the book as a child section of the given parentSection
public addSection ( TOCReference parentSection, string sectionTitle, Resource resource ) : TOCReference
parentSection TOCReference
sectionTitle string
resource Resource
Résultat TOCReference

addSection() public méthode

Adds a resource to the book's set of resources, table of contents and if there is no resource with the id in the spine also adds it to the spine.
public addSection ( string title, Resource resource ) : TOCReference
title string
resource Resource
Résultat TOCReference

generateSpineFromTableOfContents() public méthode

public generateSpineFromTableOfContents ( ) : void
Résultat void

getContents() public méthode

All Resources of the Book that can be reached via the Spine, the TableOfContents or the Guide.

Consists of a list of "reachable" resources:

  • The coverpage
  • The resources of the Spine that are not already in the result
  • The resources of the Table of Contents that are not already in the result
  • The resources of the Guide that are not already in the result
To get all html files that make up the epub file use
public getContents ( ) : List
Résultat List

getCoverImage() public méthode

The book's cover image.
public getCoverImage ( ) : Resource
Résultat Resource

getCoverPage() public méthode

The book's cover page. An XHTML document containing a link to the cover image.
public getCoverPage ( ) : Resource
Résultat Resource

getGuide() public méthode

The guide; contains references to special sections of the book like colophon, glossary, etc.
public getGuide ( ) : Guide
Résultat Guide

getMetadata() public méthode

The Book's metadata (titles, authors, etc)
public getMetadata ( ) : Metadata
Résultat Metadata

getNcxResource() public méthode

public getNcxResource ( ) : Resource
Résultat Resource

getOpfResource() public méthode

public getOpfResource ( ) : Resource
Résultat Resource

getResources() public méthode

The collection of all images, chapters, sections, xhtml files, stylesheets, etc that make up the book.
public getResources ( ) : Resources
Résultat Resources

getSpine() public méthode

The sections of the book that should be shown if a user reads the book from start to finish.
public getSpine ( ) : Spine
Résultat Spine

getTableOfContents() public méthode

The Table of Contents of the book.
public getTableOfContents ( ) : TableOfContents
Résultat TableOfContents

getTitle() public méthode

Gets the first non-blank title from the book's metadata.
public getTitle ( ) : string
Résultat string

setCoverImage() public méthode

public setCoverImage ( Resource coverImage ) : void
coverImage Resource
Résultat void

setCoverPage() public méthode

public setCoverPage ( Resource coverPage ) : void
coverPage Resource
Résultat void

setMetadata() public méthode

public setMetadata ( Metadata metadata ) : void
metadata Metadata
Résultat void

setNcxResource() public méthode

public setNcxResource ( Resource ncxResource ) : void
ncxResource Resource
Résultat void

setOpfResource() public méthode

public setOpfResource ( Resource opfResource ) : void
opfResource Resource
Résultat void

setResources() public méthode

public setResources ( Resources resources ) : void
resources Resources
Résultat void

setSpine() public méthode

public setSpine ( Spine spine ) : void
spine Spine
Résultat void

setTableOfContents() public méthode

public setTableOfContents ( TableOfContents tableOfContents ) : void
tableOfContents TableOfContents
Résultat void