rdflib
    Preparing search index...

    Class Collection<T>

    A collection of other RDF nodes

    Use generic T to control the contents of the array.

    Type Parameters

    Hierarchy (View Summary)

    Implements

    • Term
    Index

    Constructors

    Properties

    classOrder: number = ClassOrder.Collection

    The class order for this node

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

    Compares this node with another

    Type Declaration

    to check if two nodes are equal

    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 extends FromValueReturns>(value: ValueType) => T
    termType: "Collection" = CollectionTermType
    toJS: (
        term: any,
    ) =>
        | 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 | null | undefined

        The other node

      Returns boolean

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

      Returns T | undefined

    • 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