Subject

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

Parameters

localizedSortAs

Provides a string that a machine can sort.

scheme

EPUB 3.1 opf:authority.

code

EPUB 3.1 opf:term.

links

Used to retrieve similar publications for the given subjects.

Constructors

Link copied to clipboard
constructor(localizedName: LocalizedString, localizedSortAs: LocalizedString? = null, scheme: String? = null, code: String? = null, links: List<Link> = emptyList())
constructor(name: String)

Shortcut to create a Subject using a string as name.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val code: String?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Returns the default translation string for the name.

Link copied to clipboard
Link copied to clipboard

Returns the default translation string for the localizedSortAs.

Functions

Link copied to clipboard
Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
open override fun toJSON(): JSONObject

Serializes a Subject to its RWPM JSON representation.

Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)