Package-level declarations

Types

Link copied to clipboard
data class Accessibility(val conformsTo: Set<Accessibility.Profile> = emptySet(), val certification: Accessibility.Certification? = null, val summary: String? = null, val accessModes: Set<Accessibility.AccessMode> = emptySet(), val accessModesSufficient: Set<Set<Accessibility.PrimaryAccessMode>> = emptySet(), val features: Set<Accessibility.Feature> = emptySet(), val hazards: Set<Accessibility.Hazard> = emptySet(), val exemptions: Set<Accessibility.Exemption> = emptySet()) : JSONable, Parcelable

Holds the accessibility metadata of a Publication.

Link copied to clipboard

Collection type used for collection/series metadata. For convenience, the JSON schema reuse the Contributor's definition.

Link copied to clipboard
data class Contributor(val localizedName: LocalizedString, val localizedSortAs: LocalizedString? = null, val identifier: String? = null, val roles: Set<String> = emptySet(), val position: Double? = null, val links: List<Link> = emptyList()) : JSONable, Parcelable

Contributor Object for the Readium Web Publication Manifest. https://readium.org/webpub-manifest/schema/contributor-object.schema.json

Link copied to clipboard

An hypertext reference points to a resource in a Publication.

Link copied to clipboard
data class Link(val href: Href, val mediaType: MediaType? = null, val title: String? = null, val rels: Set<String> = setOf(), val properties: Properties = Properties(), val height: Int? = null, val width: Int? = null, val bitrate: Double? = null, val duration: Double? = null, val languages: List<String> = listOf(), val alternates: List<Link> = listOf(), val children: List<Link> = listOf()) : JSONable, Parcelable

Link Object for the Readium Web Publication Manifest. https://readium.org/webpub-manifest/schema/link.schema.json

Link copied to clipboard
data class LocalizedString(val translations: Map<String?, LocalizedString.Translation> = emptyMap()) : JSONable, Parcelable

Represents a string with multiple translations indexed by a BCP 47 language tag.

Link copied to clipboard
data class Locator(val href: Url, val mediaType: MediaType, val title: String? = null, val locations: Locator.Locations = Locations(), val text: Locator.Text = Text()) : JSONable, Parcelable

Represents a precise location in a publication in a format that can be stored and shared.

Link copied to clipboard
data class LocatorCollection(val metadata: LocatorCollection.Metadata = Metadata(), val links: List<Link> = emptyList(), val locators: List<Locator> = emptyList()) : JSONable, Parcelable

Represents a sequential list of Locator objects.

Link copied to clipboard
data class Manifest(val context: List<String> = emptyList(), val metadata: Metadata, val links: List<Link> = emptyList(), val readingOrder: List<Link> = emptyList(), val resources: List<Link> = emptyList(), val tableOfContents: List<Link> = emptyList(), val subcollections: Map<String, List<PublicationCollection>> = emptyMap()) : JSONable

Holds the metadata of a Readium publication, as described in the Readium Web Publication Manifest.

Link copied to clipboard

Transforms a manifest's components.

Link copied to clipboard
data class Metadata(val identifier: String? = null, val type: String? = null, val conformsTo: Set<Publication.Profile> = emptySet(), val localizedTitle: LocalizedString? = null, val localizedSubtitle: LocalizedString? = null, val localizedSortAs: LocalizedString? = null, val modified: Instant? = null, val published: Instant? = null, val accessibility: Accessibility? = null, val languages: List<String> = emptyList(), val subjects: List<Subject> = emptyList(), val authors: List<Contributor> = emptyList(), val translators: List<Contributor> = emptyList(), val editors: List<Contributor> = emptyList(), val artists: List<Contributor> = emptyList(), val illustrators: List<Contributor> = emptyList(), val letterers: List<Contributor> = emptyList(), val pencilers: List<Contributor> = emptyList(), val colorists: List<Contributor> = emptyList(), val inkers: List<Contributor> = emptyList(), val narrators: List<Contributor> = emptyList(), val contributors: List<Contributor> = emptyList(), val publishers: List<Contributor> = emptyList(), val imprints: List<Contributor> = emptyList(), val readingProgression: ReadingProgression? = null, val description: String? = null, val duration: Double? = null, val numberOfPages: Int? = null, val belongsTo: Map<String, List<Collection>> = emptyMap(), val tdm: Tdm? = null, val otherMetadata: Map<String, Any> = mapOf()) : JSONable, Parcelable

