//shared/org.readium.r2.shared.publication/Locator/Locations
Locations¶
[androidJvm]\ data class Locations(fragments: List<String>, progression: Double?, position: Int?, totalProgression: Double?, otherLocations: Map<String, Any>) : JSONable, Parcelable
One or more alternative expressions of the location. https://github.com/readium/architecture/tree/master/models/locators#the-location-object
Parameters¶
androidJvm
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¶
Locations | [androidJvm] fun Locations(fragments: List<String> = emptyList(), progression: Double? = null, position: Int? = null, totalProgression: Double? = null, otherLocations: Map<String, Any> = emptyMap()) |
Types¶
Name | Summary |
---|---|
Companion | [androidJvm] object Companion |
Functions¶
Name | Summary |
---|---|
describeContents | [androidJvm] abstract fun describeContents(): Int |
get | [androidJvm] operator fun get(key: String): Any? Syntactic sugar to access the otherLocations values by subscripting Locations directly. locations["cssSelector"] == locations.otherLocations["cssSelector"] |
toJSON | [androidJvm] open override fun toJSON(): JSONObject Serializes the object to its JSON representation. |
writeToParcel | [androidJvm] abstract fun writeToParcel(p0: Parcel, p1: Int) |
Properties¶
Name | Summary |
---|---|
fragment | [androidJvm] ~~val~~ ~~fragment~~~~:~~ String? |
fragments | [androidJvm] val fragments: List<String> |
otherLocations | [androidJvm] val otherLocations: Map<String, Any> |
position | [androidJvm] val position: Int? = null |
progression | [androidJvm] val progression: Double? = null |
totalProgression | [androidJvm] val totalProgression: Double? = null |
Extensions¶
Name | Summary |
---|---|
cssSelector | [androidJvm] val Locator.Locations.cssSelector: String? A CSS Selector. |
domRange | [androidJvm] val Locator.Locations.domRange: DomRange? An HTML DOM range. |
partialCfi | [androidJvm] val Locator.Locations.partialCfi: String? 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. |