Uses of Class
nl.siegmann.epublib.domain.Resource
Packages that use Resource
Package
Description
The classes in this package are used for post-processing Books.
Provides classes that help make an epub reader application.
-
Uses of Resource in nl.siegmann.epublib.bookprocessor
Methods in nl.siegmann.epublib.bookprocessor that return ResourceModifier and TypeMethodDescriptionprivate ResourceCoverpageBookProcessor.findCoverPage(Book book) private ResourceCoverpageBookProcessor.getFirstImageSource(Resource titlePageResource, Resources resources) Methods in nl.siegmann.epublib.bookprocessor with parameters of type ResourceModifier and TypeMethodDescriptionprivate voidHtmlBookProcessor.cleanupResource(Resource resource, Book book) private voidCoverpageBookProcessor.fixCoverResourceId(Book book, Resource resource, String defaultId) private StringCoverpageBookProcessor.getCoverImageHref(Resource imageResource, Book book) private ResourceCoverpageBookProcessor.getFirstImageSource(Resource titlePageResource, Resources resources) protected abstract byte[]HtmlBookProcessor.processHtml(Resource resource, Book book, String encoding) byte[]HtmlCleanerBookProcessor.processHtml(Resource resource, Book book, String outputEncoding) byte[]TextReplaceBookProcessor.processHtml(Resource resource, Book book, String outputEncoding) byte[]XslBookProcessor.processHtml(Resource resource, Book book, String encoding) -
Uses of Resource in nl.siegmann.epublib.browsersupport
Fields in nl.siegmann.epublib.browsersupport declared as ResourceModifier and TypeFieldDescriptionprivate ResourceNavigator.currentResourceprivate ResourceNavigationEvent.oldResourceMethods in nl.siegmann.epublib.browsersupport that return ResourceModifier and TypeMethodDescriptionNavigationEvent.getCurrentResource()Navigator.getCurrentResource()NavigationEvent.getOldResource()Methods in nl.siegmann.epublib.browsersupport with parameters of type ResourceModifier and TypeMethodDescriptionvoidNavigationHistory.addLocation(Resource resource) intNavigator.gotoResource(Resource resource, int pagePos, Object source) intNavigator.gotoResource(Resource resource, int pagePos, String fragmentId, Object source) intNavigator.gotoResource(Resource resource, Object source) intNavigator.gotoResource(Resource resource, String fragmentId, 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.domainModifier and TypeClassDescriptionclassA Resource that loads its data only on-demand.Fields in nl.siegmann.epublib.domain declared as ResourceModifier and TypeFieldDescriptionprivate ResourceBook.coverImageprivate ResourceBook.ncxResourceprivate ResourceBook.opfResourceprotected ResourceResourceReference.resourceprivate ResourceSpine.tocResourceFields in nl.siegmann.epublib.domain with type parameters of type ResourceMethods in nl.siegmann.epublib.domain that return ResourceModifier and TypeMethodDescriptionAdds a resource to the resources.Book.addResource(Resource resource) static ResourceResources.findFirstResourceByMediaType(Collection<Resource> resources, MediaType mediaType) Gets the first resource (random order) with the give mediatype.Resources.findFirstResourceByMediaType(MediaType mediaType) Gets the first resource (random order) with the give mediatype.Gets the resource with the given href.Gets the resource with the given id.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.Book.getCoverImage()The book's cover image.Book.getCoverPage()The book's cover page as a Resource.Guide.getCoverPage()The coverpage of the book.Book.getNcxResource()Book.getOpfResource()ResourceReference.getResource()Spine.getResource(int index) Gets the resource at the given index.Spine.getTocResource()The resource containing the XML for the tableOfContents.Remove the resource with the given href.Methods in nl.siegmann.epublib.domain that return types with arguments of type ResourceModifier and TypeMethodDescriptionResources.getAll()TableOfContents.getAllUniqueResources()All unique references (unique by href) in the order in which they are referenced to in the table of contents.Book.getContents()All Resources of the Book that can be reached via the Spine, the TableOfContents or the Guide.Resources.getResourceMap()The resources that make up this book.Resources.getResourcesByMediaType(MediaType mediaType) All resources that have the given MediaType.Resources.getResourcesByMediaTypes(MediaType[] mediaTypes) All Resources that match any of the given list of MediaTypesMethods in nl.siegmann.epublib.domain with parameters of type ResourceModifier and TypeMethodDescriptionAdds a resource to the resources.Book.addResource(Resource resource) Spine.addResource(Resource resource) Adds the given resource to the spine references and returns it.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.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 parentSectionTableOfContents.addSection(Resource resource, int[] pathElements, String sectionTitlePrefix, String sectionNumberSeparator) Adds the given Resources to the TableOfContents at the location specified by the pathElements.TableOfContents.addSection(Resource resource, String path) Calls addTOCReferenceAtLocation after splitting the path using the DEFAULT_PATH_SEPARATOR.TableOfContents.addSection(Resource resource, String[] pathElements) Adds the given Resources to the TableOfContents at the location specified by the pathElements.TableOfContents.addSection(Resource resource, String path, String pathSeparator) Calls addTOCReferenceAtLocation after splitting the path using the given pathSeparator.private static voidBook.addToContentsResult(Resource resource, Map<String, Resource> allReachableResources) private 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 StringResources.getResourceItemPrefix(Resource resource) private StringResources.makeValidId(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, 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 ResourceModifier and TypeMethodDescriptionvoidResources.addAll(Collection<Resource> resources) Adds all resources from the given Collection of resources to the existing collection.private static voidBook.addToContentsResult(Resource resource, Map<String, Resource> allReachableResources) static List<SpineReference> Spine.createSpineReferences(Collection<Resource> resources) static ResourceResources.findFirstResourceByMediaType(Collection<Resource> resources, MediaType mediaType) Gets the first resource (random order) with the give mediatype.private static voidTableOfContents.getAllUniqueResources(Set<String> uniqueHrefs, List<Resource> result, List<TOCReference> tocReferences) voidResources.set(Collection<Resource> resources) Sets the collection of Resources to the given collection of resourcesvoidSets the collection of Resources to the given collection of resourcesConstructors in nl.siegmann.epublib.domain with parameters of type ResourceModifierConstructorDescriptionGuideReference(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) -
Uses of Resource in nl.siegmann.epublib.epub
Methods in nl.siegmann.epublib.epub that return ResourceModifier and TypeMethodDescriptionstatic ResourceNCXDocument.createNCXResource(List<Identifier> identifiers, String title, List<Author> authors, TableOfContents tableOfContents) static ResourceNCXDocument.createNCXResource(Book book) (package private) static ResourcePackageDocumentReader.findTableOfContentsResource(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(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 ResourceMethods in nl.siegmann.epublib.epub with parameters of type ResourceModifier and TypeMethodDescriptionvoidHtmlProcessor.processHtmlResource(Resource resource, 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, ZipOutputStream resultStream) Writes the resource to the resultStream. -
Uses of Resource in nl.siegmann.epublib.search
Fields in nl.siegmann.epublib.search declared as ResourceModifier and TypeFieldDescriptionprivate ResourceResourceSearchIndex.resourceprivate ResourceSearchIndex.ResourceSearchIndex.resourceprivate ResourceSearchResult.resourceMethods in nl.siegmann.epublib.search that return ResourceModifier and TypeMethodDescriptionResourceSearchIndex.getResource()SearchIndex.ResourceSearchIndex.getResource()SearchResult.getResource()Methods in nl.siegmann.epublib.search with parameters of type ResourceModifier and TypeMethodDescriptionprivate static SearchIndex.ResourceSearchIndexSearchIndex.createResourceSearchIndex(Resource resource) protected static List<SearchResult> static StringSearchIndex.getSearchContent(Resource resource) Constructors in nl.siegmann.epublib.search with parameters of type ResourceModifierConstructorDescriptionResourceSearchIndex(Resource resource, String searchContent) ResourceSearchIndex(Resource resource, String searchContent) SearchResult(int pagePos, String searchTerm, Resource resource) -
Uses of Resource in nl.siegmann.epublib.util
Methods in nl.siegmann.epublib.util that return ResourceModifier and TypeMethodDescriptionstatic ResourceResourceUtil.createResource(File file) static ResourceResourceUtil.createResource(String title, String href) Creates a resource with as contents a html page with the given title.static ResourceResourceUtil.createResource(ZipEntry zipEntry, 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, String inputEncoding) Methods in nl.siegmann.epublib.util with parameters of type ResourceModifier and TypeMethodDescriptionstatic StringToolsResourceUtil.findTitleFromXhtml(Resource resource) Retrieves whatever it finds between <title>...</title> or <h1-7>...</h1-7>.static DocumentResourceUtil.getAsDocument(Resource resource) Reads parses the xml therein and returns the result as a Documentstatic DocumentResourceUtil.getAsDocument(Resource resource, DocumentBuilder documentBuilder) Reads the given resources inputstream, parses the xml therein and returns the result as a Documentstatic InputSourceResourceUtil.getInputSource(Resource resource) Gets the contents of the Resource as an InputSource in a null-safe manner.static String -
Uses of Resource in nl.siegmann.epublib.viewer
Fields in nl.siegmann.epublib.viewer declared as ResourceMethods in nl.siegmann.epublib.viewer with parameters of type ResourceModifier and TypeMethodDescriptionprivate voidTableOfContentsPane.addToHref2TreeNode(Resource resource, DefaultMutableTreeNode treeNode) private HTMLDocumentHTMLDocumentFactory.createDocument(Resource resource) Creates a swing HTMLDocument from the given resource.private ImageImageLoaderCache.createImage(Resource imageResource) Create an Image from the data of the given resource.voidContentPane.displayPage(Resource resource) voidContentPane.displayPage(Resource resource, int sectionPos) HTMLDocumentFactory.getDocument(Resource resource) Get the HTMLDocument representation of the resource.private voidHTMLDocumentFactory.putDocument(Resource resource, HTMLDocument document) voidImageLoaderCache.setContextResource(Resource resource)