Locations

data class Locations(val fragments: List<String> = emptyList(), val progression: Double? = null, val position: Int? = null, val totalProgression: Double? = null, val otherLocations: Map<String, Any> = emptyMap()) : JSONable, Parcelable

One or more alternative expressions of the location. https://github.com/readium/architecture/tree/master/models/locators#the-location-object

Parameters

fragments

Contains one or more fragment in the resource referenced by the Locator.

progression

Progression in the resource expressed as a percentage (between 0 and 1).

position

An index in the publication (>= 1).

totalProgression

Progression in the publication expressed as a percentage (between 0 and 1).

otherLocations

Additional locations for extensions.

Constructors

Link copied to clipboard
constructor(fragments: List<String> = emptyList(), progression: Double? = null, position: Int? = null, totalProgression: Double? = null, otherLocations: Map<String, Any> = emptyMap())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

A CSS Selector.

Link copied to clipboard

An HTML DOM range.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

partialCfi is an expression conforming to the "right-hand" side of the EPUB CFI syntax, that is to say: without the EPUB-specific OPF spine item reference that precedes the first ! exclamation mark (which denotes the "step indirection" into a publication document). Note that the wrapping epubcfi(***) syntax is not used for the partialCfi string, i.e. the "fragment" part of the CFI grammar is ignored.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
operator fun get(key: String): Any?

Syntactic sugar to access the otherLocations values by subscripting Locations directly. locations["cssSelector"] == locations.otherLocations["cssSelector"]

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

Serializes the object to its JSON representation.

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