Options
All
  • Public
  • Public/Protected
  • All
Menu

Module util/QuadUtil

Index

Functions

Const parseQuads

  • parseQuads(readable: Guarded<Readable>, contentType?: string): Promise<Quad[]>
  • Helper function to convert a Readable into an array of quads.

    Parameters

    • readable: Guarded<Readable>

      The readable object.

    • Optional contentType: string

      The content-type of the stream.

    Returns Promise<Quad[]>

    A promise containing the array of quads.

Const pushQuad

  • pushQuad(quads: Quad[], subject: NamedNode<string>, predicate: NamedNode<string>, object: Literal | NamedNode<string>): number
  • Generates a quad with the given subject/predicate/object and pushes it to the given array.

    Parameters

    • quads: Quad[]
    • subject: NamedNode<string>
    • predicate: NamedNode<string>
    • object: Literal | NamedNode<string>

    Returns number

Const serializeQuads

  • serializeQuads(quads: Quad[], contentType?: string): Guarded<Readable>
  • Helper function for serializing an array of quads, with as result a Readable object.

    Parameters

    • quads: Quad[]

      The array of quads.

    • Optional contentType: string

      The content-type to serialize to.

    Returns Guarded<Readable>

    The Readable object.