Uses of Class
nl.siegmann.epublib.domain.Resource
-
Packages that use Resource Package Description nl.siegmann.epublib.bookprocessor The classes in this package are used for post-processing Books.nl.siegmann.epublib.browsersupport Provides classes that help make an epub reader application.nl.siegmann.epublib.domain nl.siegmann.epublib.epub nl.siegmann.epublib.search nl.siegmann.epublib.util nl.siegmann.epublib.viewer -
-
Uses of Resource in nl.siegmann.epublib.bookprocessor
Methods in nl.siegmann.epublib.bookprocessor that return Resource Modifier and Type Method Description private ResourceCoverpageBookProcessor. findCoverPage(Book book)private ResourceCoverpageBookProcessor. getFirstImageSource(Resource titlePageResource, Resources resources)Methods in nl.siegmann.epublib.bookprocessor with parameters of type Resource Modifier and Type Method Description private voidHtmlBookProcessor. cleanupResource(Resource resource, Book book)private voidCoverpageBookProcessor. fixCoverResourceId(Book book, Resource resource, java.lang.String defaultId)private java.lang.StringCoverpageBookProcessor. getCoverImageHref(Resource imageResource, Book book)private ResourceCoverpageBookProcessor. getFirstImageSource(Resource titlePageResource, Resources resources)protected abstract byte[]HtmlBookProcessor. processHtml(Resource resource, Book book, java.lang.String encoding)byte[]HtmlCleanerBookProcessor. processHtml(Resource resource, Book book, java.lang.String outputEncoding)byte[]TextReplaceBookProcessor. processHtml(Resource resource, Book book, java.lang.String outputEncoding)byte[]XslBookProcessor. processHtml(Resource resource, Book book, java.lang.String encoding) -
Uses of Resource in nl.siegmann.epublib.browsersupport
Fields in nl.siegmann.epublib.browsersupport declared as Resource Modifier and Type Field Description private ResourceNavigator. currentResourceprivate ResourceNavigationEvent. oldResourceMethods in nl.siegmann.epublib.browsersupport that return Resource Modifier and Type Method Description ResourceNavigationEvent. getCurrentResource()ResourceNavigator. getCurrentResource()ResourceNavigationEvent. getOldResource()Methods in nl.siegmann.epublib.browsersupport with parameters of type Resource Modifier and Type Method Description voidNavigationHistory. addLocation(Resource resource)intNavigator. gotoResource(Resource resource, int pagePos, java.lang.Object source)intNavigator. gotoResource(Resource resource, int pagePos, java.lang.String fragmentId, java.lang.Object source)intNavigator. gotoResource(Resource resource, java.lang.Object source)intNavigator. gotoResource(Resource resource, java.lang.String fragmentId, java.lang.Object source)intNavigator. setCurrentResource(Resource currentResource)Sets the current index and resource without calling the eventlisteners.voidNavigationEvent. setOldResource(Resource oldResource) -
Uses of Resource in nl.siegmann.epublib.domain
Subclasses of Resource in nl.siegmann.epublib.domain Modifier and Type Class Description classLazyResourceA Resource that loads its data only on-demand.Fields in nl.siegmann.epublib.domain declared as Resource Modifier and Type Field Description private ResourceBook. coverImageprivate ResourceBook. ncxResourceprivate ResourceBook. opfResourceprotected ResourceResourceReference. resourceprivate ResourceSpine. tocResourceFields in nl.siegmann.epublib.domain with type parameters of type Resource Modifier and Type Field Description private java.util.Map<java.lang.String,Resource>Resources. resourcesMethods in nl.siegmann.epublib.domain that return Resource Modifier and Type Method Description ResourceResources. add(Resource resource)Adds a resource to the resources.ResourceBook. addResource(Resource resource)static ResourceResources. findFirstResourceByMediaType(java.util.Collection<Resource> resources, MediaType mediaType)Gets the first resource (random order) with the give mediatype.ResourceResources. findFirstResourceByMediaType(MediaType mediaType)Gets the first resource (random order) with the give mediatype.ResourceResources. getByHref(java.lang.String href)Gets the resource with the given href.ResourceResources. getById(java.lang.String id)Gets the resource with the given id.ResourceResources. getByIdOrHref(java.lang.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.ResourceBook. getCoverImage()The book's cover image.ResourceBook. getCoverPage()The book's cover page as a Resource.ResourceGuide. getCoverPage()The coverpage of the book.ResourceBook. getNcxResource()ResourceBook. getOpfResource()ResourceResourceReference. getResource()ResourceSpine. getResource(int index)Gets the resource at the given index.ResourceSpine. getTocResource()The resource containing the XML for the tableOfContents.ResourceResources. remove(java.lang.String href)Remove the resource with the given href.Methods in nl.siegmann.epublib.domain that return types with arguments of type Resource Modifier and Type Method Description java.util.Collection<Resource>Resources. getAll()java.util.List<Resource>TableOfContents. getAllUniqueResources()All unique references (unique by href) in the order in which they are referenced to in the table of contents.java.util.List<Resource>Book. getContents()All Resources of the Book that can be reached via the Spine, the TableOfContents or the Guide.java.util.Map<java.lang.String,Resource>Resources. getResourceMap()The resources that make up this book.java.util.List<Resource>Resources. getResourcesByMediaType(MediaType mediaType)All resources that have the given MediaType.java.util.List<Resource>Resources. getResourcesByMediaTypes(MediaType[] mediaTypes)All Resources that match any of the given list of MediaTypesMethods in nl.siegmann.epublib.domain with parameters of type Resource Modifier and Type Method Description ResourceResources. add(Resource resource)Adds a resource to the resources.ResourceBook. addResource(Resource resource)SpineReferenceSpine. addResource(Resource resource)Adds the given resource to the spine references and returns it.TOCReferenceBook. addSection(java.lang.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.TOCReferenceBook. addSection(TOCReference parentSection, java.lang.String sectionTitle, Resource resource)Adds the resource to the table of contents of the book as a child section of the given parentSectionTOCReferenceTableOfContents. addSection(Resource resource, int[] pathElements, java.lang.String sectionTitlePrefix, java.lang.String sectionNumberSeparator)Adds the given Resources to the TableOfContents at the location specified by the pathElements.TOCReferenceTableOfContents. addSection(Resource resource, java.lang.String path)Calls addTOCReferenceAtLocation after splitting the path using the DEFAULT_PATH_SEPARATOR.TOCReferenceTableOfContents. addSection(Resource resource, java.lang.String[] pathElements)Adds the given Resources to the TableOfContents at the location specified by the pathElements.TOCReferenceTableOfContents. addSection(Resource resource, java.lang.String path, java.lang.String pathSeparator)Calls addTOCReferenceAtLocation after splitting the path using the given pathSeparator.private static voidBook. addToContentsResult(Resource resource, java.util.Map<java.lang.String,Resource> allReachableResources)private java.lang.StringResources. createUniqueResourceId(Resource resource)Creates a new resource id that is guaranteed to be unique for this set of Resourcesprivate voidResources. fixResourceHref(Resource resource)voidResources. fixResourceId(Resource resource)Checks the id of the given resource and changes to a unique identifier if it isn't one already.intSpine. getResourceIndex(Resource currentResource)The position within the spine of the given resource.private java.lang.StringResources. getResourceItemPrefix(Resource resource)private java.lang.StringResources. makeValidId(java.lang.String resourceId, Resource resource)Check if the id is a valid identifier.voidBook. setCoverImage(Resource coverImage)voidBook. setCoverPage(Resource coverPage)voidGuide. setCoverPage(Resource coverPage)voidBook. setNcxResource(Resource ncxResource)voidBook. setOpfResource(Resource opfResource)voidResourceReference. setResource(Resource resource)Besides setting the resource it also sets the fragmentId to null.voidTitledResourceReference. setResource(Resource resource)Sets the resource to the given resource and sets the fragmentId to null.voidTitledResourceReference. setResource(Resource resource, java.lang.String fragmentId)voidSpine. setTocResource(Resource tocResource)As per the epub file format the spine officially maintains a reference to the Table of Contents.Method parameters in nl.siegmann.epublib.domain with type arguments of type Resource Modifier and Type Method Description voidResources. addAll(java.util.Collection<Resource> resources)Adds all resources from the given Collection of resources to the existing collection.private static voidBook. addToContentsResult(Resource resource, java.util.Map<java.lang.String,Resource> allReachableResources)static java.util.List<SpineReference>Spine. createSpineReferences(java.util.Collection<Resource> resources)static ResourceResources. findFirstResourceByMediaType(java.util.Collection<Resource> resources, MediaType mediaType)Gets the first resource (random order) with the give mediatype.private static voidTableOfContents. getAllUniqueResources(java.util.Set<java.lang.String> uniqueHrefs, java.util.List<Resource> result, java.util.List<TOCReference> tocReferences)voidResources. set(java.util.Collection<Resource> resources)Sets the collection of Resources to the given collection of resourcesvoidResources. set(java.util.Map<java.lang.String,Resource> resources)Sets the collection of Resources to the given collection of resourcesConstructors in nl.siegmann.epublib.domain with parameters of type Resource Constructor Description GuideReference(Resource resource)GuideReference(Resource resource, java.lang.String title)GuideReference(Resource resource, java.lang.String type, java.lang.String title)GuideReference(Resource resource, java.lang.String type, java.lang.String title, java.lang.String fragmentId)ResourceReference(Resource resource)SpineReference(Resource resource)SpineReference(Resource resource, boolean linear)TitledResourceReference(Resource resource)TitledResourceReference(Resource resource, java.lang.String title)TitledResourceReference(Resource resource, java.lang.String title, java.lang.String fragmentId)TOCReference(java.lang.String name, Resource resource)TOCReference(java.lang.String name, Resource resource, java.lang.String fragmentId)TOCReference(java.lang.String title, Resource resource, java.lang.String fragmentId, java.util.List<TOCReference> children) -
Uses of Resource in nl.siegmann.epublib.epub
Methods in nl.siegmann.epublib.epub that return Resource Modifier and Type Method Description static ResourceNCXDocument. createNCXResource(java.util.List<Identifier> identifiers, java.lang.String title, java.util.List<Author> authors, TableOfContents tableOfContents)static ResourceNCXDocument. createNCXResource(Book book)(package private) static ResourcePackageDocumentReader. findTableOfContentsResource(java.lang.String tocResourceId, Resources resources)The spine tag should contain a 'toc' attribute with as value the resource id of the table of contents resource.private ResourceEpubReader. processNcxResource(Resource packageResource, Book book)private ResourceEpubReader. processPackageResource(java.lang.String packageResourceHref, Book book, Resources resources)static ResourceNCXDocument. read(Book book, EpubReader epubReader)Methods in nl.siegmann.epublib.epub that return types with arguments of type Resource Modifier and Type Method Description private static java.util.List<Resource>PackageDocumentWriter. getAllResourcesSortById(Book book)Methods in nl.siegmann.epublib.epub with parameters of type Resource Modifier and Type Method Description voidHtmlProcessor. processHtmlResource(Resource resource, java.io.OutputStream out)private ResourceEpubReader. processNcxResource(Resource packageResource, Book book)static voidPackageDocumentReader. read(Resource packageResource, EpubReader epubReader, Book book, Resources resources)private static voidPackageDocumentWriter. writeItem(Book book, Resource resource, org.xmlpull.v1.XmlSerializer serializer)Writes a resources as an item elementprivate voidEpubWriter. writeResource(Resource resource, java.util.zip.ZipOutputStream resultStream)Writes the resource to the resultStream. -
Uses of Resource in nl.siegmann.epublib.search
Fields in nl.siegmann.epublib.search declared as Resource Modifier and Type Field Description private ResourceResourceSearchIndex. resourceprivate ResourceSearchIndex.ResourceSearchIndex. resourceprivate ResourceSearchResult. resourceMethods in nl.siegmann.epublib.search that return Resource Modifier and Type Method Description ResourceResourceSearchIndex. getResource()ResourceSearchIndex.ResourceSearchIndex. getResource()ResourceSearchResult. getResource()Methods in nl.siegmann.epublib.search with parameters of type Resource Modifier and Type Method Description private static SearchIndex.ResourceSearchIndexSearchIndex. createResourceSearchIndex(Resource resource)protected static java.util.List<SearchResult>SearchIndex. doSearch(java.lang.String searchTerm, java.lang.String content, Resource resource)static java.lang.StringSearchIndex. getSearchContent(Resource resource)Constructors in nl.siegmann.epublib.search with parameters of type Resource Constructor Description ResourceSearchIndex(Resource resource, java.lang.String searchContent)ResourceSearchIndex(Resource resource, java.lang.String searchContent)SearchResult(int pagePos, java.lang.String searchTerm, Resource resource) -
Uses of Resource in nl.siegmann.epublib.util
Methods in nl.siegmann.epublib.util that return Resource Modifier and Type Method Description static ResourceResourceUtil. createResource(java.io.File file)static ResourceResourceUtil. createResource(java.lang.String title, java.lang.String href)Creates a resource with as contents a html page with the given title.static ResourceResourceUtil. createResource(ZipEntry zipEntry, java.io.InputStream zipInputStream)static ResourceResourceUtil. createResource(ZipEntry zipEntry, ZipInputStream zipInputStream)Creates a resource out of the given zipEntry and zipInputStream.static ResourceVFSUtil. createResource(org.apache.commons.vfs2.FileObject rootDir, org.apache.commons.vfs2.FileObject file, java.lang.String inputEncoding)Methods in nl.siegmann.epublib.util with parameters of type Resource Modifier and Type Method Description static java.lang.StringToolsResourceUtil. findTitleFromXhtml(Resource resource)Retrieves whatever it finds between <title>...</title> or <h1-7>...</h1-7>.static org.w3c.dom.DocumentResourceUtil. getAsDocument(Resource resource)Reads parses the xml therein and returns the result as a Documentstatic org.w3c.dom.DocumentResourceUtil. getAsDocument(Resource resource, javax.xml.parsers.DocumentBuilder documentBuilder)Reads the given resources inputstream, parses the xml therein and returns the result as a Documentstatic org.xml.sax.InputSourceResourceUtil. getInputSource(Resource resource)Gets the contents of the Resource as an InputSource in a null-safe manner.static java.lang.StringToolsResourceUtil. getTitle(Resource resource) -
Uses of Resource in nl.siegmann.epublib.viewer
Fields in nl.siegmann.epublib.viewer declared as Resource Modifier and Type Field Description private ResourceContentPane. currentResourceMethods in nl.siegmann.epublib.viewer with parameters of type Resource Modifier and Type Method Description private voidTableOfContentsPane. addToHref2TreeNode(Resource resource, javax.swing.tree.DefaultMutableTreeNode treeNode)private javax.swing.text.html.HTMLDocumentHTMLDocumentFactory. createDocument(Resource resource)Creates a swing HTMLDocument from the given resource.private java.awt.ImageImageLoaderCache. createImage(Resource imageResource)Create an Image from the data of the given resource.voidContentPane. displayPage(Resource resource)voidContentPane. displayPage(Resource resource, int sectionPos)javax.swing.text.html.HTMLDocumentHTMLDocumentFactory. getDocument(Resource resource)Get the HTMLDocument representation of the resource.private voidHTMLDocumentFactory. putDocument(Resource resource, javax.swing.text.html.HTMLDocument document)voidImageLoaderCache. setContextResource(Resource resource)
-