Package | Description |
---|---|
nl.siegmann.epublib.browsersupport |
Provides classes that help make an epub reader application.
|
nl.siegmann.epublib.domain | |
nl.siegmann.epublib.epub | |
nl.siegmann.epublib.util |
Modifier and Type | Method and Description |
---|---|
Resource |
Navigator.getCurrentResource() |
Resource |
NavigationEvent.getCurrentResource() |
Resource |
NavigationEvent.getOldResource() |
Modifier and Type | Method and Description |
---|---|
void |
NavigationHistory.addLocation(Resource resource) |
int |
Navigator.gotoResource(Resource resource,
int pagePos,
Object source) |
int |
Navigator.gotoResource(Resource resource,
int pagePos,
String fragmentId,
Object source) |
int |
Navigator.gotoResource(Resource resource,
Object source) |
int |
Navigator.gotoResource(Resource resource,
String fragmentId,
Object source) |
int |
Navigator.setCurrentResource(Resource currentResource)
Sets the current index and resource without calling the eventlisteners.
|
void |
NavigationEvent.setOldResource(Resource oldResource) |
Modifier and Type | Class and Description |
---|---|
class |
LazyResource
A Resource that loads its data only on-demand.
|
Modifier and Type | Field and Description |
---|---|
protected Resource |
ResourceReference.resource |
Modifier and Type | Method and Description |
---|---|
Resource |
Resources.add(Resource resource)
Adds a resource to the resources.
|
Resource |
Book.addResource(Resource resource) |
static Resource |
Resources.findFirstResourceByMediaType(Collection<Resource> resources,
MediaType mediaType)
Gets the first resource (random order) with the give mediatype.
|
Resource |
Resources.findFirstResourceByMediaType(MediaType mediaType)
Gets the first resource (random order) with the give mediatype.
|
Resource |
Resources.getByHref(String href)
Gets the resource with the given href.
|
Resource |
Resources.getById(String id)
Gets the resource with the given id.
|
Resource |
Resources.getByIdOrHref(String idOrHref)
First tries to find a resource with as id the given idOrHref, if that
fails it tries to find one with the idOrHref as href.
|
Resource |
Book.getCoverImage()
The book's cover image.
|
Resource |
Guide.getCoverPage()
The coverpage of the book.
|
Resource |
Book.getCoverPage()
The book's cover page as a Resource.
|
Resource |
Book.getNcxResource() |
Resource |
Book.getOpfResource() |
Resource |
ResourceReference.getResource() |
Resource |
Spine.getResource(int index)
Gets the resource at the given index.
|
Resource |
Spine.getTocResource()
The resource containing the XML for the tableOfContents.
|
Resource |
Resources.remove(String href)
Remove the resource with the given href.
|
Modifier and Type | Method and Description |
---|---|
Collection<Resource> |
Resources.getAll() |
List<Resource> |
TableOfContents.getAllUniqueResources()
All unique references (unique by href) in the order in which they are referenced to in the table of contents.
|
List<Resource> |
Book.getContents()
All Resources of the Book that can be reached via the Spine, the TableOfContents or the Guide.
|
Map<String,Resource> |
Resources.getResourceMap()
The resources that make up this book.
|
List<Resource> |
Resources.getResourcesByMediaType(MediaType mediaType)
All resources that have the given MediaType.
|
List<Resource> |
Resources.getResourcesByMediaTypes(MediaType[] mediaTypes)
All Resources that match any of the given list of MediaTypes
|
Modifier and Type | Method and Description |
---|---|
Resource |
Resources.add(Resource resource)
Adds a resource to the resources.
|
SpineReference |
Spine.addResource(Resource resource)
Adds the given resource to the spine references and returns it.
|
Resource |
Book.addResource(Resource resource) |
TOCReference |
TableOfContents.addSection(Resource resource,
int[] pathElements,
String sectionTitlePrefix,
String sectionNumberSeparator)
Adds the given Resources to the TableOfContents at the location specified by the pathElements.
|
TOCReference |
TableOfContents.addSection(Resource resource,
String path)
Calls addTOCReferenceAtLocation after splitting the path using the DEFAULT_PATH_SEPARATOR.
|
TOCReference |
TableOfContents.addSection(Resource resource,
String[] pathElements)
Adds the given Resources to the TableOfContents at the location specified by the pathElements.
|
TOCReference |
TableOfContents.addSection(Resource resource,
String path,
String pathSeparator)
Calls addTOCReferenceAtLocation after splitting the path using the given pathSeparator.
|
TOCReference |
Book.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 |
Book.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 |
Resources.fixResourceId(Resource resource)
Checks the id of the given resource and changes to a unique identifier if it isn't one already.
|
int |
Spine.getResourceIndex(Resource currentResource)
The position within the spine of the given resource.
|
void |
Book.setCoverImage(Resource coverImage) |
void |
Guide.setCoverPage(Resource coverPage) |
void |
Book.setCoverPage(Resource coverPage) |
void |
Book.setNcxResource(Resource ncxResource) |
void |
Book.setOpfResource(Resource opfResource) |
void |
TitledResourceReference.setResource(Resource resource)
Sets the resource to the given resource and sets the fragmentId to null.
|
void |
ResourceReference.setResource(Resource resource)
Besides setting the resource it also sets the fragmentId to null.
|
void |
TitledResourceReference.setResource(Resource resource,
String fragmentId) |
void |
Spine.setTocResource(Resource tocResource)
As per the epub file format the spine officially maintains a reference to the Table of Contents.
|
Modifier and Type | Method and Description |
---|---|
void |
Resources.addAll(Collection<Resource> resources)
Adds all resources from the given Collection of resources to the existing collection.
|
static List<SpineReference> |
Spine.createSpineReferences(Collection<Resource> resources) |
static Resource |
Resources.findFirstResourceByMediaType(Collection<Resource> resources,
MediaType mediaType)
Gets the first resource (random order) with the give mediatype.
|
void |
Resources.set(Collection<Resource> resources)
Sets the collection of Resources to the given collection of resources
|
void |
Resources.set(Map<String,Resource> resources)
Sets the collection of Resources to the given collection of resources
|
Constructor and Description |
---|
GuideReference(Resource resource) |
GuideReference(Resource resource,
String title) |
GuideReference(Resource resource,
String type,
String title) |
GuideReference(Resource resource,
String type,
String title,
String fragmentId) |
ResourceReference(Resource resource) |
SpineReference(Resource resource) |
SpineReference(Resource resource,
boolean linear) |
TitledResourceReference(Resource resource) |
TitledResourceReference(Resource resource,
String title) |
TitledResourceReference(Resource resource,
String title,
String fragmentId) |
TOCReference(String name,
Resource resource) |
TOCReference(String name,
Resource resource,
String fragmentId) |
TOCReference(String title,
Resource resource,
String fragmentId,
List<TOCReference> children) |
Modifier and Type | Method and Description |
---|---|
static Resource |
NCXDocument.createNCXResource(Book book) |
static Resource |
NCXDocument.createNCXResource(List<Identifier> identifiers,
String title,
List<Author> authors,
TableOfContents tableOfContents) |
static Resource |
NCXDocument.read(Book book,
EpubReader epubReader) |
Modifier and Type | Method and Description |
---|---|
void |
HtmlProcessor.processHtmlResource(Resource resource,
OutputStream out) |
static void |
PackageDocumentReader.read(Resource packageResource,
EpubReader epubReader,
Book book,
Resources resources) |
Modifier and Type | Method and Description |
---|---|
static Resource |
ResourceUtil.createResource(File file) |
static Resource |
ResourceUtil.createResource(String title,
String href)
Creates a resource with as contents a html page with the given title.
|
static Resource |
ResourceUtil.createResource(ZipEntry zipEntry,
InputStream zipInputStream) |
static Resource |
ResourceUtil.createResource(ZipEntry zipEntry,
ZipInputStream zipInputStream)
Creates a resource out of the given zipEntry and zipInputStream.
|
Modifier and Type | Method and Description |
---|---|
static Document |
ResourceUtil.getAsDocument(Resource resource)
Reads parses the xml therein and returns the result as a Document
|
static Document |
ResourceUtil.getAsDocument(Resource resource,
DocumentBuilder documentBuilder)
Reads the given resources inputstream, parses the xml therein and returns the result as a Document
|
static InputSource |
ResourceUtil.getInputSource(Resource resource)
Gets the contents of the Resource as an InputSource in a null-safe manner.
|
Copyright © 2009–2017. All rights reserved.