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

    The interface used for parsed EPUB CFI selectors.

    interface IEpubCfiSelector {
        collapseToEnd(): ISelector;
        collapseToStart(): ISelector;
        createRangeSelectorTo(endSelector: ISelector): ISelector;
        getFragmentSpecificationIri(): string;
        getRefinementSelectors(): ISelector[];
        getRootNode(): IEpubCfiRootNode;
        getType(): FRAGMENT_SELECTOR;
        getValue(): string;
        isRangeSelector(): boolean;
        toJSON(): IFragmentSelectorData;
        toString(): string;
    }

    Hierarchy (View Summary)

    Implemented by

    Methods

    • If this selector is a range selector, it creates a new selector by collapsing to its end position. If this selector is not a range selector, this instance is returned.

      Returns ISelector

    • If this selector is a range selector, it creates a new selector by collapsing to its start position. If this selector is not a range selector, this instance is returned.

      Returns ISelector

    • Creates a new selector describing the range using this instance as startSelector and the passed value as endSelector. Returns null, if the selector implementation cannot create range selectors or if endSelector type is incompatible with this selector.

      The caller must guarantee that endSelector is after this selector. The implementation will not check that endSelector is after this selector.

      Parameters

      Returns ISelector

    • Gets the IEpubCfiRootNode describing the EPUB CFI as a tree of objects.

      Note: The returned instance may in some cases be a copy of the rootNode passed to the EpubCfiSelector constructor instead of the original rootNode.

      Strings in the tree, such as xml ids and text assertions, are never percent-encoded, unlike the string returned by getValue().

      Returns IEpubCfiRootNode

    • Returns the EPUB CFI in the form used in a URL fragment.

      The characters %, space, ", <, >, `, DEL and the C0 control characters are percent-encoded as % followed by two uppercase hex digits. All other characters stay raw, including non-ASCII characters. For example, the xml id 50%-off-ä gives epubcfi(/6/2!/4[50%25-off-ä]).

      Parse this string back with a SelectorFactory constructed with an EpubCfiFragmentSelectorParser, or with a LocatorFactory that uses such a SelectorFactory. The parser percent-decodes the string before parsing it.

      Returns string