solid-ui
    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

    The class order for this node

    closed: boolean
    compareTerm: (other: BlankNode) => number

    Compares this node with another

    Type declaration

    to check if two nodes are equal

    elements: T[]

    The nodes in this collection

    isVar: number
    termType: "Collection"

    The type of node

    value: string

    The node's value

    fromValue: <T extends FromValueReturns>(value: ValueType) => T
    termType: "Collection"
    toJS: (
        term: any,
    ) =>
        | string
        | boolean
        | object
        | Number
        | Date
        | (string | boolean | object | Number | Date)[]

    Accessors

    • get id(): string

      Returns string

    • set id(value: string): void

      Parameters

      • value: string

      Returns void

    Methods

    • Appends an element to this collection

      Parameters

      • element: T

        The new element

      Returns number

    • Closes this collection

      Returns boolean

    • Compares whether the two nodes are equal

      Parameters

      • other: Term

        The other node

      Returns boolean

    • Creates a hash for this node

      Returns string

      use {rdfFactory.id} instead if possible

    • Compares whether this node is the same as the other one

      Parameters

      • other: Node

        Another 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

    • Creates a canonical string representation of this node

      Returns string

    • Creates a n-quads string representation of this node

      Returns string

    • Creates a n-triples string representation of this node

      Returns string

    • 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