A Link is an indirect, qualified reference to a resource identified by a URL.
The fundamental model for links is established by RFC 5988. Many of the
properties defined by the Activity Vocabulary allow values that are either
instances of Object or Link. When a Link is used,
it establishes a qualified relation connecting the subject (the containing
object) to the resource identified by the href
. Properties of
the Link are properties of the reference as opposed to properties of
the resource.
Link(values: { id?: URL | null; href?: URL | null; rel?: string | null; rels?: (string)[]; mediaType?: string | null; name?: ; names?: ((string | LanguageString))[]; language?: LanguageTag | null; height?: number | null; width?: number | null; previews?: ()[]; },unnamed 1?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; },)
Constructs a new instance of Link with the given values.
_contextLoader: DocumentLoader | undefined
_documentLoader: DocumentLoader | undefined
On a Link, specifies a hint as to the rendering height in device-independent pixels of the linked resource.
language: LanguageTag | null
Hints as to the language used by the target resource. Value MUST be a BCP 47 Language-Tag.
When used on a Link, identifies the MIME media type of the referenced resource.
name:
A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.
names: ((string | LanguageString))[]
A simple, human-readable, plain-text name for the object. HTML markup MUST NOT be included. The name MAY be expressed using multiple language-tagged values.
previewIds: URL[]
Similar to
Link.getPreviews,
but returns their @id
s instead of the objects themselves.
A link relation associated with a Link. The value MUST conform to both the HTML5 and RFC 5988 "link relation" definitions.
In the HTML5, any string not containing the space (U+0020), tab (U+0009), LF (U+000A), FF (U+000C), CR (U+000D) or comma (U+002C) characters can be used as a valid link relation.
A link relation associated with a Link. The value MUST conform to both the HTML5 and RFC 5988 "link relation" definitions.
In the HTML5, any string not containing the space (U+0020), tab (U+0009), LF (U+000A), FF (U+000C), CR (U+000D) or comma (U+002C) characters can be used as a valid link relation.
[Symbol.for("Deno.customInspect")](inspect: Deno.inspect,options: Deno.InspectOptions,): string
_getCustomInspectProxy(): Record<string, unknown>
clone(values?: { id?: URL | null; href?: URL | null; rel?: string | null; rels?: (string)[]; mediaType?: string | null; name?: ; names?: ((string | LanguageString))[]; language?: LanguageTag | null; height?: number | null; width?: number | null; previews?: ()[]; },options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; },): Link
Clones this instance, optionally updating it with the given values.
getPreviews(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; }): AsyncIterable<Link | Object>
Identifies an entity that provides a preview of this object.
isCompactable(): boolean
fromJsonLd(json: unknown,options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; },): Promise<Link>
Converts a JSON-LD structure to an object of this type.