class Relationships
extends XmlFile
import { Relationships } from "https://deno.land/x/docxml@2.0.1/src/files/Relationships.ts";
Constructors
Properties
private
instances: Map<string, File>Class instances of all relationships that are not "external"
private
meta: Array<RelationshipMeta>All relationship data
Methods
protected
toNode(): Documentadd(type: RelationshipType, instance: File): string
Create a new relationship and return the new identifier
ensureRelationship<C extends File>(type: RelationshipType, createInstance: () => C): C
find<R extends File = File>(cb: (meta: RelationshipMeta) => boolean): R | null
Find a relationship instance (eg. a OfficeDocument) by its metadata. The metadata would tell you what type of relationship it is.
getRelated(): File[]
toArchive(archive: ZipArchive): void
Static Methods
fromArchive(archive: ZipArchive, location: string): Promise<Relationships>
Instantiate this class by looking at the DOCX XML for it.