Comunica Link Traversal
    Preparing search index...

    A link traversal manager manages a link queue, and uses it to populate the aggregated query source and non-aggregated query sources. The aggregated source contains all documents that do not offer a proper query interface. All sources with a proper query interface are captured in the nhe non-aggregated query sources.

    interface ILinkTraversalManager {
        addStopListener: (cb: () => void) => void;
        getQuerySourceAggregated: () => IQuerySource;
        getQuerySourcesNonAggregated: () => AsyncIterator<IQuerySource>;
        linkQueue: ILinkQueue;
        seeds: ILink[];
        start: (
            rejectionHandler: (error: Error) => void,
            context: IActionContext,
        ) => void;
        started: boolean;
        stop: () => void;
        stopped: boolean;
    }

    Implemented by

    Index

    Properties

    addStopListener: (cb: () => void) => void

    Register a listener to listen to stop events.

    Type Declaration

      • (cb: () => void): void
      • Parameters

        • cb: () => void

          Listener that will be invoked once the traversal stops.

        Returns void

    getQuerySourceAggregated: () => IQuerySource

    Get the query source containing all triples obtained from traversal. This excludes sources that can not be aggregated, such as SPARQL endpoints.

    getQuerySourcesNonAggregated: () => AsyncIterator<IQuerySource>

    Create a new iterator over all query sources that could not be aggregated in the main query source. This iterator will only end once traversal stops.

    linkQueue: ILinkQueue

    The queue of links to be followed.

    seeds: ILink[]

    The seed links used for populating the link queue.

    start: (
        rejectionHandler: (error: Error) => void,
        context: IActionContext,
    ) => void

    Start traversal over the link queue.

    Type Declaration

      • (rejectionHandler: (error: Error) => void, context: IActionContext): void
      • Parameters

        • rejectionHandler: (error: Error) => void

          A callback for error events.

        • context: IActionContext

          The query context.

        Returns void

    started: boolean

    If the traversal has been initiated.

    stop: () => void

    Terminate traversal.

    stopped: boolean

    If the traversal has ended, either forcefully, or after draining the link queue completely.