https://readium.org/webpub-manifest/schema/metadata.schema.json

Link copied to clipboard
data class Properties(val otherProperties: Map<String, Any> = emptyMap()) : JSONable, Parcelable

Properties associated to the linked resource.

Link copied to clipboard
class Publication(val manifest: Manifest, val container: Container<Resource> = EmptyContainer(), servicesBuilder: Publication.ServicesBuilder = ServicesBuilder()) : PublicationServicesHolder

The Publication shared model is the entry-point for all the metadata and services related to a Readium publication.

Link copied to clipboard
data class PublicationCollection(val metadata: Map<String, Any> = emptyMap(), val links: List<Link> = emptyList(), val subcollections: Map<String, List<PublicationCollection>> = emptyMap()) : JSONable, Parcelable

Core Collection Model

Link copied to clipboard
typealias PublicationId = String

A reference uniquely identifying a publication in the reading app.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class Subject(val localizedName: LocalizedString, val localizedSortAs: LocalizedString? = null, val scheme: String? = null, val code: String? = null, val links: List<Link> = emptyList()) : JSONable, Parcelable

https://github.com/readium/webpub-manifest/tree/master/contexts/default#subjects

Link copied to clipboard
data class Tdm(val reservation: Tdm.Reservation, val policy: AbsoluteUrl? = null) : JSONable, Parcelable

Publications can indicate whether they allow third parties to use their content for text and data mining purposes using the TDM Rep protocol, as defined in a W3C Community Group Report.

Properties

Link copied to clipboard

Returns whether all the resources in the collection are audio clips.

Link copied to clipboard

Returns whether all the resources in the collection are bitmaps.

Link copied to clipboard

Returns whether all the resources in the collection are HTML documents.

Link copied to clipboard

Returns whether all the resources in the collection are video clips.

Functions

Link copied to clipboard

Returns whether all the resources in the collection are matching the given media type.

Link copied to clipboard

Returns whether all the resources in the collection are matching any of the given media types.

Link copied to clipboard
@JvmName(name = "copyContributors")
fun List<Contributor>.copy(transformer: ManifestTransformer): List<Contributor>
@JvmName(name = "copyLinks")
fun List<Link>.copy(transformer: ManifestTransformer): List<Link>
@JvmName(name = "copySubjects")
fun List<Subject>.copy(transformer: ManifestTransformer): List<Subject>
@JvmName(name = "copyContributorsMap")
fun Map<String, List<Contributor>>.copy(transformer: ManifestTransformer): Map<String, List<Contributor>>
@JvmName(name = "copyPublicationCollections")
fun Map<String, List<PublicationCollection>>.copy(transformer: ManifestTransformer): Map<String, List<PublicationCollection>>
fun Href.copy(transformer: ManifestTransformer): Href
fun Link.copy(transformer: ManifestTransformer): Link

Creates a copy of the receiver Manifest, applying the given transformer to each component.

Link copied to clipboard

Finds all the links matching the given media type.

Link copied to clipboard

Finds all the links matching any of the given media types.

Link copied to clipboard

Finds all the links with the given relation.

Link copied to clipboard

Finds the first link matching the given HREF.

Link copied to clipboard

Finds the first link matching the given media type.

Link copied to clipboard

Finds the first link with the given relation.

Link copied to clipboard

Returns a list of Link after flattening the children and alternates links of the receiver.

Link copied to clipboard

Returns the first Link with the given href, or null if not found.

Link copied to clipboard

Returns a copy of the receiver after normalizing its HREFs to the given baseUrl.

Link copied to clipboard

Returns a copy of the receiver after normalizing its HREFs to the link with rel="self".