Locator
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.
There are many different use cases for locators:
getting back to the last position in a publication
bookmarks
highlights & annotations
search results
human-readable (and shareable) reference in a publication
https://readium.org/architecture/models/locators/
Constructors
Link copied to clipboard
constructor(href: Url, mediaType: MediaType, title: String? = null, locations: Locator.Locations = Locations(), text: Locator.Text = Text())
Types
Link copied to clipboard
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
Properties
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Serializes the object to its JSON representation.
Link copied to clipboard