Colibrio Reader Framework API - Cloud license
    Preparing search index...

    Locator instances are used for referencing specific locations (including ranges) in publications.

    The Locator type is modeled after and compatible with the "External Web Resource" and "Specific Resource" types defined by the Web Annotations specification: https://www.w3.org/TR/annotation-model

    Locator can be serialized into various formats such as:

    • IWebAnnotationResourceData - modeling the Web annotation "External Web Resource" type.
    • IWebAnnotationSpecificResourceData - modeling the Web annotation "Specific Resource" type.
    • URL - (non-fragment selectors are serialized according to the Selectors and States Note: https://www.w3.org/TR/selectors-states/

    Legacy Colibrio IAnnotationTarget objects are not valid with the "External Web Resource" or "Specific Resource" types due to using "id" instead of "source" while also specifying a "selector". For backwards compatibility, these object can still be parsed into Locators.

    NOTE: JSON-LD processing is NOT supported. Ensure that the data used to instantiate Locators follows the recommended serialization format specified in https://www.w3.org/TR/annotation-vocab/#json-ld-context

    Implemented by

    Methods

    • Get 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.

      Returns ISelector[]

    • Returns the URL of the Locator without the hash fragment part if any. This can be a http URL, an isbn identifier (isbn:4636...) or any other URL, URI, IRI, URN identifier

      Returns string

    • Method used to convert a locator to a ILegacyAnnotationTarget that is compatible with older versions of the Colibrio framework. Note that the format and type fields will not be set, so if you need them, you have to set them manually.

      Returns ILegacyAnnotationTargetData

    • Get this Locator as an URL string.

      Returns string

    • Get this Locator as an URL.

      Returns URL