SimpleLocatorData

data class SimpleLocatorData(val sourceUrl: String, val selectors: List<String>)

Used for referencing specific locations (including ranges) in publications.

Can be transformed into a valid URL by:

let url: string;
if (selectors.length 0) {
url = sourceUrl + '#' + selectors[0];
} else {
url = sourceUrl;
}

Constructors

Link copied to clipboard
fun SimpleLocatorData(sourceUrl: String, selectors: List<String>)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun serialize(generator: JsonGenerator)

Properties

Link copied to clipboard

The selectors for this locator. Multiple selectors should select the same content, however some selectors will not have the same precision as others. The first selector in the array has the highest precision.

Link copied to clipboard

Returns the URL of the locator without the hash fragment part if any.