@asc-mitc/fdl — Node.js API
    Preparing search index...

    Class FDL

    index.ts

    Public API for @asc-mitc/fdl — re-exports all facade classes, types, and utilities.

    Hierarchy

    • OwnedHandle
      • FDL
    Index

    Constructors

    • Parameters

      • opts: {
            defaultFramingIntent?: string | null;
            fdlCreator?: string;
            uuid?: string | null;
            versionMajor?: number;
            versionMinor?: number;
        }

      Returns FDL

    Properties

    _addon: NativeAddon

    Cached addon reference.

    _docRef: OwnedHandle | null

    Strong reference to the owning document. Prevents GC of the document while this child handle lives. For OwnedHandle, this is this (self-referencing).

    Accessors

    • get defaultFramingIntent(): string | null

      defaultFramingIntent

      Returns string | null

    • set defaultFramingIntent(value: string): void

      Parameters

      • value: string

      Returns void

    • get fdlCreator(): string | null

      fdlCreator

      Returns string | null

    • set fdlCreator(value: string): void

      Parameters

      • value: string

      Returns void

    • get isClosed(): boolean

      Whether this handle has been closed.

      Returns boolean

    • get uuid(): string | null

      uuid

      Returns string | null

    • set uuid(value: string): void

      Parameters

      • value: string

      Returns void

    • get versionMajor(): number

      versionMajor

      Returns number

    • get versionMinor(): number

      versionMinor

      Returns number

    Methods

    • Check that the handle is still valid. Throws if closed.

      Returns void

    • Support using doc = FDL.parse(...) syntax (Symbol.dispose).

      Returns void

    • Add a context to the document.

      Parameters

      • label: string
      • contextCreator: string | null = null

      Returns Context

    • Returns Record<string, unknown>

    • Parameters

      • indent: number = 0

      Returns string

    • Release the underlying C handle. Safe to call multiple times.

      Returns void

    • Parameters

      • name: string

      Returns boolean

    • Parameters

      • name: string

      Returns boolean

    • Returns Record<string, unknown>

    • Run C-core schema + semantic validation.

      Returns void

    • Create a new empty FDL document with header fields.

      Parameters

      • uuid: string
      • versionMajor: number = 2
      • versionMinor: number = 0
      • fdlCreator: string = ""
      • defaultFramingIntent: string | null = null

      Returns FDL

    • Parse JSON bytes into a facade FDL document.

      Parameters

      • jsonBytes: string | Buffer<ArrayBufferLike>

      Returns FDL