Class RoutingAuxiliaryStrategy

An AuxiliaryStrategy that combines multiple AuxiliaryStrategies into one. Uses isAuxiliaryIdentifier to know which strategy to call for which call.

addMetadata will either call all strategies if the input is the subject identifier, or only the matching strategy if the input is an auxiliary identifier.

Hierarchy

Implements

Constructors

Properties

Methods

  • Adds metadata related to this auxiliary resource, in case this is required for this type of auxiliary resource. The metadata that is added depends on the given identifier being an auxiliary or subject resource: the metadata will be used to link to the other one, and potentially add extra typing info.

    Used for: Solid, ยง4.3.1: "For any defined auxiliary resource available for a given Solid resource, all representations of that resource MUST include an HTTP Link header pointing to the location of each auxiliary resource." https://solid.github.io/specification/protocol#auxiliary-resources-server

    The above is an example of how that metadata would only be added in case the input is the subject identifier.

    Parameters

    Returns Promise<void>