C# Класс nl.siegmann.epublib.domain.Book

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
addToContentsResult ( Resource resource, Resource>.Dictionary allReachableResources ) : void

Описание методов

addResource() публичный Метод

public addResource ( Resource resource ) : Resource
resource Resource
Результат Resource

addSection() публичный Метод

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
Результат TOCReference

addSection() публичный Метод

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
Результат TOCReference

generateSpineFromTableOfContents() публичный Метод

public generateSpineFromTableOfContents ( ) : void
Результат void

getContents() публичный Метод

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
Результат List

getCoverImage() публичный Метод

The book's cover image.
public getCoverImage ( ) : Resource
Результат Resource

getCoverPage() публичный Метод

The book's cover page. An XHTML document containing a link to the cover image.
public getCoverPage ( ) : Resource
Результат Resource

getGuide() публичный Метод

The guide; contains references to special sections of the book like colophon, glossary, etc.
public getGuide ( ) : Guide
Результат Guide

getMetadata() публичный Метод

The Book's metadata (titles, authors, etc)
public getMetadata ( ) : Metadata
Результат Metadata

getNcxResource() публичный Метод

public getNcxResource ( ) : Resource
Результат Resource

getOpfResource() публичный Метод

public getOpfResource ( ) : Resource
Результат Resource

getResources() публичный Метод

The collection of all images, chapters, sections, xhtml files, stylesheets, etc that make up the book.
public getResources ( ) : Resources
Результат Resources

getSpine() публичный Метод

The sections of the book that should be shown if a user reads the book from start to finish.
public getSpine ( ) : Spine
Результат Spine

getTableOfContents() публичный Метод

The Table of Contents of the book.
public getTableOfContents ( ) : TableOfContents
Результат TableOfContents

getTitle() публичный Метод

Gets the first non-blank title from the book's metadata.
public getTitle ( ) : string
Результат string

setCoverImage() публичный Метод

public setCoverImage ( Resource coverImage ) : void
coverImage Resource
Результат void

setCoverPage() публичный Метод

public setCoverPage ( Resource coverPage ) : void
coverPage Resource
Результат void

setMetadata() публичный Метод

public setMetadata ( Metadata metadata ) : void
metadata Metadata
Результат void

setNcxResource() публичный Метод

public setNcxResource ( Resource ncxResource ) : void
ncxResource Resource
Результат void

setOpfResource() публичный Метод

public setOpfResource ( Resource opfResource ) : void
opfResource Resource
Результат void

setResources() публичный Метод

public setResources ( Resources resources ) : void
resources Resources
Результат void

setSpine() публичный Метод

public setSpine ( Spine spine ) : void
spine Spine
Результат void

setTableOfContents() публичный Метод

public setTableOfContents ( TableOfContents tableOfContents ) : void
tableOfContents TableOfContents
Результат void