Interface AuxiliaryIdentifierStrategy

A strategy for handling auxiliary related ResourceIdentifiers.

interface AuxiliaryIdentifierStrategy {
    getAuxiliaryIdentifier: ((identifier: ResourceIdentifier) => ResourceIdentifier);
    getAuxiliaryIdentifiers: ((identifier: ResourceIdentifier) => ResourceIdentifier[]);
    getSubjectIdentifier: ((identifier: ResourceIdentifier) => ResourceIdentifier);
    isAuxiliaryIdentifier: ((identifier: ResourceIdentifier) => boolean);
}

Hierarchy (view full)

Implemented by

Properties

getAuxiliaryIdentifier: ((identifier: ResourceIdentifier) => ResourceIdentifier)

Returns the identifier of the auxiliary resource corresponding to the given resource. This does not guarantee that this auxiliary resource exists.

Should error if there are multiple results: see getAuxiliaryIdentifiers.

Type declaration

getAuxiliaryIdentifiers: ((identifier: ResourceIdentifier) => ResourceIdentifier[])

Returns all the identifiers of corresponding auxiliary resources. This can be used when there are potentially multiple results. In the case of a single result this should be an array containing the result of getAuxiliaryIdentifier.

Type declaration

getSubjectIdentifier: ((identifier: ResourceIdentifier) => ResourceIdentifier)

Returns the identifier of the resource which this auxiliary resource is referring to. This does not guarantee that this resource exists.

Type declaration

isAuxiliaryIdentifier: ((identifier: ResourceIdentifier) => boolean)

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.

Type declaration

    • (identifier): boolean
    • Parameters

      Returns boolean

      true if the input identifier points to an auxiliary resource.