Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Collection<T>

A collection of other RDF nodes

Use generic T to control the contents of the array.

Type parameters

Hierarchy

Implements

Index

Constructors

constructor

Properties

classOrder

classOrder: number = ClassOrder.Collection

closed

closed: boolean = false

compareTerm

compareTerm: compareTerm = RdflibBlankNode.prototype.compareTerm

elements

elements: T[] = []

The nodes in this collection

isVar

isVar: number = 0

termType

termType: typeof CollectionTermType = CollectionTermType

value

value: string

The node's value

Static fromValue

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

Type declaration

Static termType

termType: typeof CollectionTermType = CollectionTermType

Static toJS

toJS: (term: any) => Date | Number | string | boolean | object | Array<Date | Number | string | boolean | object>

Type declaration

    • (term: any): Date | Number | string | boolean | object | Array<Date | Number | string | boolean | object>
    • Parameters

      • term: any

      Returns Date | Number | string | boolean | object | Array<Date | Number | string | boolean | object>

Accessors

id

  • get id(): string
  • set id(value: string): void

Methods

append

  • append(element: T): number
  • Appends an element to this collection

    Parameters

    • element: T

      The new element

    Returns number

close

  • close(): boolean

equals

  • equals(other: Term): boolean

hashString

  • hashString(): string

sameTerm

  • sameTerm(other: Node): boolean

shift

  • shift(): T | undefined
  • Removes the first element from the collection (and return it)

    Returns T | undefined

substitute

toCanonical

  • toCanonical(): string

toNQ

  • toNQ(): string

toNT

  • toNT(): string

toString

  • toString(): string

unshift

  • unshift(element: T): number
  • Prepends the specified element to the collection's front

    Parameters

    • element: T

      The element to prepend

    Returns number

Static toNT

  • toNT(collection: any): string