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

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

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

Метод Описание
Spine ( ) : System
Spine ( List spineReferences ) : System
Spine ( TableOfContents tableOfContents ) : System

Creates a spine out of all the resources in the table of contents.

addResource ( Resource resource ) : SpineReference

Adds the given resource to the spine references and returns it.

addSpineReference ( SpineReference spineReference ) : SpineReference

Adds the given spineReference to the spine references and returns it.

createSpineReferences ( List resources ) : List
findFirstResourceById ( string resourceId ) : int

Finds the first resource that has the given resourceId. Null if not found.

getResource ( int index ) : Resource

Gets the resource at the given index. Null if not found.

getResourceIndex ( Resource currentResource ) : int

The position within the spine of the given resource.

getResourceIndex ( string resourceHref ) : int

The first position within the spine of a resource with the given href.

getSpineReferences ( ) : List
getTocResource ( ) : Resource

The resource containing the XML for the tableOfContents. When saving an epub file this resource needs to be in this place.

isEmpty ( ) : bool
setSpineReferences ( List spineReferences ) : void
setTocResource ( Resource tocResource ) : void

As per the epub file format the spine officially maintains a reference to the Table of Contents. The epubwriter will look for it here first, followed by some clever tricks to find it elsewhere if not found. Put it here to be sure of the expected behaviours.

size ( ) : int

The number of elements in the spine.

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

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

public Spine ( ) : System
Результат System

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

public Spine ( List spineReferences ) : System
spineReferences List
Результат System

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

Creates a spine out of all the resources in the table of contents.
public Spine ( TableOfContents tableOfContents ) : System
tableOfContents TableOfContents tableOfContents
Результат System

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

Adds the given resource to the spine references and returns it.
public addResource ( Resource resource ) : SpineReference
resource Resource
Результат SpineReference

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

Adds the given spineReference to the spine references and returns it.
public addSpineReference ( SpineReference spineReference ) : SpineReference
spineReference SpineReference
Результат SpineReference

createSpineReferences() публичный статический Метод

public static createSpineReferences ( List resources ) : List
resources List
Результат List

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

Finds the first resource that has the given resourceId. Null if not found.
public findFirstResourceById ( string resourceId ) : int
resourceId string
Результат int

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

Gets the resource at the given index. Null if not found.
public getResource ( int index ) : Resource
index int
Результат Resource

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

The position within the spine of the given resource.
public getResourceIndex ( Resource currentResource ) : int
currentResource Resource
Результат int

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

The first position within the spine of a resource with the given href.
public getResourceIndex ( string resourceHref ) : int
resourceHref string
Результат int

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

public getSpineReferences ( ) : List
Результат List

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

The resource containing the XML for the tableOfContents. When saving an epub file this resource needs to be in this place.
public getTocResource ( ) : Resource
Результат Resource

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

public isEmpty ( ) : bool
Результат bool

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

public setSpineReferences ( List spineReferences ) : void
spineReferences List
Результат void

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

As per the epub file format the spine officially maintains a reference to the Table of Contents. The epubwriter will look for it here first, followed by some clever tricks to find it elsewhere if not found. Put it here to be sure of the expected behaviours.
public setTocResource ( Resource tocResource ) : void
tocResource Resource tocResource
Результат void

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

The number of elements in the spine.
public size ( ) : int
Результат int