Options
All
  • Public
  • Public/Protected
  • All
Menu

Used for implementing FragmentSelector parsers.

An FragmentSelectorParsers takes a URL hash fragment and parses it into a Selector instance. Each FragmentSelectorParser should typically be specialized for a selector type. Add FragmentSelectorParser implementations to a SelectorFactory to add support for a specific fragment selector format.

See SelectorFactory for how configure its FragmentSelectorParsers, and how to parse fragment selector strings into Selector instances.

Hierarchy

  • IFragmentSelectorParser

Implemented by

Index

Methods

canParseFragment

  • canParseFragment(fragment: string): boolean
  • Should return true if this instance is able to parse the fragment value into a Selector implementation. If this method returns true, parseFragment() will be called by the SelectorFactory with the fragment value.

    Parameters

    • fragment: string

    Returns boolean

getFragmentSpecificationIri

  • getFragmentSpecificationIri(): string

parseFragment

  • Parses the fragment into a Selector implementation. This method must only be called if canParseFragment() returns true for the specified fragment value. Note that the parsing can fail and return null even if canParseFragment() returns true.

    Parameters

    Returns ISelector

Generated using TypeDoc