A link holder that can expose additional properties.

interface ILink {
    context?: IActionContext;
    metadata?: Record<string, any>;
    transform?: ((input: Stream<Quad>) => Promise<Stream<Quad>>);
    url: string;
}

Properties

context?: IActionContext

Optional context to apply onto mediators when handling this link as source. All entries of this context will be added (or overwritten) into the existing context.

metadata?: Record<string, any>

An optional link-specific metadata object. This may be used to keep track of data that is relevant to links, which could be used across actors.

transform?: ((input: Stream<Quad>) => Promise<Stream<Quad>>)

An optional stream modifier. This transformation will be applied on the stream of data quads that is obtained from dereferencing the given URL.

Type declaration

    • (input): Promise<Stream<Quad>>
    • Parameters

      • input: Stream<Quad>

        The stream of data quads on the given URL.

      Returns Promise<Stream<Quad>>

      The stream of data quads to be used for this link instead of the given stream.

url: string

The URL identifying this link.