public class Book extends Object implements Serializable
Constructor and Description |
---|
Book() |
Modifier and Type | Method and Description |
---|---|
Resource |
addResource(Resource resource) |
TOCReference |
addSection(String title,
Resource resource)
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.
|
TOCReference |
addSection(TOCReference parentSection,
String sectionTitle,
Resource resource)
Adds the resource to the table of contents of the book as a child section of the given parentSection
|
void |
generateSpineFromTableOfContents() |
List<Resource> |
getContents()
All Resources of the Book that can be reached via the Spine, the TableOfContents or the Guide.
|
Resource |
getCoverImage()
The book's cover image.
|
Resource |
getCoverPage()
The book's cover page as a Resource.
|
Guide |
getGuide()
The guide; contains references to special sections of the book like colophon, glossary, etc.
|
Metadata |
getMetadata()
The Book's metadata (titles, authors, etc)
|
Resource |
getNcxResource() |
Resource |
getOpfResource() |
Resources |
getResources()
The collection of all images, chapters, sections, xhtml files, stylesheets, etc that make up the book.
|
Spine |
getSpine()
The sections of the book that should be shown if a user reads the book from start to finish.
|
TableOfContents |
getTableOfContents()
The Table of Contents of the book.
|
String |
getTitle()
Gets the first non-blank title from the book's metadata.
|
void |
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) |
public TOCReference addSection(TOCReference parentSection, String sectionTitle, Resource resource)
parentSection
- sectionTitle
- resource
- public void generateSpineFromTableOfContents()
public TOCReference addSection(String title, Resource resource)
title
- resource
- public Metadata getMetadata()
public void setMetadata(Metadata metadata)
public void setResources(Resources resources)
public Resources getResources()
public Spine getSpine()
public void setSpine(Spine spine)
public TableOfContents getTableOfContents()
public void setTableOfContents(TableOfContents tableOfContents)
public Resource getCoverPage()
public void setCoverPage(Resource coverPage)
public String getTitle()
public Resource getCoverImage()
public void setCoverImage(Resource coverImage)
public Guide getGuide()
public List<Resource> getContents()
getResources()
public Resource getOpfResource()
public void setOpfResource(Resource opfResource)
public void setNcxResource(Resource ncxResource)
public Resource getNcxResource()
Copyright © 2009–2013. All rights reserved.