Options
All
  • Public
  • Public/Protected
  • All
Menu

An AuxiliaryStrategy that provides its functionality through the combination of an AuxiliaryIdentifierStrategy, MetadataGenerator and Validator.

Hierarchy

  • ComposedAuxiliaryStrategy

Implements

Index

Constructors

constructor

Properties

Private Readonly identifierStrategy

identifierStrategy: AuxiliaryIdentifierStrategy

Private Optional Readonly metadataGenerator

metadataGenerator: MetadataGenerator

Private Readonly rootRequired

rootRequired: boolean

Private Optional Readonly validator

validator: Validator

Methods

addMetadata

  • 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 associated 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 associated identifier.

    Parameters

    Returns Promise<void>

getAssociatedIdentifier

getAuxiliaryIdentifier

getAuxiliaryIdentifiers

isAuxiliaryIdentifier

  • Checks if the input identifier corresponds to an auxiliary resource. This does not check if that auxiliary resource exists, only if the identifier indicates that there could be an auxiliary resource there.

    Parameters

    Returns boolean

isRootRequired

  • isRootRequired(): boolean
  • Whether this auxiliary resource in a root storage container. If yes, this means they can't be deleted individually from such a container.

    Returns boolean

validate