Options
All
  • Public
  • Public/Protected
  • All
Menu

Used for parsing Locators and for creating Locator ranges.

Hierarchy

  • LocatorFactory

Implements

Index

Constructors

constructor

Methods

collapseRangeLocatorToEnd

collapseRangeLocatorToStart

createRangeLocator

getSelectorFactory

parse

  • Parses the given data into a new Locator by:

    • parsing an absolute URL, URI, URN or IRI (referred to as URL from now on.)
    • parsing a relative URL together with a base URL.
    • parsing an object compatible with the ILocatorData type.

    The ILocatorData is modeled after the "Resource" and "SpecificResource" types defined by the Web Annotations specification: https://www.w3.org/TR/annotation-model

    Legacy Colibrio ILegacyAnnotationTarget 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 used with this method. If the ILegacyAnnotationTarget does not have an "id", you must provide a baseUrl.

    NOTE: JSON-LD processing is NOT supported. Ensure that the data passed to this method is compatible with the IWebAnnotationResourceData or IWebAnnotationSpecificResourceData type.

    NOTE: Specifying both the 'selector' property AND a fragment part in 'source' is strongly discouraged as this behaviour is not fully defined in the Web Annotations spec. Colibrio's behavior is to treat 'selector' as refinement selectors on the fragment selector.

    Selectors that cannot be parsed by the selector factory will be dropped.

    Parameters

    Returns ILocatorParseResult

Generated using TypeDoc