Class Collection<T>

A collection of other RDF nodes

Use generic T to control the contents of the array.

Type Parameters

Hierarchy

Implements

  • Term

Constructors

Properties

classOrder: number = ClassOrder.Collection

The class order for this node

closed: boolean = false
compareTerm: ((other: BlankNode) => number) = RdflibBlankNode.prototype.compareTerm

Type declaration

elements: T[] = []

The nodes in this collection

isVar: number = 0
termType: "Collection" = CollectionTermType

The type of node

value: string

The node's value

fromValue: (<T>(value: ValueType) => T)

Type declaration

    • <T>(value: ValueType): T
    • Type Parameters

      • T extends FromValueReturns<any>

      Parameters

      • value: ValueType

      Returns T

termType: "Collection" = CollectionTermType
toJS: ((term: any) => string | boolean | object | Number | Date | (string | boolean | object | Number | Date)[])

Type declaration

    • (term: any): string | boolean | object | Number | Date | (string | boolean | object | Number | Date)[]
    • Parameters

      • term: any

      Returns string | boolean | object | Number | Date | (string | boolean | object | Number | Date)[]

Accessors

Methods

  • Appends an element to this collection

    Parameters

    • element: T

      The new element

    Returns number

  • Compares whether the two nodes are equal

    Parameters

    • other: Term

      The other node

    Returns boolean

  • Removes the first element from the collection (and return it)

    Returns undefined | T

  • Creates a new Collection with the substituting bindings applied

    Parameters

    • bindings: Bindings

      The bindings to substitute

    Returns any

  • Serializes the collection to a string. Surrounded by (parentheses) and separated by spaces.

    Returns string

  • Prepends the specified element to the collection's front

    Parameters

    • element: T

      The element to prepend

    Returns number

  • Parameters

    • collection: any

    Returns string

Generated using TypeDoc