Resources

All the resources that make up the book. XHTML files, images and epub xml documents must be here.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val size: Int

The number of resources

Functions

Link copied to clipboard
fun add(resource: Resource): Resource

Adds a resource to the resources.

Link copied to clipboard
fun addAll(resources: Collection<Resource>)

Adds all resources from the given Collection of resources to the existing collection.

Link copied to clipboard

Whether there exists a resource with the given href

Link copied to clipboard

Gets the first resource (random order) with the give mediatype.

Link copied to clipboard
fun fixResourceId(resource: Resource)

Checks the id of the given resource and changes to a unique identifier if it isn't one already.

Link copied to clipboard

Gets the resource with the given href. If the given href contains a fragmentId then that fragment id will be ignored.

Link copied to clipboard

Gets the resource with the given id.

Link copied to clipboard
fun getByIdOrHref(idOrHref: String): Resource?

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.

Link copied to clipboard

All resources that have the given MediaType.

Link copied to clipboard

All Resources that match any of the given list of MediaTypes

Link copied to clipboard
fun remove(href: String?): Resource?

Remove the resource with the given href.

Link copied to clipboard
fun set(resources: Collection<Resource>)
fun set(resources: Map<String?, Resource>)

Sets the collection of Resources to the given collection of resources